Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
function that makes the wheel spin
function rotateFunction() { var min = 1024; var max = 9999; var deg = Math.floor(Math.random() * (max - min)) + min; document.getElementById('box').style.transform = "rotate(" + deg + "deg)"; var element = document.getElementById('mainbox'); element.classList.remove('animate'); setTimeout(function () { element.classList.add('animate'); }, 5000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spinWheel() {\n // Rotate the spinner arrow\n rotation = (rotation + 12) % 360;\n arrow.setAttributeNS(null, \"transform\", \"rotate(\"+rotation+\",150,150)\");\n // Highlight the slice the arrow is above\n var newSlice = Math.floor(rotation / (360/numSlices));\n if (newSlice != currentSlice) {\n slices[currentSlice].toggleOverlay();\n slices[newSlice].toggleOverlay();\n currentSlice = newSlice;\n }\n}", "function spinWheel(){ \n\t\tif (curIteration > 1) {\n\t\t\t$('.nextCategoryArrow').removeClass(\"hidden\");\n\t\t\t$('#spinWheel').css(\"opacity\", \"0\");\n\t\t\t$('#titleImg_category').css(\"opacity\", \"0\");\n\t\t\t$('#title').css(\"opacity\", \"0\");\n\t\t\t$('#wheelCycleBtn').css(\"opacity\", \"0\");\n\t\t\ttheTime = 6000;\n\t\t}else{\n\t\t\ttheTime = 0;\n\t\t}\n\t\tsetTimeout(function() {\n\t\t\tdegrees+=120; $('.spinWheel').css('transform', 'rotate(' + degrees + 'deg)'); \n\t\t\t$('.nextCategoryArrow').addClass(\"hidden\");\n\t\t\t$('#spinWheel').css(\"opacity\", \"1\");\n\t\t\t$('#titleImg_category').css(\"opacity\", \"1\");\n\t\t\t$('#title').css(\"opacity\", \"1\");\n\t\t\t$('#wheelCycleBtn').css(\"opacity\", \"1\");\n\t\t}, theTime);\n\t}", "rotate(){\r\n if(this.state.spinTime > 2800) {\r\n clearTimeout(this.spinTimer);\r\n this.stopRotateWheel();\r\n } else {\r\n const spinAngle = this.rngSpinAngle - this.easeOut(this.state.spinTime, 0, this.rngSpinAngle, this.rngSpinTime);\r\n \r\n this.setState({\r\n startAngle: this.state.startAngle + spinAngle * Math.PI / 180,\r\n spinTime: this.state.spinTime + 30,\r\n }, () => {\r\n this.drawRouletteWheel();\r\n clearTimeout(this.spinTimer);\r\n this.spinTimer = setTimeout(() => this.rotate(), 30);\r\n })\r\n }\r\n }", "function spinGameWheel(){\r\n var $wheel = $(\".game-match\").find(\".spinner\").find(\".game-wheel\");\r\n\r\n TweenMax.to($wheel,2.5,{rotation: 360,ease:Back.easeInOut});\r\n }", "function spin(){\n rand = Math.floor(Math.random() * 38);\n var position = createWheel(rand);\n return position;\n}", "function spin(e) {\n\t\tsetInterval(function() {\n\t\t\tif ( (($window.scrollTop() + $window.height()) > e.offset().top) && $window.scrollTop() < (e.offset().top + e.height())) {\n\t\t\t\t//spinReset = true;\n\t\t\t\tdeg = deg + 0.5;\n\t\t\t\t//console.log(deg);\n\t\t\t\te.css('-webkit-transform', 'rotate(' + deg + 'deg)');\n\t\t\t} else if ( $window.scrollTop() > ($intelRevo.offset().top + e.height()) && (($window.scrollTop() + $window.height()) < $archWhl.offset().top) ) {\n\t\t\t\t//spinReset = true;\n\t\t\t\tdeg = 0;\n\t\t\t}\n\t\t}, 100);\n\t}", "function spin_controller(){\n game_content.spin_degrees = game_content.spin_degrees + 4;\n if(game_content.spin_degrees > 360){\n game_content.spin_degrees = 0;\n }\n}", "function spinwheel() {\n console.log(\"Time to click the wheel\");\n // play the sound when spinwheel function starts\n this.wheelSound.play();\n\n let rounds = Phaser.Math.Between(3, 5);\n\n // 12 items => 360/12 = 30\n let extra_degrees = Phaser.Math.Between(0, 11) * 30;\n\n let total_angle = rounds * 360 + extra_degrees;\n // calculation of which prize will come\n let index =\n prize_config.count -\n 1 -\n Math.floor(extra_degrees / (360 / prize_config.count));\n\n // Creating the animation in phaser\n let tween = this.tweens.add({\n targets: this.wheel,\n angle: total_angle,\n ease: \"Cubic.easeOut\",\n duration: 6000,\n callbackScope: this,\n onComplete: function () {\n this.game_text.setText(\"You have got \" + prize_config.prize_names[index]);\n // this.wheelSound.stop();\n },\n });\n}", "function toggleSpinning() {\n // Toggle the spinning animation\n if (game === undefined) {\n new ChutesAndLadders;\n }\n \n if (isSpinning) {\n // Stop the arrow\n isSpinning = false;\n clearInterval(toggleSpinning.spinInt);\n spinButton.removeAttribute(\"disabled\");\n game.turn();\n }\n else {\n // Start spinning the arrow\n isSpinning = true;\n toggleSpinning.spinInt = setInterval(spinWheel, 1000/60);\n // Set how long the wheel will be spinning\n var duration = Math.floor(Math.random() * 2000) + 1000;\n setTimeout(toggleSpinning, duration);\n // Disable the spin button\n spinButton.setAttribute(\"disabled\", \"true\");\n }\n}", "function resetWheel()\n{\n theWheel.stopAnimation(false); // Stop the animation, false as param so does not call callback function.\n theWheel.rotationAngle = 0; // Re-set the wheel angle to 0 degrees.\n theWheel.draw(); // Call draw to render changes to the wheel.\n wheelSpinning = false; // Reset to false to power buttons and spin can be clicked again.\n document.getElementById(\"spin_button\").disabled = false;\n}", "function spin(){\nchange -= turn;\ndraw();\n}", "function startSpin()\n{\n if (localStorage.clickcount && localStorage.clickcount >= 50) {\n localStorage.clickcount = Number(localStorage.clickcount)-50;\n document.getElementById(\"money-bani\").innerHTML = localStorage.clickcount + \" BANI\";\n // Ensure that spinning can't be clicked again while already running.\n if (wheelSpinning == false) {\n // Based on the power level selected adjust the number of spins for the wheel, the more times is has\n // to rotate with the duration of the animation the quicker the wheel spins.\n if (wheelPower == 1) {\n theWheel.animation.spins = 3;\n } else if (wheelPower == 2) {\n theWheel.animation.spins = 8;\n } else if (wheelPower == 3) {\n theWheel.animation.spins = 15;\n }\n\n // Begin the spin animation by calling startAnimation on the wheel object.\n theWheel.startAnimation();\n // document.getElementById('spin_button').disabled = \"true\";\n\n // Set to true so that power can't be changed and spin button re-enabled during\n // the current animation. The user will have to reset before spinning again.\n wheelSpinning = true;\n document.getElementById(\"spin_button\").disabled = true;\n }\n }\n else {\n alert(\"Nu mai ai bani!\");\n }\n}", "function setSpinner(son, mom, base, speed){\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t// spin 360\r\n\tvar autospin, posXori = 1, mdown=false, posXori, tickAmount = speed, autoId = 0;\r\n\t \r\n\tfunction moveBack(){\r\n\t\ti++;\r\n\t\tif(i > spinMax - 1){\r\n\t\t\ti=0;\r\n\t\t}\r\n\t\tspinner(i)\r\n\t}\r\n\t\r\n\tfunction moveForward(){\r\n\t\ti--;\r\n\t\tif(i < 0){\r\n\t\t\ti = spinMax-1;\r\n\t\t}\r\n\t\tspinner(i);\r\n\t}\r\n\t\r\n\tmom.appendChild(son);\r\n\t\t\r\n\tspinner = function(sp){\r\n\t\t// spinner frame has all the to be spinner images on x gap space, so we can place them on x=spinId*image width, so we give illusion of spin, haha\r\n\t\t// display -none vs block- is too much on processor, using one div with images as train, moving x direction is so far, best to spin \r\n\t\tarrFrame[1].style.left = -gap*sp;\r\n\t\t//trace(sp)\r\n\t}\r\n\r\n}", "function spin()\n {\n if(Math.round(data_came['time']) != data_came['time'] || data_came['time']<1){\n callback.prizeHintNo();\n return false;\n }\n // can we spin the wheel?\n if(canSpin){\n var rounds = data_came['rounds']?parseInt(data_came['rounds']):game.rnd.between(2, 4);\n //var degrees = data_came['degrees']?data_came['degrees']:game.rnd.between(0, 360);\n var one = 360/data_prizes.length;\n var degrees = null;\n if($.isArray(data_came['prizes'])){\n if(data_came['time'] > data_came['prizes'].length){\n degrees = data_came['prizes'][game.rnd.between(0, data_came['prizes'].length-1)];\n }else{\n degrees = parseInt(data_came['prizes'][data_came['time']-1]);\n }\n }else{\n degrees = parseInt(data_came['prizes']);\n }\n if(degrees){\n degrees = parseInt(degrees*one-one+game.rnd.between(1, (one-2)>2?one-2:1));\n }else{\n data_came['time'] = 0;\n }\n //degrees = degrees?parseInt(degrees*one-one+game.rnd.between(1, (one-2)>2?one-2:1)):game.rnd.between(0, 360);\n // resetting text field\n prizeText.text = \"\";\n // before the wheel ends spinning, we already know the prize according to \"degrees\" rotation and the number of slices\n prize = slices - 1 - Math.floor(degrees / (360 / slices));\n // now the wheel cannot spin because it's already spinning\n canSpin = false;\n // animation tweeen for the spin: duration 3s, will rotate by (360 * rounds + degrees) degrees\n // the quadratic easing will simulate friction\n var spinTween = game.add.tween(wheel).to({angle: 360 * rounds + degrees}, 3000, Phaser.Easing.Quadratic.Out, true);\n // once the tween is completed, call winPrize function\n spinTween.onComplete.add(winPrize, game);\n }\n }", "handleWheel(e) {\n var angleInDegrees = this.state.deg;\n var angleInRadians = this.state.rad;\n if (e.deltaY < 0) {\n if (angleInDegrees <= Constants.MAX_DEG - Constants.BUFF_DEG && angleInDegrees >= Constants.ANGLE_OFFSET_DEG) {\n angleInDegrees = angleInDegrees + Constants.BUFF_DEG;\n angleInRadians = angleInRadians + Constants.BUFF_RAD;\n } else {\n angleInDegrees = Constants.MIN_DEG;\n angleInRadians = Constants.MIN_RAD;\n }\n } else if (e.deltaY > 0) {\n if (angleInDegrees <= Constants.MAX_DEG && angleInDegrees >= Constants.ANGLE_OFFSET_DEG + Constants.BUFF_DEG) {\n angleInDegrees = angleInDegrees - Constants.BUFF_DEG;\n angleInRadians = angleInRadians - Constants.BUFF_RAD;\n } else {\n angleInDegrees = Constants.MAX_DEG;\n angleInRadians = Constants.MAX_RAD;\n }\n }\n this.setState({\n deg: angleInDegrees,\n rad: angleInRadians\n })\n this.handleAngleChanged(angleInRadians, angleInDegrees);\n e.preventDefault();\n }", "stopRotateWheel() {\r\n let { startAngle, arc } = this.state;\r\n const { baseSize } = this.props;\r\n const canvas = this.refs.canvas;\r\n const ctx = canvas.getContext('2d');\r\n const degrees = startAngle * 180 / Math.PI + 90;\r\n const arcd = arc * 180 / Math.PI;\r\n const index = Math.floor((360 - degrees % 360) / arcd);\r\n ctx.save();\r\n ctx.font = 'bold 25px Roboto, Arial';\r\n ctx.fillStyle = 'white';\r\n const text = this.state.cuisineArr[index]\r\n ctx.fillText(text, baseSize - ctx.measureText(text).width / 2, baseSize);\r\n ctx.restore();\r\n if(this.state.spinTime === 2820){\r\n this.setState({cuisine: text, spinTime: 0})\r\n this.props.changeCuisine(text)\r\n this.toggleSpinState();\r\n }\r\n }", "function spin() {\n\tlargeImage.style.transform += \"rotate(0.1deg)\";\n\tsetInterval(spin, 40);\n}", "function resetWheel() {\n theWheel.stopAnimation(false); // Stop the animation, false as param so does not call callback function.\n theWheel.rotationAngle = 0; // Re-set the wheel angle to 0 degrees.\n theWheel.draw(); // Call draw to render changes to the wheel.\n stopSound4Ad();\n localStorage.setItem('MedFarm_StarCashBoost', 1);\n try { Enhance.logEvent('adView_RewardWheel'); } catch (err) { console.log(\"logging failed\") };\n\n lime.scheduleManager.callAfter(function () {\n document.getElementById('spin_button').src = \"images/spin_on.png\";\n document.getElementById('spin_button').style = 'width: 300px; height: 130px; margin-left: 50%; margin-top:-65px; transform:translateX(-135px);'\n document.getElementById('spin_button').className = \"clickable\";\n document.getElementById('rewardAdHider').style.display = 'none';\n document.getElementById('canvasWheel').style.opacity = 1.0;\n\n }, this, 5000);\n\n // document.getElementById('pw1').className = \"\"; // Remove all colours from the power level indicators.\n // document.getElementById('pw2').className = \"\";\n // document.getElementById('pw3').className = \"\";\n\n wheelSpinning = false; // Reset to false to power buttons and spin can be clicked again.\n }", "function spinKnob(theta) {\n $knob.removeClass();\n if (theta === 0) {\n $knob.attr(\"icon-content\", \"\\ue608\");\n } else if (theta < 90) {\n $knob.attr(\"icon-content\", \"\\ue607\");\n } else if (theta < 180) {\n $knob.attr(\"icon-content\", \"\\ue606\");\n } else if (theta < 270) {\n $knob.attr(\"icon-content\", \"\\ue605\");\n } else {\n $knob.attr(\"icon-content\", \"\\ue604\");\n }\n $indicator.css(\"transform\", \"rotate(\" + theta + \"deg)\");\n }", "function spinning() {\n\tpush();\n\ttranslate(width / 2, height / 2);\n\trotate(start3);\n\timage(plan2, 180, 180, 150, 150);\n\tstart3 += radians(2);\n\tpop();\n}", "updateWheelSpin(deltaTime) {\n\n this.wheel_back.setWheelSpinAngle(this.velocity * deltaTime * Math.PI / 2);\n this.wheel_front.setWheelSpinAngle(this.velocity * deltaTime * Math.PI / 2);\n\n }", "function startSpin(whatSpinner, direction)\n{\n\tdocument.thisLoop = setInterval(function ()\n\t{\n\t\tnextStep(whatSpinner, direction);\n\t}, 125); //125 ms\n}", "WheelRotation (inner, outer, wp, i, wheel, r){\n if(!r){\n for(let j = 1; j < wp[wheel]; j++){\n inner.push(inner.shift());\n }\n }\n return this.WheelOutput(inner, outer, i, r);\n }", "function update() {\n console.log(\"In Update\");\n // this.wheel.angle += 1;\n}", "function mouseWheel(event) {\n // Only works if vibration is on.\n if (Bubble.vibration) {\n if (event.delta > 0) {\n // Scrolled down.\n Bubble.decreaseVibrationStep();\n } else {\n // Scrolled up.\n Bubble.increaseVibrationStep();\n }\n }\n}", "function startSpin () {\t\t\n\t\t// start each reel spinning\n\t\t$('.slot-one').addClass('spinning1');\n\t\t$('.slot-two').addClass('spinning2');\n\t\t$('.slot-three').addClass('spinning3');\t\t\n\t\t// stop reels\n\t\tstopSpin();\n\t}", "incrementRotor(){if(this.bias<25){this.bias+=1;}else{this.bias=0;}}", "function wheel(event) {\n\t\tvar \tevent = window.event || event, // old IE support\n\t\t\t\tdelta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));\n\t\tadd_speed( delta*options.wheel_mutiplier );\n\t\tinit_inertia();\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}", "spin() {\n if (this.balanceValue - this.betValue >= 0) {\n this.setWinValue(0);\n this.machine.spinReels();\n let balance = Math.round((this.balanceValue) * 10) / 10 - Math.round((this.betValue) * 10) / 10;\n this.setBalance(Math.round(balance * 10) / 10);\n if (this.balanceValue == 0) {\n this.btnSpin.interactive = false;\n }\n }\n }", "spinWheel() {\n\n if (!_extra && (_rb + _gb < 10000)) {\n swal({\n title: \"Số dư không đủ\",\n text: \"Bạn có muốn nạp tiền ngay?\",\n type: \"warning\",\n showCancelButton: !0,\n confirmButtonText: \"Nạp ngay\",\n cancelButtonText: \"Hủy\"\n }).then(function (e) {\n e.value && (window.location.href = Utils.UrlRoot + 'user/cashin')\n });\n return;\n }\n\n // can we spin the wheel?\n if (this.canSpin) {\n this.prizeText.setText(\"\");\n\n // the wheel will spin round from 2 to 4 times. This is just coreography\n var rounds = Phaser.Math.Between(2, 4);\n\n // then will rotate by a random number from 0 to 360 degrees. This is the actual spin\n var degrees = 1;\n var desc;\n\n var cur_gb = _gb;\n var cur_rb = _rb;\n if(!_extra) {\n if (cur_gb >= 10) {\n numberChangeAnimation(cur_gb, cur_gb - 10, 'game_balance');\n cur_gb -= 10;\n } else {\n numberChangeAnimation(cur_rb, cur_rb - 10, 'real_balance');\n }\n }\n\n showLoading();\n $.ajax({\n type: \"POST\",\n url: Utils.UrlRoot + 'user/playWheelGame',\n async: false, \n success: function (data) {\n if (data.ResponseCode >= 0) {\n degrees = data.Position;\n desc = data.Description;\n _rb = data.rb;\n _gb = data.gb;\n if(_extra) _gb += 10;\n _extra = data.Bonus;\n\n } else if (data.ResponseCode === -1) {\n swal({\n title: \"Số dư không đủ\",\n text: \"Bạn có muốn nạp tiền ngay?\",\n type: \"warning\",\n showCancelButton: !0,\n confirmButtonText: \"Nạp ngay\",\n cancelButtonText: \"Hủy\"\n }).then(function (e) {\n e.value && (window.location.href = Utils.UrlRoot + 'user/cashin')\n });\n\n } else {\n swal(\"Thất bại!\", data.Description, \"warning\");\n }\n hideLoading();\n }\n }).fail(function () {\n swal(\"Thất bại!\", 'Hệ thống đang bận, vui lòng thử lại sau!', \"warning\");\n hideLoading();\n });\n // resetting text field\n \n // before the wheel ends spinning, we already know the prize according to \"degrees\" rotation and the number of slices\n// var prize = gameOptions.slices - 1 - Math.floor(degrees / (360 / gameOptions.slices));\n\n // now the wheel cannot spin because it's already spinning\n this.canSpin = false;\n\n // animation tweeen for the spin: duration 3s, will rotate by (360 * rounds + degrees) degrees\n // the quadratic easing will simulate friction\n this.tweens.add({\n\n // adding the wheel to tween targets\n targets: [this.wheel],\n\n // angle destination\n angle: 360 * rounds + degrees,\n\n // tween duration\n duration: gameOptions.rotationTime,\n\n // tween easing\n ease: \"Cubic.easeOut\",\n\n // callback scope\n callbackScope: this,\n\n // function to be executed once the tween has been completed\n onComplete: function (tween) {\n\n // displaying prize text\n this.prizeText.setText(desc);\n\n // Header balance\n numberChangeAnimation(cur_gb, _gb, 'game_balance');\n\n // player can spin again\n this.canSpin = true;\n\n }\n });\n }\n }", "function Update () {\n\tif (Input.GetKeyDown (KeyCode.S))\n onoff = !onoff;\n\n if (onoff == true)\n \tif(Input.GetKeyDown (KeyCode.L))\n\t\t\ttransform.Rotate(spinx,spiny,spinz);\n}", "function normalizeWheel( /*object*/event) /*object*/{\n\t // Reasonable defaults\n\t var PIXEL_STEP = 10;\n\t var LINE_HEIGHT = 40;\n\t var PAGE_HEIGHT = 800;\n\n\t var sX = 0,\n\t sY = 0,\n\t // spinX, spinY\n\t pX = 0,\n\t pY = 0; // pixelX, pixelY\n\n\t // Legacy\n\t if ('detail' in event) {\n\t sY = event.detail;\n\t }\n\t if ('wheelDelta' in event) {\n\t sY = -event.wheelDelta / 120;\n\t }\n\t if ('wheelDeltaY' in event) {\n\t sY = -event.wheelDeltaY / 120;\n\t }\n\t if ('wheelDeltaX' in event) {\n\t sX = -event.wheelDeltaX / 120;\n\t }\n\n\t // side scrolling on FF with DOMMouseScroll\n\t if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n\t sX = sY;\n\t sY = 0;\n\t }\n\n\t pX = sX * PIXEL_STEP;\n\t pY = sY * PIXEL_STEP;\n\n\t if ('deltaY' in event) {\n\t pY = event.deltaY;\n\t }\n\t if ('deltaX' in event) {\n\t pX = event.deltaX;\n\t }\n\n\t if ((pX || pY) && event.deltaMode) {\n\t if (event.deltaMode === 1) {\n\t // delta in LINE units\n\t pX *= LINE_HEIGHT;\n\t pY *= LINE_HEIGHT;\n\t } else {\n\t // delta in PAGE units\n\t pX *= PAGE_HEIGHT;\n\t pY *= PAGE_HEIGHT;\n\t }\n\t }\n\n\t // Fall-back if spin cannot be determined\n\t if (pX && !sX) {\n\t sX = pX < 1 ? -1 : 1;\n\t }\n\t if (pY && !sY) {\n\t sY = pY < 1 ? -1 : 1;\n\t }\n\n\t return {\n\t spinX: sX,\n\t spinY: sY,\n\t pixelX: pX,\n\t pixelY: pY\n\t };\n\t }", "function mouseWheel() {\n g = g + 10;\n}", "function Wheel(id, slice_num, time_quantum, friction_sec, minimum_friction_sec, omega_base_sec, omega_var_sec, clockwise, safe_ratio) {\n this.id = id;\n this.element = document.getElementById(id);\n this.jquery_obj = $('#' + id);\n this.slice_num = slice_num\n this.time_quantum = time_quantum;\n this.friction_coeff = friction_sec / omega_base_sec / time_quantum;\n this.minimum_friction = friction_sec / time_quantum;\n this.omega_base = omega_base_sec / time_quantum;\n this.omega_var = omega_var_sec / time_quantum;\n this.clockwise = clockwise;\n this.slice_degree = 360 / slice_num;\n this.lower_safe_boundary = this.slice_degree * safe_ratio / 2;\n this.upper_safe_boundary = this.slice_degree * (1 - safe_ratio / 2);\n this.theta = 0;\n this.omega = 0;\n this.rotating = false;\n this.complete = true;\n this.timer = null;\n\n this.rotate = function() {\n this.rotating = true;\n if(this.complete) {\n this.omega = this.omega_base + (Math.random() - 0.5) * this.omega_var;\n this.complete = false;\n\n /**\n * Simulation\n */\n var sim_omega = this.omega;\n var sim_theta = this.theta;\n while(sim_omega>0) {\n sim_theta += this.clockwise ? sim_omega : -sim_omega;\n sim_omega -= Math.max(this.friction_coeff * sim_omega, this.minimum_friction);\n }\n\n var effective_theta = sim_theta >= 0 ? sim_theta % 360 : (-sim_theta) % 360;\n\n // Handle the pre-set results\n if(round < RESULTS.length) {\n var target = RESULTS[round];\n if(target) {\n var target_slice = target[this.id];\n var slice;\n if(this.clockwise) {\n slice = slice_num - Math.floor((effective_theta + this.slice_degree / 2.0) / this.slice_degree) + 1;\n }\n else {\n slice = Math.floor((effective_theta + this.slice_degree / 2.0) / this.slice_degree) + 1;\n }\n if(slice != target_slice) {\n this.theta -= this.slice_degree * (target_slice - slice);\n }\n }\n }\n\n // Make sure the wheel stop as center of a slice\n var center_deviation = effective_theta % this.slice_degree;\n if(center_deviation > this.lower_safe_boundary && center_deviation < this.upper_safe_boundary) {\n var boundary = (this.lower_safe_boundary + this.upper_safe_boundary) / 2;\n if(center_deviation < boundary) {\n this.theta -= (center_deviation - this.lower_safe_boundary) * (this.clockwise ? 1 : -1);\n }\n else {\n this.theta += (this.upper_safe_boundary - center_deviation) * (this.clockwise ? 1 : -1);\n }\n }\n }\n\n var wheel = this;\n this.timer = setInterval(function() {\n wheel.theta += wheel.clockwise ? wheel.omega : -wheel.omega;\n wheel.jquery_obj.rotate(wheel.theta);\n\n var deceleration = Math.max(wheel.friction_coeff * wheel.omega, wheel.minimum_friction);\n if(wheel.omega <= deceleration) {\n clearInterval(wheel.timer);\n wheel.timer = null;\n wheel.complete = true;\n wheel.rotating = false;\n }\n else {\n wheel.omega -= deceleration;\n }\n }, this.time_quantum);\n }\n\n this.pause = function() {\n if(this.timer && !this.complete) {\n clearInterval(this.timer);\n this.timer = null;\n this.rotating = false;\n }\n }\n\n return this;\n}", "function spin(reel1, reel2, timeout) {\n\tvar seconds = 0;\n\tvar timer = setInterval(setTime, 500);\t// For counting the elapsed spin time\n\tfunction setTime() {\n\t\tseconds += 500;\n\t}\n\tvar pos1 = 0;\n\tvar pos2 = -605;\n\tif (timeout == 3000) {\t\t\t// In case of previous spin,\n\t\tpos1 = tempPos31;\t\t\t// assign old positions\n\t\tpos2 = tempPos32;\t\t\t// so spinning continues from there.\n\t} else if (timeout == 2500) {\n\t\tpos1 = tempPos21;\n\t\tpos2 = tempPos22;\n\t} else if (timeout == 2000) {\n\t\tpos1 = tempPos11;\n\t\tpos2 = tempPos12;\n\t}\n\tvar time = Math.floor((Math.random() * 10) + 1) * 10;\t// Spinning speed is random\n\tvar interval = setInterval(frame, time);\n\tfunction frame() {\n\t\tif (seconds == timeout) {\n\t\t\tclearInterval(interval);\n\t\t\twhile (pos1 != 0 && pos1 != 60 && pos1 != 121 &&\n\t\t\t\t\tpos1 != 181 && pos1 != 242 && pos1 != 302 &&\n\t\t\t\t\tpos1 != 363 && pos1 != 423 && pos1 != 484 &&\n\t\t\t\t\tpos1 != 544 && pos1 != 605) {\t\t// Budge reel until it is aligned\n\t\t\t\tpos1++;\n\t\t\t\tpos2++;\n\t\t\t\treel1.style.top = pos1 + \"px\";\n\t\t\t\treel2.style.top = pos2 + \"px\";\n\t\t\t}\n\t\t\tif (timeout == 3000) {\t\t\t\t\t\t// When last reel has stopped,\n\t\t\t\tgetEl(\"spin\").disabled = false;\t\t\t// allow to click buttons\n\t\t\t\tgetEl(\"balance\").disabled = false;\t\t// and change balance.\n\t\t\t\tgetEl(\"debug\").disabled = false;\n\t\t\t\ttempPos31 = pos1;\n\t\t\t\ttempPos32 = pos2;\n\t\t\t} else if (timeout == 2500) {\n\t\t\t\ttempPos21 = pos1;\n\t\t\t\ttempPos22 = pos2;\n\t\t\t} else if (timeout == 2000) {\n\t\t\t\ttempPos11 = pos1;\n\t\t\t\ttempPos12 = pos2;\n\t\t\t}\n\t\t} else {\t\t\t\t\t\t\t\t\t// If one div column with images reaches top,\n\t\t\tif (pos2 == 0) {\t\t\t\t\t\t// immediately add lower one above it\n\t\t\t\tpos1 = -605;\t\t\t\t\t\t// so they would make an illusion\n\t\t\t\treel1.style.top = pos1 + \"px\";\t\t// of a continuous spin.\n\t\t\t} else if (pos1 == 0) {\n\t\t\t\tpos2 = -605;\n\t\t\t\treel2.style.top = pos2 + \"px\";\n\t\t\t}\n\t\t\tpos1++;\n\t\t\tpos2++;\n\t\t\treel1.style.top = pos1 + \"px\";\n\t\t\treel2.style.top = pos2 + \"px\";\n\t\t\trequestAnimationFrame(frame);\n\t\t}\n\t}\n}", "function spin() {\n start.src = './img/blur.png';\n start.classList.add('spin');\n speak();\n setTimeout(function() {\n start.classList.remove('spin');\n }, 1000);\n \n}", "function animateSpin () {\n //these equations move points A(x,y), B(x,y), C(x,y), and D(a,y) accross the screen\n //based on n (the spin counter), d (the direction of spin), and the scale\n\n //this constant is used to scale the wall relative to the size of the canvas\n const SCALE = 0.9;\n\n //move the keypoints if spinning clockwise\n if (d != 1) {\n //for the first half of the turn (0-45deg)...\n if (n < 45) {\n ax = bx = (canvasWidth*(1-SCALE))-(canvasWidth*(1-SCALE)*(n/45));\n cx = dx = (canvasWidth*(1-SCALE))+(canvasWidth*(SCALE-(1-SCALE))*(1-(n/90)));\n ay = canvasHeight*(1-SCALE)*(1-(n/45));\n by = canvasHeight-(canvasHeight*(1-SCALE)*(1-(n/45)));\n cy = canvasHeight*(1-SCALE)+(canvasHeight*(1-SCALE)*(n/45));\n dy = canvasHeight*SCALE-(canvasHeight*(1-SCALE)*(n/45));\n }\n\n //and for the second half of the turn (45-90deg)\n else if (n >= 45) {\n ax = bx = canvasWidth-(canvasWidth*(1-SCALE)*((n-45)/45));\n cx = dx = (canvasWidth*(1-SCALE))+(canvasWidth*(SCALE-(1-SCALE))*(1-(n/90)));\n ay = canvasHeight*(1-SCALE)*((n-45)/45);\n by = canvasHeight-(canvasHeight*(1-SCALE)*((n-45)/45));\n cy = canvasHeight*(1-SCALE)+(canvasHeight*(2*(1-SCALE))*(1-(n/90)));\n dy = canvasHeight*SCALE-(canvasHeight*(2*(1-SCALE))*(1-(n/90)));\n }\n }\n\n //move keypoints if spinning counter clockwise\n else {\n //for the first half of the turn (0-45deg)...\n if (n < 45) {\n ax = bx = (canvasWidth*(1-SCALE))+(canvasWidth*(SCALE-(1-SCALE))*(n/90));\n cx = dx = (canvasWidth*(1-SCALE))-(canvasWidth*(1-SCALE)*(1-(n/45)))+(canvasWidth*(SCALE));\n ay = canvasHeight*(1-SCALE)+(canvasHeight*(1-SCALE)*(n/45));\n by = canvasHeight*SCALE-(canvasHeight*(1-SCALE)*(n/45));\n cy = canvasHeight*(1-SCALE)*(1-(n/45));\n dy = canvasHeight-(canvasHeight*(1-SCALE)*(1-(n/45)));\n }\n\n //and for the second half of the turn (45-90deg)\n else if (n >= 45) {\n ax = bx = (canvasWidth*(1-SCALE))+(canvasWidth*(SCALE-(1-SCALE))*(n/90));\n cx = dx = (canvasWidth*(1-SCALE)*((n-45)/45));\n ay = canvasHeight*(1-SCALE)+(canvasHeight*(2*(1-SCALE))*(1-(n/90)));\n by = canvasHeight*SCALE-(canvasHeight*(2*(1-SCALE))*(1-(n/90)));\n cy = canvasHeight*(1-SCALE)*((n-45)/45);\n dy = canvasHeight-(canvasHeight*(1-SCALE)*((n-45)/45));\n }\n }\n\n //creating errors for the navy room\n if (r == 35 && solved != true) {\n if (d != 1 && n < 45) {\n by = canvasHeight-(canvasHeight*(SCALE)*(1-(n/45)));\n }\n if (d == 1 && n < 45) {\n cy = canvasHeight*(SCALE)*(1-(n/45));\n }\n }\n\n //set the canvas as the drawing stage\n stage = new createjs.Stage(\"canvas\");\n\n //animate each of the lines that make up the spinning room\n for (var l = 0; l < 8; l++) {\n animateRoomLines (l);\n }\n\n //animate any holes\n animateHoles ();\n\n //animate moving through a hole\n if (m != 0) {\n animateMove ();\n }\n\n //set the room to its colour\n $('#canvas').css({\n 'background-color': room[r][4]\n })\n\n}", "function spin2() {\n start.src = './img/mortis.png';\n start.classList.add('spin2');\n laugh();\n setTimeout(function() {\n start.classList.remove('spin2');\n }, 1000);\n \n}", "function normalizeWheel( /*object*/event) /*object*/{\n\t // Reasonable defaults\n\t var PIXEL_STEP = 10;\n\t var LINE_HEIGHT = 40;\n\t var PAGE_HEIGHT = 800;\n\t\n\t var sX = 0,\n\t sY = 0,\n\t // spinX, spinY\n\t pX = 0,\n\t pY = 0; // pixelX, pixelY\n\t\n\t // Legacy\n\t if ('detail' in event) {\n\t sY = event.detail;\n\t }\n\t if ('wheelDelta' in event) {\n\t sY = -event.wheelDelta / 120;\n\t }\n\t if ('wheelDeltaY' in event) {\n\t sY = -event.wheelDeltaY / 120;\n\t }\n\t if ('wheelDeltaX' in event) {\n\t sX = -event.wheelDeltaX / 120;\n\t }\n\t\n\t // side scrolling on FF with DOMMouseScroll\n\t if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n\t sX = sY;\n\t sY = 0;\n\t }\n\t\n\t pX = sX * PIXEL_STEP;\n\t pY = sY * PIXEL_STEP;\n\t\n\t if ('deltaY' in event) {\n\t pY = event.deltaY;\n\t }\n\t if ('deltaX' in event) {\n\t pX = event.deltaX;\n\t }\n\t\n\t if ((pX || pY) && event.deltaMode) {\n\t if (event.deltaMode === 1) {\n\t // delta in LINE units\n\t pX *= LINE_HEIGHT;\n\t pY *= LINE_HEIGHT;\n\t } else {\n\t // delta in PAGE units\n\t pX *= PAGE_HEIGHT;\n\t pY *= PAGE_HEIGHT;\n\t }\n\t }\n\t\n\t // Fall-back if spin cannot be determined\n\t if (pX && !sX) {\n\t sX = pX < 1 ? -1 : 1;\n\t }\n\t if (pY && !sY) {\n\t sY = pY < 1 ? -1 : 1;\n\t }\n\t\n\t return {\n\t spinX: sX,\n\t spinY: sY,\n\t pixelX: pX,\n\t pixelY: pY\n\t };\n\t }", "RotateWheels(w){\n w[2]++;\n\n if(w[2]>26){\n w[2] = 1;\n w[1]++;\n }\n\n if(w[1]>26){\n w[1] = 1;\n w[0]++;\n }\n\n if(w[0]>26){\n w[0] = 1;\n }\n\n return (w);\n }", "function startSpin(id) {\n\t\t\treturn function() {\t\t\n\t\t\t\tvar animation = mSpinners[id];\n\t\t\t\t\n\t\t\t\t// Start the webkit animation\n\t\t\t\tanimation.startTime = Date.now();\n\t\t\t\tanimation.element.style.webkitTransform = \"rotateY(\"+animation.degrees+\"deg)\";\n\t\t\t\t\n\t\t\t\t// Start our loop\n\t\t\t\tsetTimeout(spinLoop(id), 0);\n\t\t\t}\n\t\t}", "function mouseWheel() {\n song.play();\n song.loop();\n song.volume(5);\n}", "function wheel(ev, gl, canvas){\r\n var scroll = ev.deltaY;\r\n \r\n if(buttonE && currPick!=null){\r\n scaleObj(scroll);\r\n }else if(buttonE && currPick===null){\r\n if(lastButton===2){ //right mouse click\r\n moveCamera(scroll);\r\n }else{\r\n zoom(scroll);\r\n }\r\n }\r\n \r\n return false;\r\n}", "function wheel(event) {\n var delta = 0;\n if (event.wheelDelta) {(delta = event.wheelDelta / 120);}\n else if (event.detail) {(delta = -event.detail / 3);}\n\n handle(delta);\n if (event.preventDefault) {(event.preventDefault());}\n event.returnValue = false;\n}", "function onTick() {\n\t\tdrawWheel();\n\n\t\tvelocity += acceleration;\n\t\tif (velocity > targetVelocity) {\n\t\t\tvelocity = targetVelocity;\n\t\t\tacceleration = 0;\n\t\t}\n\n\t\tif (velocity < 0) {\n\t\t\tif (firstOfApril) {\n\t\t\t\tactiveSegment[0] = \"Der Dozent\";\n\t\t\t\tdrawWheel();\n\t\t\t}\n\t\t\tthat.stopSpinning();\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentAngle -= velocity;\n\t\tcurrentAngle = modulo(currentAngle, 360);\n\t}", "spinTo(angle) {\n const {hubContext} = this;\n const r = maxCusps - this.cusps;\n hubContext.transform({\n pos: [-maxCusps + r * Math.cos(angle), r * Math.sin(angle)],\n rot: -(maxCusps / this.cusps - 1) * angle,\n });\n }", "function screenSpin() {\r\n\tif (allStatsLoaded) {\r\n\t\tshakeWrapper.classList.remove(\"spin\");\r\n\t\t//pause for one frame to allow update\r\n\t\tvoid shakeWrapper.offsetWidth;\r\n\t\tshakeWrapper.classList.add(\"spin\");\r\n\t}\r\n}", "function makeSpin(elem) {\n\n return spinner;\n}", "mouseWheel(_delta) {}", "function singleSpin() {\n if((bet_i>cash_i) || (bet_i===0)){\n bet.className=\"error\";\n stoploop_i = true;\n return stoploop_i;\n }\n\n spin_i++;\n if (rouletteBlackRed()){\n cash_i+=bet_i;\n win_i++;\n\n if(onwin_i===0) {\n stoploop_i = true;\n }\n else {\n bet_i = Math.floor(bet_i * onwin_i);\n }\n }\n else {\n cash_i-=bet_i;\n lose_i++;\n\n if(onlose_i===0) {\n stoploop_i = true;\n }\n else {\n bet_i = Math.floor(bet_i * onlose_i);\n }\n }\n return stoploop_i;\n }", "function handleRotorSpeed(newValue)\n{\n rot = newValue;\n r = rot * 0.8;\t\n PIErender();\n}", "function draw_wheel(car, x, y, rotate)\r\n {\r\n ctx.save();\r\n ctx.translate(x, y);\r\n if (rotate)\r\n {\r\n ctx.rotate(-car.turn_angle);\r\n }\r\n const w = car.size[0]/4;\r\n const l = car.size[1]/4;\r\n\r\n ctx.fillRect(-w/2, -l/2, w, l)\r\n\r\n // ctx.globalAlpha = 0.1;\r\n // draw_line_list(ctx, [[-500, 0], [500, 0]]);\r\n\r\n ctx.restore();\r\n }", "function spin () {\n $(document).keydown(function (event){\n\n //dont allow the user to start a new spinning interval if they are\n //already spinning or moving\n if (n != 0 || m != 0) {}\n\n //if the right arrow key is pressed down spin clockwise\n else if (event.which == 39) {\n //clockwise, d = 0\n d = 0;\n spinning = setInterval(rotate, SPIN_INT);\n }\n\n //if the left arrow key is pressed down spin counter clockwise\n else if (event.which == 37) {\n //counter clockwise, d = 1\n d = 1;\n spinning = setInterval(rotate, SPIN_INT);\n }\n\n //if the up arrow key is pressed down move forward\n else if (event.which == 38 && room[r][f] != null) {\n moving = setInterval(forward, MOVE_INT);\n }\n });\n}", "function normalizeWheel( /*object*/event) /*object*/{\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n\n var sX = 0,\n sY = 0,\n // spinX, spinY\n pX = 0,\n pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function spinLoop(id) {\n\t\treturn function() {\n\t\t\tvar animation = mSpinners[id];\n\n\t\t\t// Get current time\n\t\t\tvar now = Date.now();\n\t\t\tvar t = (now - animation.startTime) / ( animation.duration*1000 );\n\n\t\t\t// Calculate curve and solved time\n\t\t\tvar curve = new UnitBezier(animation.curve.a, \n\t\t\t\tanimation.curve.b, animation.curve.c, animation.curve.d);\n\t\t\tvar t1 = curve.solve(t, UnitBezier.prototype.epsilon);\n\t\t\tvar s1 = 1.0-t1;\n\n\t\t\t// Lerp using solved time\n\t\t var currentAngle = (animation.degrees * t1); //(animation.startAngle * s1) + (animation.endAngle * t1);\n\t\t triggerAngleEvents(animation, currentAngle);\n\t\t\t\n\t\t\t// Reset timeout\n\t\t\tanimation.timeout = setTimeout( spinLoop(id), 60/1000 );\n\t\t}\n\t}", "function normalizeWheel( /*object*/ event ) /*object*/ {\r\n // Reasonable defaults\r\n var PIXEL_STEP = 10;\r\n var LINE_HEIGHT = 40;\r\n var PAGE_HEIGHT = 800;\r\n \r\n var sX = 0, sY = 0, // spinX, spinY\r\n pX = 0, pY = 0; // pixelX, pixelY\r\n \r\n // Legacy\r\n if( 'detail' in event ) {\r\n sY = event.detail;\r\n }\r\n if( 'wheelDelta' in event ) {\r\n sY = -event.wheelDelta / 120;\r\n }\r\n if( 'wheelDeltaY' in event ) {\r\n sY = -event.wheelDeltaY / 120;\r\n }\r\n if( 'wheelDeltaX' in event ) {\r\n sX = -event.wheelDeltaX / 120;\r\n }\r\n \r\n // side scrolling on FF with DOMMouseScroll\r\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\r\n sX = sY;\r\n sY = 0;\r\n }\r\n \r\n pX = sX * PIXEL_STEP;\r\n pY = sY * PIXEL_STEP;\r\n \r\n if( 'deltaY' in event ) {\r\n pY = event.deltaY;\r\n }\r\n if( 'deltaX' in event ) {\r\n pX = event.deltaX;\r\n }\r\n \r\n if( (pX || pY) && event.deltaMode ) {\r\n if( event.deltaMode === 1 ) { // delta in LINE units\r\n pX *= LINE_HEIGHT;\r\n pY *= LINE_HEIGHT;\r\n } else { // delta in PAGE units\r\n pX *= PAGE_HEIGHT;\r\n pY *= PAGE_HEIGHT;\r\n }\r\n }\r\n \r\n // Fall-back if spin cannot be determined\r\n if( pX && !sX ) {\r\n sX = (pX < 1) ? -1 : 1;\r\n }\r\n if( pY && !sY ) {\r\n sY = (pY < 1) ? -1 : 1;\r\n }\r\n \r\n return {\r\n spinX: sX,\r\n spinY: sY,\r\n pixelX: pX,\r\n pixelY: pY\r\n };\r\n }", "spinReels() {\n this.currentReel = 0;\n let timeout = 0;\n for (let reel of this.reels) {\n setTimeout(reel.spin.bind(reel), timeout);\n timeout += 300;\n }\n setTimeout(this.stopReels.bind(this), 1500);\n }", "function FixedUpdate () {\n\twheelFR.motorTorque = maxTorque * Input.GetAxis(\"Vertical\");\n\twheelFL.motorTorque = maxTorque * Input.GetAxis(\"Vertical\");\n\n\twheelRL.motorTorque = maxTorque * Input.GetAxis(\"Vertical\");\n\twheelRR.motorTorque = maxTorque * Input.GetAxis(\"Vertical\");\n\n\twheelRL.steerAngle = max_steerAngle * -Input.GetAxis(\"Horizontal\");\n\twheelRR.steerAngle = max_steerAngle * -Input.GetAxis(\"Horizontal\");\n\t\n}", "function rotateKnob(knob) {\n var interval = setInterval(function () {\n knob.angle += 1;\n if (knob.angle >= -36 && knob.angle <= -34) {\n clearInterval(interval);\n }\n }, 4);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n } // Combination Functions", "onSpinStart() {\n this.spinButton.prop( \"disabled\", true );\n console.log('Spinning');\n }", "function spin(color, amount) {\n\t\t\tvar hsl = tinycolor(color).toHsl();\n\t\t\tvar hue = (mathRound(hsl.h) + amount) % 360;\n\t\t\thsl.h = hue < 0 ? 360 + hue : hue;\n\t\t\treturn tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t\t\tvar hsl = tinycolor(color).toHsl();\n\t\t\tvar hue = (mathRound(hsl.h) + amount) % 360;\n\t\t\thsl.h = hue < 0 ? 360 + hue : hue;\n\t\t\treturn tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "static _accelerate(car) { //turns the wheels faster and faster\n return function() {\n console.log(car._speed);\n if(car._speed < 2) {\n //turning the wheel\n car._speed += 0.02;\n car._carBody.animationSpeed = car._speed;\n if(!car._carBody.playing) car._carBody.gotoAndPlay(car._carBody.currentFrame);\n //firing the engine\n car._engine.animationSpeed = (car._speed < 0.6)? car._speed - 0.1 : 0.5\n }\n }\n }", "function colorwheel(a,theta,x){return a*(1+cos(theta+x))}", "function normalizeWheel( /*object*/ event ) /*object*/ {\r\n // Reasonable defaults\r\n var PIXEL_STEP = 10;\r\n var LINE_HEIGHT = 40;\r\n var PAGE_HEIGHT = 800;\r\n\r\n var sX = 0, sY = 0, // spinX, spinY\r\n pX = 0, pY = 0; // pixelX, pixelY\r\n\r\n // Legacy\r\n if( 'detail' in event ) {\r\n sY = event.detail;\r\n }\r\n if( 'wheelDelta' in event ) {\r\n sY = -event.wheelDelta / 120;\r\n }\r\n if( 'wheelDeltaY' in event ) {\r\n sY = -event.wheelDeltaY / 120;\r\n }\r\n if( 'wheelDeltaX' in event ) {\r\n sX = -event.wheelDeltaX / 120;\r\n }\r\n\r\n // side scrolling on FF with DOMMouseScroll\r\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\r\n sX = sY;\r\n sY = 0;\r\n }\r\n\r\n pX = sX * PIXEL_STEP;\r\n pY = sY * PIXEL_STEP;\r\n\r\n if( 'deltaY' in event ) {\r\n pY = event.deltaY;\r\n }\r\n if( 'deltaX' in event ) {\r\n pX = event.deltaX;\r\n }\r\n\r\n if( (pX || pY) && event.deltaMode ) {\r\n if( event.deltaMode === 1 ) { // delta in LINE units\r\n pX *= LINE_HEIGHT;\r\n pY *= LINE_HEIGHT;\r\n } else { // delta in PAGE units\r\n pX *= PAGE_HEIGHT;\r\n pY *= PAGE_HEIGHT;\r\n }\r\n }\r\n\r\n // Fall-back if spin cannot be determined\r\n if( pX && !sX ) {\r\n sX = (pX < 1) ? -1 : 1;\r\n }\r\n if( pY && !sY ) {\r\n sY = (pY < 1) ? -1 : 1;\r\n }\r\n\r\n return {\r\n spinX: sX,\r\n spinY: sY,\r\n pixelX: pX,\r\n pixelY: pY\r\n };\r\n }", "function _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n } // Combination Functions", "function Wheel(radius) {\n this.radius = radius;\n }", "rotate(rotateAmount) {\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function normalizeWheel( /*object*/ event ) /*object*/ {\n // Reasonable defaults\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n \n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n \n // Legacy\n if( 'detail' in event ) {\n sY = event.detail;\n }\n if( 'wheelDelta' in event ) {\n sY = -event.wheelDelta / 120;\n }\n if( 'wheelDeltaY' in event ) {\n sY = -event.wheelDeltaY / 120;\n }\n if( 'wheelDeltaX' in event ) {\n sX = -event.wheelDeltaX / 120;\n }\n \n // side scrolling on FF with DOMMouseScroll\n if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n \n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n \n if( 'deltaY' in event ) {\n pY = event.deltaY;\n }\n if( 'deltaX' in event ) {\n pX = event.deltaX;\n }\n \n if( (pX || pY) && event.deltaMode ) {\n if( event.deltaMode === 1 ) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n \n // Fall-back if spin cannot be determined\n if( pX && !sX ) {\n sX = (pX < 1) ? -1 : 1;\n }\n if( pY && !sY ) {\n sY = (pY < 1) ? -1 : 1;\n }\n \n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (mathRound(hsl.h) + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "drawRouletteWheel() {\r\n const { baseSize } = this.props;\r\n let { startAngle, arc } = this.state;\r\n let ctx;\r\n const canvas = this.refs.canvas;\r\n if (canvas.getContext) {\r\n const outsideRadius = baseSize - 205;\r\n const textRadius = baseSize - 45;\r\n const insideRadius = baseSize - 55;\r\n ctx = canvas.getContext('2d');\r\n ctx.clearRect(0,0,600,600);\r\n ctx.strokeStyle = 'white';\r\n ctx.lineWidth = 2;\r\n ctx.font = '14px Helvetica, Arial';\r\n\r\n //The section below controls the creation of the RouletteWheel\r\n for(let i = 0; i < this.state.cuisineArr.length; i++) {\r\n const angle = startAngle + i * arc;\r\n ctx.fillStyle = this.getColor(i, this.state.cuisineArr.length);\r\n ctx.beginPath();\r\n ctx.arc(baseSize, baseSize, outsideRadius, angle, angle + arc, false);\r\n ctx.arc(baseSize, baseSize, insideRadius, angle + arc, angle, true);\r\n ctx.fill();\r\n ctx.save();\r\n ctx.fillStyle = 'white';\r\n ctx.translate(baseSize + Math.cos(angle + arc / 2) * textRadius,\r\n baseSize + Math.sin(angle + arc / 2) * textRadius);\r\n ctx.rotate(angle + arc / 2 + Math.PI / 2);\r\n const text = this.state.cuisineArr[i];\r\n ctx.fillText(text, -ctx.measureText(text).width / 2, 0);\r\n ctx.restore();\r\n }\r\n \r\n //The section below controls the creation and styling for the RouletteWheel arrow symbol.\r\n ctx.fillStyle = 'red';\r\n ctx.beginPath();\r\n ctx.lineTo(baseSize + 10, baseSize - (insideRadius + 5));\r\n ctx.lineTo(baseSize + 0, baseSize - (insideRadius - 20));\r\n ctx.lineTo(baseSize - 10, baseSize - (insideRadius + 5));\r\n ctx.fill();\r\n ctx.stroke();\r\n }\r\n }", "function mouseWheel(event) {\n pos += event.delta;\n}", "function wheel(event){\n var delta = 0;\n if (!event) /* For IE. */\n event = window.event;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta/120;\n } else if (event.detail) { /** Mozilla case. */\n /** In Mozilla, sign of delta is different than in IE.\n * Also, delta is multiple of 3.\n */\n delta = -event.detail/3;\n }\n /** If delta is nonzero, handle it.\n * Basically, delta is now positive if wheel was scrolled up,\n * and negative, if wheel was scrolled down.\n */\n if (delta) {\n handleWheel(delta, event);\n }\n /** Prevent default actions caused by mouse wheel.\n * That might be ugly, but we handle scrolls somehow\n * anyway, so don't bother here..\n */\n if (event.preventDefault) {\n event.preventDefault();\n }\n event.returnValue = false;\n }", "function earthSpin(start, end, duration) {\n $('#globe-animate svg').animateRotate(end, { duration: duration }, start)\n}", "function _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function normalizeWheel( /*object*/event) /*object*/{\n var sX = 0,\n sY = 0,\n // spinX, spinY\n pX = 0,\n pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return { spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY };\n}", "function normalizeWheel( /*object*/event) /*object*/{\n var sX = 0,\n sY = 0,\n // spinX, spinY\n pX = 0,\n pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return { spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY };\n}", "function ferriswheel() {\n\tif (ferriswheelClicked == false) {\n\t\tdocument.getElementById('ferriswheelGo').src=ferriswheelGif.src;\n\t\tferriswheelClicked = true;\n\t} else {\n\t\tdocument.getElementById('ferriswheelGo').src=ferriswheelJpeg.src;\n\t\tferriswheelClicked = false;\n\t}\n}", "function _spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "oscillate() {\n this.angle += 0.02;\n }", "function spike_spinning() {\n var paper = new Raphael($('#mood_canvas')[0], 600, 800);\n var leaf1 = paper.circle(250, 250, 20).attr({fill: '#800'});\n var leaf2 = paper.circle(450, 250, 30).attr({fill: '#080'});\n var cycling = false;\n var cycle = function() {\n cycling = true;\n leaf1.animate({translation:\"100 0\", r: 25}, 350, function() {\n leaf1.animate({translation:\"100 0\", r: 20}, 350, function() {\n leaf1.animate({translation:\"-100 0\", r: 15}, 350, function() {\n leaf1.animate({translation:\"-100 0\", r: 20}, 350, function() {\n if(!cycling) setTimeout(cycle, 10);\n cycling = false;\n });\n }).toBack();\n });\n }).toFront();\n leaf2.animate({translation:\"-100 0\", r: 25}, 350, function() {\n leaf2.animate({translation:\"-100 0\", r: 30}, 350, function() {\n leaf2.animate({translation:\"100 0\", r: 35}, 350, function() {\n leaf2.animate({translation:\"100 0\", r: 30}, 350, function() {\n if(!cycling) setTimeout(cycle, 10);\n cycling = false;\n });\n }).toFront();\n });\n }).toBack();\n };\n cycle();\n}", "function spin1(){\n\t\ti1++;\n\t\tif (i1>=numeberReel1){\n coin[0].play();\n\t\t\tclearInterval(reel1);\n\t\t\treturn null;\n\t\t}\n\t\treelTile = document.getElementById(\"slot1\");\n\t\tif (reelTile.className==\"s1\"){\n\t\t\treelTile.className = \"s0\";\n }\n let d1 = Math.floor(Math.random() * 5) + 1;\n\t\treelTile.className = \"s\"+ d1\n }", "function createWheel(pin1, pin2) {\n function wheel(val) {\n sb.setP1Pwm(pin1, val >= 0 ? val : 0);\n sb.setP1Pwm(pin2, val <= 0 ? -val : 0);\n }\n return wheel;\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}" ]
[ "0.8116148", "0.79659086", "0.7857433", "0.77364004", "0.7736055", "0.7362735", "0.72764486", "0.72577846", "0.7248477", "0.7240495", "0.71729445", "0.7007103", "0.6978493", "0.69162196", "0.6890178", "0.6876866", "0.67674285", "0.6712242", "0.66863275", "0.6683169", "0.66782266", "0.6618427", "0.659357", "0.6589347", "0.6542324", "0.6486975", "0.6478653", "0.6478365", "0.64505655", "0.64113414", "0.63687533", "0.6327912", "0.6326016", "0.63083464", "0.62895197", "0.62811536", "0.6257075", "0.62389034", "0.6238381", "0.6222159", "0.6207731", "0.61963224", "0.61746895", "0.61685526", "0.61615777", "0.6146722", "0.61420274", "0.6107262", "0.6092383", "0.60440737", "0.60431755", "0.60262036", "0.6003317", "0.5992999", "0.5987758", "0.5981044", "0.5975989", "0.5964739", "0.59622914", "0.5958201", "0.5937702", "0.59303087", "0.59303087", "0.5928515", "0.5928515", "0.5894965", "0.5894521", "0.58899885", "0.5882331", "0.5881072", "0.587253", "0.5858998", "0.5858998", "0.5858998", "0.5858998", "0.5858998", "0.5858998", "0.5858998", "0.5858998", "0.5849396", "0.5849224", "0.5847239", "0.5844646", "0.5842934", "0.5841685", "0.58380747", "0.58380747", "0.5831808", "0.5828437", "0.5827801", "0.5826831", "0.5811086", "0.58051246", "0.5781538", "0.5781538", "0.5781538", "0.5781538", "0.5781538", "0.5781538", "0.5781538", "0.5781538" ]
0.0
-1
To perform Server side insert/update/delete operation
function save(url, data, hasAction) { if (!hasAction) { url = url + 'saveChanges'; } return $http.post(url, data).then(function (results) { data = results.data; return data; }).catch(function (ex) { throw ex; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function serverDB() {\n\n /**\n * GET parameter\n * @type {object}\n */\n var data = prepareData( { del: key }, user, password );\n\n // send dataset key to server interface\n if ( self.socket ) useWebsocket( data, onResponse ); else useHttp( data, onResponse );\n\n /**\n * callback for server response\n * @param {ccm.dataset} dataset - deleted dataset\n */\n function onResponse( dataset ) {\n\n // check server response\n if ( !checkResponse( dataset, user ) ) return;\n\n // perform callback with deleted dataset\n if ( callback ) callback( dataset );\n\n // delete dataset in local cache\n callback = undefined; localCache();\n\n }\n\n }", "static insert(request, response) {\r\n \r\n //recupera do body os campos que serao atualizados na tabela\r\n const conditions = [\r\n {\r\n field: 'name',\r\n value: request.body.name\r\n },\r\n {\r\n field: 'email',\r\n value: request.body.email\r\n },\r\n {\r\n field: 'password',\r\n value: request.body.password\r\n },\r\n {\r\n field: 'countrycode',\r\n value: request.body.countrycode\r\n },\r\n {\r\n field: 'areacode',\r\n value: request.body.areacode\r\n },\r\n {\r\n field: 'telephone',\r\n value: request.body.telephone\r\n },\r\n {\r\n field: 'zipcode',\r\n value: request.body.zipcode\r\n },\r\n ];\r\n\r\n //chama rotina para inclusao dos dados\r\n clientsModel.insert(conditions) \r\n .then( _ => {\r\n response.sendStatus(200);\r\n console.log('Client has been inserted'); \r\n })\r\n .catch(err => {\r\n response.sendStatus(500);\r\n console.log('Error inserting client', err);\r\n });\r\n \r\n }", "static insert(request, response) {\r\n \r\n //recupera do body os campos que serao atualizados na tabela\r\n const conditions = [\r\n {\r\n field: 'title',\r\n value: request.body.title\r\n },\r\n {\r\n field: 'descr',\r\n value: request.body.descr\r\n },\r\n {\r\n field: 'photo',\r\n value: request.body.photo\r\n },\r\n {\r\n field: 'category',\r\n value: request.body.category\r\n },\r\n {\r\n field: 'Owner_ID',\r\n value: request.body.Owner_ID\r\n },\r\n ];\r\n\r\n //chama rotina para inclusao dos dados\r\n itemsModel.insert(conditions) \r\n .then( _ => {\r\n response.sendStatus(200);\r\n console.log('Item has been inserted'); \r\n })\r\n .catch(err => {\r\n response.sendStatus(500);\r\n console.log('Error inserting Item', err);\r\n });\r\n \r\n }", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.GET) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"GET is not supported, perform a POST to add Entries\"\n\t\t\t}));\n\t\t} else {\n\t\t\t//Perform Table Entry to be created in Table\n\t\t\ttry {\n\t\t\t\tif (gvGuid) {\n\t\t\t\t\t_createEntries();\n\t\t\t\t}\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate\n\t\t\t}));\n\t\t}\n\t}", "function tableInsertionCallback(err) {\n if (err) {\n console.log(\"data storing error\", err);\n respondObject.status = \"data storing error\";\n res.json(respondObject);\n } else {\n console.log(\"data stored\");\n respondObject.status = \"data stored\";\n res.json(respondObject);\n //db.close();\n }\n }", "function handlePost() {\n\tvar bodyStr = $.request.body ? $.request.body.asString() : undefined;\n\tif ( bodyStr === undefined ){\n\t\t $.response.status = $.net.http.INTERNAL_SERVER_ERROR;\n\t\t return {\"myResult\":\"Missing BODY\"};\n\t}\n\t\n\tvar conn = $.db.getConnection();\n\tvar data = $.request.body.asString();\n\tvar dataParsed= JSON.parse(data);\n\t\n\tvar tableName = dataParsed.tableName;\n\tvar entryNum = dataParsed.tableData.length;\n\tvar tableData = dataParsed.tableData;\n\t\n\n\t//judge for different TABLE\n\tswitch(tableName){\n\t\n\t\tcase 'CMTBL':\n\t\t\tvar userInfo = dataParsed.userInfo;\n\t\t\t\n\t\t\t\n\t\t\tvar loopIndex = 0;\n\t\t\tvar j = 0;\n\t\t\tvar respCode = true;\n\t\t\t//var insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"CMTBL\" VALUES(?,?,?,?,?,?,?,0,?)' ); \n\t\t\t\n\t\t\tvar insertStmt = conn.prepareStatement( 'UPSERT \"SMART_OPERATION\".\"CMTBL\" VALUES(?,?,?,?,?,?,?,NULL,?) WHERE CUSTOMER_ID = ? AND SYSTEM_ID = ? AND SYSTEM_CLT = ? AND DATE_Y = ? AND DATE_M = ? AND TABLE_NAME = ?' );\n\t\t\tvar upsertStmt = conn.prepareStatement( 'upsert \"SMART_OPERATION\".\"SMOPS_MASTER\" values(?,?,?,?,?,\\'B\\',\\'TBL\\',null,\\'X\\') where customer_id = ? and sysid = ? and sysclt = ? and factor_name = ? and factor_category = \\'B\\' and factor_type = \\'TBL\\'' );\n\t\t\t\n\t\t\tinsertStmt.setBatchSize(100);\n\t\t\tupsertStmt.setBatchSize(100);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar tableName = tableData[i].column_0;\n\t\t\t\t\tvar taanaYear = parseInt(tableData[i].column_1);\n\t\t\t\t\tvar taanaMonth = parseInt(tableData[i].column_2);\n\t\t\t\t\tvar tableEntries = parseInt(tableData[i].column_3);\n\t\t\t\t\tvar tableEntriesTotal = parseInt((tableData[i].column_4 === \"\") ? \"0\" : tableData[i].column_4);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.setString(1,userInfo.customerId); //customer id -input\n\t\t\t\t\tinsertStmt.setString(2,userInfo.sysId); //sys id -input\n\t\t\t\t\tinsertStmt.setString(3,userInfo.sysClt); //sys client -input\n\t\t\t\t\tinsertStmt.setInteger(4,taanaYear);\t//year -input\n\t\t\t\t\tinsertStmt.setInteger(5,taanaMonth);\t//month -input\n\t\t\t\t\tinsertStmt.setString(6,tableName);\t//task type -input\n\t\t\t\t\tinsertStmt.setInteger(7,tableEntries); //report name -input\n\t\t\t\t\tinsertStmt.setInteger(8,tableEntriesTotal); //db total -input\n\t\t\t\t\tinsertStmt.setString(9,userInfo.customerId);\n\t\t\t\t\tinsertStmt.setString(10,userInfo.sysId);\n\t\t\t\t\tinsertStmt.setString(11,userInfo.sysClt);\n\t\t\t\t\tinsertStmt.setInteger(12,taanaYear);\n\t\t\t\t\tinsertStmt.setInteger(13,taanaMonth);\n\t\t\t\t\tinsertStmt.setString(14,tableName);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tupsertStmt.setString(1,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(2,tableName);\n\t\t\t\t\tupsertStmt.setString(3,tableName);\n\t\t\t\t\tupsertStmt.setString(4,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(5,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(6,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(7,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(8,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(9,tableName);\n\t\t\t\t\t\n\t\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.addBatch(); \n\t\t\t\t\tupsertStmt.addBatch();\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\t\n\t\t\tvar respArrU = upsertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tupsertStmt.close();\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\t$.response.status = $.net.http.OK;\n\t\t\t\t return {\n\t\t\t\t \t\"RespondCode\": respCode\n\t\t\t\t };\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\trespCode = true;\n\t\t\n\t\tbreak;\n\t\n\t\tcase 'KMHDR':\n\t\t\tvar insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"KMHDR\" VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)' ); \n\t\t\tinsertStmt.setBatchSize(entryNum);\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\n\t\t\t\tinsertStmt.setInteger(1,parseInt(tableData[i].column_0)); \n\t\t\t\tinsertStmt.setInteger(2,parseInt(tableData[i].column_1)); \n\t\t\t\tinsertStmt.setString(3,tableData[i].column_2);\n\t\t\t\tinsertStmt.setString(4,tableData[i].column_3);\n\t\t\t\tinsertStmt.setString(5,tableData[i].column_4);\n\t\t\t\tinsertStmt.setInteger(6,parseInt((tableData[i].column_5 == \"\") ? \"0\" : tableData[i].column_5));\n\t\t\t\tinsertStmt.setString(7,tableData[i].column_6);\n\t\t\t\tinsertStmt.setString(8,tableData[i].column_7);\n\t\t\t\tinsertStmt.setDate(9,tableData[i].column_8); \n\t\t\t\tinsertStmt.setString(10,tableData[i].column_9);\n\t\t\t\tinsertStmt.setDate(11,tableData[i].column_10);\n\t\t\t\tinsertStmt.setString(12,tableData[i].column_11);\n\t\t\t\tinsertStmt.setString(13,tableData[i].column_12);\n\t\t\t\t\n\t\t\t\tinsertStmt.addBatch(); \n\t\t\t}\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tvar respCode = true;\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\t\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase 'KMBSC':\n\t\t\tvar insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"KMBSC\" VALUES(?,?,?,?,?,?)' ); \n\t\t\tinsertStmt.setBatchSize(entryNum);\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\n\t\t\t\tinsertStmt.setInteger(1,parseInt(tableData[i].column_0)); \n\t\t\t\tinsertStmt.setInteger(2,parseInt(tableData[i].column_1)); \n\t\t\t\tinsertStmt.setString(3,tableData[i].column_2);\n\t\t\t\tinsertStmt.setString(4,tableData[i].column_3);\n\t\t\t\tinsertStmt.setString(5,tableData[i].column_4);\n\t\t\t\tinsertStmt.setDouble(6,parseFloat(tableData[i].column_5));\n\t\t\t\t\n\t\t\t\tinsertStmt.addBatch(); \n\t\t\t}\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tvar respCode = true;\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\t\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase 'KMDVM':\n\t\t\tvar insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"KMDVM\" VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)' ); \n\t\t\tinsertStmt.setBatchSize(entryNum);\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\n\t\t\t\tinsertStmt.setInteger(1,parseInt(tableData[i].column_0)); \n\t\t\t\tinsertStmt.setDouble(2,parseFloat((tableData[i].column_1 == \"\") ? \"0\" : tableData[i].column_1)); \n\t\t\t\tinsertStmt.setString(3,tableData[i].column_2);\n\t\t\t\tinsertStmt.setString(4,tableData[i].column_3);\n\t\t\t\tinsertStmt.setString(5,tableData[i].column_4);\n\t\t\t\tinsertStmt.setString(6,tableData[i].column_5);\n\t\t\t\tinsertStmt.setInteger(7,parseInt((tableData[i].column_6 == \"\") ? \"0\" : tableData[i].column_6));\n\t\t\t\tinsertStmt.setDouble(8,parseFloat((tableData[i].column_7 == \"\") ? \"0\" : tableData[i].column_7));\n\t\t\t\tinsertStmt.setDouble(9,parseFloat((tableData[i].column_8 == \"\") ? \"0\" : tableData[i].column_8)); \n\t\t\t\tinsertStmt.setDouble(10,parseFloat((tableData[i].column_9 == \"\") ? \"0\" : tableData[i].column_9));\n\t\t\t\tinsertStmt.setDouble(11,parseFloat((tableData[i].column_10 == \"\") ? \"0\" : tableData[i].column_10));\n\t\t\t\tinsertStmt.setString(12,tableData[i].column_11);\n\t\t\t\tinsertStmt.setString(13,tableData[i].column_12);\n\t\t\t\t\n\t\t\t\tinsertStmt.addBatch(); \n\t\t\t}\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tvar respCode = true;\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\t\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\n\t\t\t\n\t\tcase 'CMWLH':\n\t\t\t\n\t\t\tvar userInfo = dataParsed.userInfo;\n\t\t\t\n\t\t\tvar insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"CMWLH\" VALUES(?,?,?,?,?,?,?,?,?,?,?,?)' ); \n\t\t\tinsertStmt.setBatchSize(entryNum);\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\n\t\t\t\tvar stepNum = parseInt((tableData[i].column_1 == \"\") ? \"0\" : tableData[i].column_1);\n\t\t\t\tvar cpuAvg = parseFloat((tableData[i].column_4 == \"\") ? \"0\" : tableData[i].column_4);\n\t\t\t\tvar dbAvg = parseFloat((tableData[i].column_5 == \"\") ? \"0\" : tableData[i].column_5);\n\t\t\t\t\n\t\t\t\tvar cpuTotal = parseFloat((stepNum * cpuAvg / 3600000).toFixed(1));\n\t\t\t\tvar dbTotal = parseFloat((stepNum * dbAvg / 3600000).toFixed(1));\n\t\t\t\tvar respTotal = parseFloat((cpuTotal + dbTotal).toFixed(1));\n\t\t\t\t\n\t\t\t\tinsertStmt.setString(1,userInfo.customerId); //customer id -input\n\t\t\t\tinsertStmt.setString(2,userInfo.sysId); //sys id -input\n\t\t\t\tinsertStmt.setString(3,userInfo.sysClt); //sys client -input\n\t\t\t\tinsertStmt.setInteger(4,parseInt(userInfo.dateYear));\t//year -input\n\t\t\t\tinsertStmt.setInteger(5,parseInt(userInfo.dateMonth));\t//month -input\n\t\t\t\tinsertStmt.setString(6,tableData[i].column_0);\t//task type -input\n\t\t\t\tinsertStmt.setInteger(7,stepNum); //step num -input\n\t\t\t\tinsertStmt.setDouble(8,cpuAvg); //cpu avg -input\n\t\t\t\tinsertStmt.setDouble(9,dbAvg); //db avg -input\n\t\t\t\tinsertStmt.setDouble(10,cpuTotal); //cpu total - cal\n\t\t\t\tinsertStmt.setDouble(11,dbTotal); //db total -cal\n\t\t\t\tinsertStmt.setDouble(12,respTotal); //cpu + db\n\n\t\t\t\t\n\t\t\t\tinsertStmt.addBatch(); \n\t\t\t}\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tvar respCode = true;\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\t\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\tcase 'CMWLP':\n\t\t\t\n\t\t\tvar userInfo = dataParsed.userInfo;\n\t\t\tvar taskType = dataParsed.taskType;\n\t\t\t\n\t\t\t\n\t\t\tif(parseInt(userInfo.dateMonth) == 1){\n\t\t\t\tvar lastMonthNode = 12;\n\t\t\t\tvar lastYearNode = parseInt(userInfo.dateYear) - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar lastYearNode = parseInt(userInfo.dateYear);\n\t\t\t\tvar lastMonthNode = parseInt(userInfo.dateMonth) - 1;\n\t\t\t}\n\t\t\t\n\t\t\tvar lastBaseNumber = 0.0;\n\t\t\tvar trendValue = 0.0;\n\t\t\t\n\t\t\tswitch(taskType){\n\t\t\t\n\t\t\tcase \"DIALOG\":\n\t\t\t\tvar factorType = \"DIA\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"BACKGROUND\":\n\t\t\t\tvar factorType = \"BTC\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"RFC\":\n\t\t\t\tvar factorType = \"RFC\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tvar factorType = \"OTH\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tvar loopIndex = 0;\n\t\t\tvar j = 0;\n\t\t\tvar respCode = true;\n\t\t\t\n\t\t\t\n\t\t\tvar insertStmt = conn.prepareStatement( 'INSERT INTO \"SMART_OPERATION\".\"CMWLP\" VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)' ); \n\t\t\tvar upsertStmt = conn.prepareStatement( 'upsert \"SMART_OPERATION\".\"SMOPS_MASTER\" values(?,?,?,?,?,\\'S\\',?,?,\\'X\\') where customer_id = ? and sysid = ? and sysclt = ? and factor_name = ? and factor_category = \\'S\\' and factor_type = ?' );\n\t\t\t\n\t\t\tinsertStmt.setBatchSize(100);\n\t\t\tupsertStmt.setBatchSize(100);\n\t\t\t\n\t\t\tif(taskType == \"BACKGROUND\"){\n\t\t\t\n\t\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\t\n\t\t\t\t\tvar cpuTotal_s = parseFloat((tableData[i].column_7 == \"\") ? \"0\" : tableData[i].column_7);\n\t\t\t\t\tvar dbTotal_s = parseFloat((tableData[i].column_9 == \"\") ? \"0\" : tableData[i].column_9);\n\t\t\t\t\t\n\t\t\t\t\tvar cpuTotal = parseFloat((cpuTotal_s / 3600).toFixed(1));\n\t\t\t\t\tvar dbTotal = parseFloat((dbTotal_s / 3600).toFixed(1));\n\t\t\t\t\t\n\t\t\t\t\tvar respTotal = cpuTotal + dbTotal;\n\t\t\t\t\t\n\t\t\t\t\tvar procStep = parseInt((tableData[i].column_2 == \"\") ? \"0\" : tableData[i].column_2);\n\t\t\t\t\tvar respAvg_ms = parseFloat((tableData[i].column_4 == \"\") ? \"0\" : tableData[i].column_4);\n\t\t\t\t\tvar respTotalSecond = parseFloat((tableData[i].column_3 == \"\") ? \"0\" : tableData[i].column_3);\n\t\t\t\t\t\n\t\t\t\t\tvar respAvg = parseFloat((respAvg_ms / 1000).toFixed(1));\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.setString(1,userInfo.customerId); //customer id -input\n\t\t\t\t\tinsertStmt.setString(2,userInfo.sysId); //sys id -input\n\t\t\t\t\tinsertStmt.setString(3,userInfo.sysClt); //sys client -input\n\t\t\t\t\tinsertStmt.setInteger(4,parseInt(userInfo.dateYear));\t//year -input\n\t\t\t\t\tinsertStmt.setInteger(5,parseInt(userInfo.dateMonth));\t//month -input\n\t\t\t\t\tinsertStmt.setString(6,taskType);\t//task type -input\n\t\t\t\t\tinsertStmt.setString(7,tableData[i].column_0); //report name -input\n\t\t\t\t\tinsertStmt.setDouble(8,cpuTotal); //cpu total -input\n\t\t\t\t\tinsertStmt.setDouble(9,dbTotal); //db total -input\n\t\t\t\t\tinsertStmt.setDouble(10,respTotal); //cpu + db -cal\n\t\t\t\t\t//for avg resp and steps\n\t\t\t\t\tinsertStmt.setInteger(11,procStep);//step\n\t\t\t\t\tinsertStmt.setDouble(12,respAvg);//response time avg\n\t\t\t\t\tinsertStmt.setDouble(13,respTotalSecond);//total resp time by second\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t///// update TREND start\n\t\t\t\t\tvar verifyDataExistStmt = conn.prepareStatement( 'SELECT COUNT (*) FROM \"SMART_OPERATION\".\"CMWLP\" WHERE CUSTOMER_ID = ? AND SYSTEM_ID = ? AND SYSTEM_CLT = ? AND TASK_TYPE = ? AND REPORT_NAME = ? AND DATE_Y = ? AND DATE_M = ?' ); \n\t\t\t\t\t\n\t\t\t\t\tverifyDataExistStmt.setString(1,userInfo.customerId);\n\t\t\t\t\tverifyDataExistStmt.setString(2,userInfo.sysId);\n\t\t\t\t\tverifyDataExistStmt.setString(3,userInfo.sysClt);\n\t\t\t\t\tverifyDataExistStmt.setString(4,taskType);\n\t\t\t\t\tverifyDataExistStmt.setString(5,tableData[i].column_0);\n\t\t\t\t\tverifyDataExistStmt.setInteger(6,lastYearNode);\n\t\t\t\t\tverifyDataExistStmt.setInteger(7,lastMonthNode);\n\t\t\t\t\t\n\t\t\t\t\tverifyDataExistStmt.executeQuery();\n\t\t\t\t\tvar getCount = [];\n\t\t\t\t\tvar\tverifyResult = verifyDataExistStmt.getResultSet();\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\twhile(verifyResult.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tgetCount.push({\n\t\t\t\t\t\t\t\"result\":verifyResult.getString(1)\n\t\t\t\t\t\t});\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar countNumber = parseInt(getCount[0].result);\n\t\t\t\t\t\n\t\t\t\t\tif(countNumber == 0){\n\t\t\t\t\t\tlastBaseNumber = 0.0;\n\t\t\t\t\t\ttrendValue = 9999.99;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar selectLastBaseStmt = conn.prepareStatement( 'SELECT SUM (RESP_TOTAL) FROM \"SMART_OPERATION\".\"CMWLP\" WHERE CUSTOMER_ID = ? AND SYSTEM_ID = ? AND SYSTEM_CLT = ? AND TASK_TYPE = ? AND REPORT_NAME = ? AND DATE_Y = ? AND DATE_M = ? GROUP BY DATE_Y, DATE_M' ); \n\t\t\t\t\t\t\n\t\t\t\t\t\tselectLastBaseStmt.setString(1,userInfo.customerId);\n\t\t\t\t\t\tselectLastBaseStmt.setString(2,userInfo.sysId);\n\t\t\t\t\t\tselectLastBaseStmt.setString(3,userInfo.sysClt);\n\t\t\t\t\t\tselectLastBaseStmt.setString(4,taskType);\n\t\t\t\t\t\tselectLastBaseStmt.setString(5,tableData[i].column_0);\n\t\t\t\t\t\tselectLastBaseStmt.setInteger(6,lastYearNode);\n\t\t\t\t\t\tselectLastBaseStmt.setInteger(7,lastMonthNode);\n\t\t\t\t\t\t\n\t\t\t\t\t\tselectLastBaseStmt.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar\tlastBaseResult = selectLastBaseStmt.getResultSet();\n\t\t\t\t\t\tvar getLastBase = [];\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(lastBaseResult.next())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgetLastBase.push({\n\t\t\t\t\t\t\t\t\"result\":lastBaseResult.getString(1)\n\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastBaseNumber = parseFloat(getLastBase[0].result);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastBaseResult.close();\n\t\t\t\t\t\tselectLastBaseStmt.close();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(lastBaseNumber == 0.0 ){\n\t\t\t\t\t\t\ttrendValue = 9999.99;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\ttrendValue = ((respTotalSecond - lastBaseNumber) / lastBaseNumber) * 100;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tverifyResult.close();\n\t\t\t\t\tverifyDataExistStmt.close();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t///// update TREND end\n\t\t\t\t\t\n\t\t\t\t\tupsertStmt.setString(1,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(2,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(3,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(4,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(5,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(6,factorType);\n\t\t\t\t\tupsertStmt.setDouble(7,trendValue);\n\t\t\t\t\tupsertStmt.setString(8,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(9,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(10,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(11,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(12,factorType);\n\t\t\t\t\t\n\t\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.addBatch(); \n\t\t\t\t\tupsertStmt.addBatch();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(taskType == \"DIALOG\" || taskType == \"RFC\"){\n\t\t\t\t\n\t\t\t\tfor(var i = 0; i < entryNum; i ++){\n\t\t\t\t\t\n\t\t\t\t\tvar cpuTotal_s = parseFloat((tableData[i].column_6 == \"\") ? \"0\" : tableData[i].column_6);\n\t\t\t\t\tvar dbTotal_s = parseFloat((tableData[i].column_8 == \"\") ? \"0\" : tableData[i].column_8);\n\t\t\t\t\t\n\t\t\t\t\tvar cpuTotal = parseFloat((cpuTotal_s / 3600).toFixed(1));\n\t\t\t\t\tvar dbTotal = parseFloat((dbTotal_s / 3600).toFixed(1));\n\t\t\t\t\t\n\t\t\t\t\tvar respTotal = cpuTotal + dbTotal;\n\t\t\t\t\t\n\t\t\t\t\tvar procStep = parseInt((tableData[i].column_1 == \"\") ? \"0\" : tableData[i].column_1);\n\t\t\t\t\tvar respAvg_ms = parseFloat((tableData[i].column_3 == \"\") ? \"0\" : tableData[i].column_3);\n\t\t\t\t\tvar respTotalSecond = parseFloat((tableData[i].column_2 == \"\") ? \"0\" : tableData[i].column_2);\n\t\t\t\t\t\n\t\t\t\t\tvar respAvg = parseFloat((respAvg_ms / 1000).toFixed(1));\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.setString(1,userInfo.customerId); //customer id -input\n\t\t\t\t\tinsertStmt.setString(2,userInfo.sysId); //sys id -input\n\t\t\t\t\tinsertStmt.setString(3,userInfo.sysClt); //sys client -input\n\t\t\t\t\tinsertStmt.setInteger(4,parseInt(userInfo.dateYear));\t//year -input\n\t\t\t\t\tinsertStmt.setInteger(5,parseInt(userInfo.dateMonth));\t//month -input\n\t\t\t\t\tinsertStmt.setString(6,taskType);\t//task type -input\n\t\t\t\t\tinsertStmt.setString(7,tableData[i].column_0); //report name -input\n\t\t\t\t\tinsertStmt.setDouble(8,cpuTotal); //cpu total -input\n\t\t\t\t\tinsertStmt.setDouble(9,dbTotal); //db total -input\n\t\t\t\t\tinsertStmt.setDouble(10,respTotal); //cpu + db -cal\n\t\t\t\t\t//for avg resp and steps\n\t\t\t\t\tinsertStmt.setInteger(11,procStep);//step\n\t\t\t\t\tinsertStmt.setDouble(12,respAvg);//response time avg\n\t\t\t\t\tinsertStmt.setDouble(13,respTotalSecond);//total resp time by second\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t///// update TREND start\n\t\t\t\t\tvar verifyDataExistStmt = conn.prepareStatement( 'SELECT COUNT (*) FROM \"SMART_OPERATION\".\"CMWLP\" WHERE CUSTOMER_ID = ? AND SYSTEM_ID = ? AND SYSTEM_CLT = ? AND TASK_TYPE = ? AND REPORT_NAME = ? AND DATE_Y = ? AND DATE_M = ?' ); \n\t\t\t\t\t\n\t\t\t\t\tverifyDataExistStmt.setString(1,userInfo.customerId);\n\t\t\t\t\tverifyDataExistStmt.setString(2,userInfo.sysId);\n\t\t\t\t\tverifyDataExistStmt.setString(3,userInfo.sysClt);\n\t\t\t\t\tverifyDataExistStmt.setString(4,taskType);\n\t\t\t\t\tverifyDataExistStmt.setString(5,tableData[i].column_0);\n\t\t\t\t\tverifyDataExistStmt.setInteger(6,lastYearNode);\n\t\t\t\t\tverifyDataExistStmt.setInteger(7,lastMonthNode);\n\t\t\t\t\t\n\t\t\t\t\tverifyDataExistStmt.executeQuery();\n\t\t\t\t\tvar getCount = [];\n\t\t\t\t\tvar\tverifyResult = verifyDataExistStmt.getResultSet();\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\twhile(verifyResult.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tgetCount.push({\n\t\t\t\t\t\t\t\"result\":verifyResult.getString(1)\n\t\t\t\t\t\t});\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar countNumber = parseInt(getCount[0].result);\n\t\t\t\t\t\n\t\t\t\t\tif(countNumber == 0){\n\t\t\t\t\t\tlastBaseNumber = 0.0;\n\t\t\t\t\t\ttrendValue = 9999.99;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar selectLastBaseStmt = conn.prepareStatement( 'SELECT SUM (RESP_TOTAL) FROM \"SMART_OPERATION\".\"CMWLP\" WHERE CUSTOMER_ID = ? AND SYSTEM_ID = ? AND SYSTEM_CLT = ? AND TASK_TYPE = ? AND REPORT_NAME = ? AND DATE_Y = ? AND DATE_M = ? GROUP BY DATE_Y, DATE_M' ); \n\t\t\t\t\t\t\n\t\t\t\t\t\tselectLastBaseStmt.setString(1,userInfo.customerId);\n\t\t\t\t\t\tselectLastBaseStmt.setString(2,userInfo.sysId);\n\t\t\t\t\t\tselectLastBaseStmt.setString(3,userInfo.sysClt);\n\t\t\t\t\t\tselectLastBaseStmt.setString(4,taskType);\n\t\t\t\t\t\tselectLastBaseStmt.setString(5,tableData[i].column_0);\n\t\t\t\t\t\tselectLastBaseStmt.setInteger(6,lastYearNode);\n\t\t\t\t\t\tselectLastBaseStmt.setInteger(7,lastMonthNode);\n\t\t\t\t\t\t\n\t\t\t\t\t\tselectLastBaseStmt.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar\tlastBaseResult = selectLastBaseStmt.getResultSet();\n\t\t\t\t\t\tvar getLastBase = [];\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(lastBaseResult.next())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgetLastBase.push({\n\t\t\t\t\t\t\t\t\"result\":lastBaseResult.getString(1)\n\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastBaseNumber = parseFloat(getLastBase[0].result);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastBaseResult.close();\n\t\t\t\t\t\tselectLastBaseStmt.close();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(lastBaseNumber == 0.0 ){\n\t\t\t\t\t\t\ttrendValue = 9999.99;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\ttrendValue = ((respTotalSecond - lastBaseNumber) / lastBaseNumber) * 100;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tverifyResult.close();\n\t\t\t\t\tverifyDataExistStmt.close();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t///// update TREND end\n\t\t\t\t\t\n\t\t\t\t\tupsertStmt.setString(1,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(2,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(3,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(4,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(5,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(6,factorType);\n\t\t\t\t\tupsertStmt.setDouble(7,trendValue);\n\t\t\t\t\tupsertStmt.setString(8,userInfo.customerId);\n\t\t\t\t\tupsertStmt.setString(9,userInfo.sysId);\n\t\t\t\t\tupsertStmt.setString(10,userInfo.sysClt);\n\t\t\t\t\tupsertStmt.setString(11,tableData[i].column_0);\n\t\t\t\t\tupsertStmt.setString(12,factorType);\n\t\n\t\t\t\t\t\n\t\t\t\t\tinsertStmt.addBatch(); \n\t\t\t\t\tupsertStmt.addBatch();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tvar respArr = insertStmt.executeBatch();\n\t\t\tvar respArrU = upsertStmt.executeBatch();\n\t\t\tinsertStmt.close();\n\t\t\tupsertStmt.close();\n\t\t\t\n\t\t\tfor(var i = 0; i < entryNum; i++){\n\t\t\t\tif(respArr[i] < 0){\n\t\t\t\t\trespCode = false;\n\t\t\t\t\t$.response.status = $.net.http.OK;\n\t\t\t\t return {\n\t\t\t\t \t\"RespondCode\": respCode\n\t\t\t\t };\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\trespCode = true;\n\t\t\t\n\t\t\t\n\t\t\tbreak;\n\t}\t\n\t\n\t \n conn.commit(); \n conn.close(); \n \n \n \n\t// Extract body insert data to DB and return results in JSON/other format\n\t$.response.status = $.net.http.OK;\n return {\n \t\"RespondCode\": respCode\n };\n}", "storeSession(sid, obj)\n{\n let query = 'INSERT OR REPLACE INTO sessions(sid, data) VALUES($sid, $data)';\n this._db.run(query, {$sid:sid, $data:JSON.stringify(obj)}, function(err){\n if (null === err)\n {\n return;\n }\n logger.error(\"Could not save session '%s' : %s\", sid, err.message);\n });\n}", "function syncOfflinetoMongoDBSelfHosted(key, method, title, url, requestHeadersKey1, requestHeadersValue1) {\n\n // alert(\"sync : id \" + key + \" method \" + method + \"title:\" + title + \" url: \" + url + \" headersKey1: \" + requestHeadersKey1 + \" headersValue1: \" + requestHeadersValue1);\n var currentDateTime = new Date().getTime();\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('POST', 'http://localhost:3000/request', true);\n\n xhr.setRequestHeader('Content-Type', 'application/json');\n\n var toServer = JSON.stringify(\n {\n id: key,\n method: method,\n title: title,\n url: url,\n authorization: {type: 'authorizationoption', key: 'httpBasicAuthUserName', value: 'httpBasicAuthPassword'},\n headers: [{key : requestHeadersKey1, value: requestHeadersValue1}],\n body: 'requestBody',\n description: 'requestDescription',\n dateCreated: 1488846301000,\n dateUpdated: currentDateTime\n }\n );\n\n xhr.send(toServer);\n\n // loadRequestList()\n reloadMenu()\n notifyClient(toServer)\n\n}", "save() {\n this.db.write();\n }", "admin_add (req, res) {\n\n ConfigModel(req.body).save(function(err,resData){\n if (err) return res.json({resStatus:'error', msg : AppMessages.SERVER_ERR});\n return res.json({resStatus:'success', msg : \"Successfull Saved\", result: resData});\n });\n\n }", "function saveToDatabase(obj) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = processResponse;\n request.open('POST', 'http://localhost/member/save', true); // Be explicit with the URL; could use /member/save only to assume server is localhost\n request.send(obj);\n}", "write() {\n const statement = this.dbConnector.statements.set(this.params, this.writeBuffer);\n this.dbConnector.query(statement, this.onWriteResult.bind(this), [], true);\n }", "postForm(req, res) {\n\n if (req.body._id == '')\n insertRecord(req, res);\n else\n updateRecord(req, res);\n\n\n }", "function saveData(conn,callback){\n sampleEmployee.save(function(err){\n callback(err,conn);\n });\n\n}", "function handleSave() {\n\tjsonData = '[';\n\tfor (i=0; i < ds.getCount(); i++) {\n\t\t// TODO: put filter here to get only new, deleted, or updated records\n\t\trecord = ds.getAt(i);\n\t\tif (jsonData != '[') jsonData += ',';\n\t\tjsonData += Ext.util.JSON.encode(record.data);\n } \n\tjsonData = jsonData.substring(0,jsonData.length-1) + ' }]';\n\t//alert (jsonData);\n\tExt.Ajax.request({ \n\t\twaitMsg: 'Saving changes...',\n\t\turl: 'include/jsonUtil.php', \n\t\tparams: { \n\t\t\ttask: 'update', \n\t\t\tdata: jsonData \n\t\t},\n\t\tcallback: function (options, success, response) {\n\t\t\tExt.MessageBox.alert('Response: ',response.responseText); \n\t\t} \n\t});\t\t\n}", "function handleSave() {\n\tjsonData = '[';\n\tfor (i=0; i < ds.getCount(); i++) {\n\t\t// TODO: put filter here to get only new, deleted, or updated records\n\t\trecord = ds.getAt(i);\n\t\tif (jsonData != '[') jsonData += ',';\n\t\tjsonData += Ext.util.JSON.encode(record.data);\n } \n\tjsonData = jsonData.substring(0,jsonData.length-1) + ' }]';\n\t//alert (jsonData);\n\tExt.Ajax.request({ \n\t\twaitMsg: 'Saving changes...',\n\t\turl: 'include/jsonUtil.php', \n\t\tparams: { \n\t\t\ttask: 'update', \n\t\t\tdata: jsonData \n\t\t},\n\t\tcallback: function (options, success, response) {\n\t\t\tExt.MessageBox.alert('Response: ',response.responseText); \n\t\t} \n\t});\t\t\n}", "function put(req, res, db) {\n let u = new URL(req.url, \"http://localhost\")\n let logfile = u.pathname.substring(\"/put/\".length)\n let body = []\n if(NO_LAST_NL) {\n body.push(Buffer.from(\"\\n\"))\n NO_LAST_NL = false\n }\n req.on(\"data\", chunk => body.push(chunk))\n req.on(\"end\", () => {\n if(body.length == 0) return resp_1(400, \"Nothing to do\")\n body.push(Buffer.from(\"\\n\"))\n body = Buffer.concat(body)\n try {\n let rec = JSON.parse(body.subarray(0, body.length-1))\n newRec(rec, body, logfile, db, err => {\n if(err) resp_1(500, err)\n else resp_1(200)\n })\n } catch(e) {\n resp_1(400, e)\n }\n })\n req.on(\"error\", err => resp_1(500, err))\n\n let sent\n function resp_1(status, msg) {\n if(sent) return\n sent = true\n addCORSHeaders(req, res)\n res.writeHead(status)\n if(msg && typeof msg !== 'string') msg = \"\" + msg\n res.end(msg)\n }\n}", "update(){}", "update(){}", "update(){}", "function postService(url, sqlQuery, data){ \napp.post(url, function(request, response, next){\n try{\n var reqObj=request.body;\n request.getConnection(function(error, conn){\n if(error) {\n console.log(\"SQL connection error:\", error);\n return next(error);\n }\n else\n {\n var insertSql=sqlQuery;\n var insertValues={};\n for(var i=0; i<data.length; i++){\n insertValues[data[i]]=reqObj[data[i]]; \n }\n \n var query = conn.query(insertSql, insertValues, function(error, result){\n if(error){\n console.log(\"SQL error\", error);\n return next(error);\n } \n console.log(result);\n var name_id = result.insertId;\n response.json({\"name\": name_id});\n \n });\n }\n });\n }\n catch (ex){\n console.log(\"Internal Error:\"+ex);\n return next(ex);\n }\n \n \n});\n}", "function uploadTransaction() {\n // open a entry on the database\n const transaction = db.transaction(['new_Entry'], 'writeRead');\n\n // access your object store\n const statementObjectStore = transaction.objectStore('new_Entry');\n\n // takes all entries from object store and sets them to a variable\n const getEverything = statementObjectStore.getEverything();\n\n // if 'getEverything()' executes successfully, this function will run\n getEverything.onsuccess = function () {\n // any data in indexedDB gets sent to the api server\n if (getEverything.result.length > 0) {\n fetch('/api/transaction', {\n method: 'POST',\n body: JSON.stringify(getEverything.result),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json'\n }\n })\n .then(response => response.json())\n .then(serverResponse => {\n if (serverResponse.message) {\n throw new Error(serverResponse);\n }\n // open another entry\n const transaction = db.transaction(['new_Entry'], 'writeRead');\n // access the object store\n const statementObjectStore = transaction.objectStore('new_Entry');\n // clear out all entries in your store\n statementObjectStore.clear();\n\n alert('syncing... all entries have now been entered and are up to date');\n })\n .catch(err => {\n console.log(err);\n });\n }\n }\n}", "function insert(data)\n{\n var newProduct = new productModel({}); //product.ctrl.js ma promise pathayo bhane promise nai aucha\n var newMappedProduct = map_product_request(newProduct, data);\n return newMappedProduct.save(); //instead of using save \n \n \n}", "remote(remoteObj) {\n // Only cell editing, insert and delete row will be handled by remote store\n remoteObj.cellEdit = true;\n remoteObj.insertRow = true;\n remoteObj.dropRow = true;\n return remoteObj;\n }", "function saveVote(json, typeVote, typeRecommendation,votes){\n try{\n var stmt = voteDB.createAsyncStatement(\"INSERT INTO AlreadyVoted(conf) values(:json) \");\n stmt.params.json = json;\n \n stmt.executeAsync({\n handleError: function(aError) { \n printErrorInVote();\n }, \n \n handleCompletion: function(aReason) { \n if (aReason != Components.interfaces.mozIStorageStatementCallback.REASON_FINISHED)\n printErrorInVote();\n else{\n //Just add the url to which send the request\n /*\n var req = new XMLHttpRequest();\n req.open(\"POST\", \"http://pipes.yahoo.com/pipes/ajax.pipe.save\", true);\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n //Now we send the xmlHttpRequest\n req.send(postString); */\n //TODO: write code to update the client db\n try{\n var stmt;\n switch(typeRecommendation){\n case (ParameterValues):\n stmt = db.createAsyncStatement('UPDATE ParameterValues SET \\''+typeVote+'\\' = :votes WHERE ParameterValues.conf like :json');\n break;\n case (CompCo):\n stmt = db.createAsyncStatement('Update CompCo set \\''+typeVote+'\\' = :votes where CompCo.conf like :json');\n break;\n case (MultiCompCo):\n stmt = db.createAsyncStatement('Update MultiCompCo set \\''+typeVote+'\\' = :votes where MultiCompCo.conf like :json');\n break;\n default:\n return;\n }\n stmt.params.votes = votes;\n stmt.params.json = json;\n stmt.executeAsync({\n handleCompletion: function(aReason) {\n log(\"update query completed\"); \n },\n handleError: function(aError) { \n log(\"Error in update query: \" + aError.message); \n },\n });\n \n } catch(e){\n logE(e); \n } \n \n }\n }\n });\n } catch(e){\n logE(e);\n } \n}", "function remoteDBcall(operation, onlineHandler, params, successCallback, failureCallback) {\n onlineHandler.call(DatabaseService, params, function (response) {\n if (!params.skipLocalDB) {\n if (operation.type === 'READ') {\n getStore(params).then(function (store) {\n store.saveAll(response.content);\n });\n } else if (operation.type !== 'INSERT') {\n self[operation.name](params, WM.noop, WM.noop);\n }\n }\n Utils.triggerFn(successCallback, response);\n }, failureCallback);\n }", "function questionsController(){\n this.index = function(req,res){\n questions.find({},function(err,question){\n res.json(question);\n })};\n\n this.create = function(req,res){\nconsole.log(\"@@@@@@@@@@@@@@@@@\");\n console.log(req.body);\n var question= new question(req.body);\n questions.save(function(err){\n if(err){\n console.log(\"something wrong\");\n }else{\n console.log({placeholder:'create'});\n res.json({placeholder:'create'});\n }\n })\n };\n\n//From platform...\n//User.update({name:'Andrinnna'}, {name:'Andriana'}, function(err){\n //req.params.id->from routes(address)\n //req.body.firstname->from form input\n //{{question._id}}->from mongodb\n\n this.update = function(req,res){\n questions.update({_id:req.params.id},req.body,\n function(err, question){\n console.log(\"req.body.firstname is:::\",req.body.firstname);//[]\n console.log(\"req.params.id is:::\",req.params.id);\n\n if(err){\n console.log(\"something wrong\",err);\n }else{\n console.log(\"backend questions controllerssssssssss\");\n console.log(question)//;{ ok: 1, nModified: 1, n: 1 }\n res.json(question);\n }\n })\n };\n\n this.delete = function(req,res){\n console.log(\"serverside ctrl->delete\");\n questions.remove({_id:req.params.id},function(err){\n if(err){\n console.log('something went wrong');}\n else{\n console.log(\"deleted-server\");\n res.json({success: true});\n // res.redirect('/questions');\n }\n })\n };\n this.show = function(req,res){\n questions.findOne({_id:req.params.id},function(err,question){\n if(err){\n console.log('something went wrong');}\n else{\n res.json(question);\n }\n })}\n}//questionsController closing", "put(id,data,onSuccess){\n\n this.db.type = 'PUT';\n this.status = data ;\n\n const url = server.base() + '/' + this.model + '?id='+id;\n\n axios.put(url,data,this.db.config)\n .then((res)=>{\n\n //preLoad('stop');\n //this.listenDataChange(res);\n onSuccess(res.data)\n },(error)=>{\n\n this.onError(error)\n\n })\n\n }", "createEmployee(employee) {\n return this.connection.query(\"INSERT INTO employee SET ?\", employee);\n}", "async save() {\n const priv = privates.get(this);\n const tableName = priv.get(\"tableName\");\n if (tableName) {\n const formData = new FormData(this.form);\n if (formData.get(\"saveDetails\") !== \"on\") {\n return;\n }\n const dataToSave = Object.assign({}, this.data, this.toObject());\n if (!db.isOpen()) {\n await db.open();\n }\n await db[tableName].put(dataToSave);\n this.data = dataToSave;\n }\n }", "function _updateEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\t\t\tvar oStatement;\n\n\t\t\t//Build the Statement to update the entries\n\t\t\tvar oStatement = oConnection.prepareStatement(\n\t\t\t\t\"UPDATE \\\"\" + gvSchemaName + \"\\\".\\\"\" + gvTableName +\n\t\t\t\t\"\\\" SET STRUCTURE = ?, FIELD = ?, OPERATOR = ?, VALUE = ? WHERE CONDITION_ID = ? AND ITEM = ?\"\n\t\t\t);\n\n\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t//Structure\n\t\t\toStatement.setString(1, oBody.STRUCTURE);\n\t\t\t//Field\n\t\t\toStatement.setString(2, oBody.FIELD);\n\t\t\t//Value\n\t\t\toStatement.setString(3, oBody.VALUE);\n\n\t\t\t//Condition Id\n\t\t\toStatement.setInt(4, parseFloat(oBody.CONDITION_ID));\n\t\t\t//Item\n\t\t\toStatement.setInt(5, parseFloat(oBody.ITEM));\n\n\t\t\toStatement.addBatch();\n\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries updated successfully in Table:\" + gvTableName + \";\";\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem updating entries in the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "update(id, data, params) {}", "async postSave () {\n\t}", "function write_in_db (internal_data) {\n database.collection(\"people_presence_db\").insertOne(internal_data, function(err,res) {\n if(err) throw err;\n //console.log(res.connection)\n //console.log(res.ops)\n //client.close();\n })\n }", "async function insertData(req, res) {\n var versionId = await pool.query(\"select id from version where number='\" + req.body.data.version + \"' and formularId='\" + req.body.data.formular + \"'\");\n\n // update data for existing version. First delete last data and then insert new data\n if (versionId.rows.length != 0) {\n await pool.query(\"delete from data where versionId='\" + versionId.rows[0].id + \"'\");\n await pool.query(\"delete from version where id='\" + versionId.rows[0].id + \"'\");\n }\n\n // insert into version and data tables for existing and non existing version\n await pool.query(\"INSERT INTO version(number, formularId) VALUES('\" + req.body.data.version + \"','\" + parseInt(req.body.data.formular) + \"')\")\n var version = await pool.query(\"select id from version where number='\" + req.body.data.version + \"' and formularId='\" + req.body.data.formular + \"'\")\n for (var i = 0; i < req.body.data.data.length; i++) {\n var data = req.body.data.data[i];\n await pool.query(\"INSERT INTO data(input, versionId, elementId) VALUES('\" + data.data + \"','\" + version.rows[0].id + \"', '\" + data.id + \"')\");\n }\n}", "function saveClient() {\n retrieveValues();\n\t\n\tclientModel.client = client;\n\tclientModel.clientAddress = clientAddress;\n\tclientModel.clientPhone = clientPhone;\n\tclientModel.clientEmail = clientEmail;\n \n\tsaveToServer();\n}", "uploadChanges() {\n const rowsData = this.readAllEntitiesFromSheet_();\n this.createNewEntities_(\n rowsData.filter((data) => data.action === 'CREATE'));\n this.updateData_(rowsData.filter((data) => data.action === 'MODIFY'));\n this.deleteEntries_(rowsData.filter((data) => data.action === 'DELETE'));\n }", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.GET) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"GET is not supported, perform a POST to add Logging Entries\"\n\t\t\t}));\n\t\t} else {\n\t\t\t//Perform Table Entry to be created in Logging Table\n\t\t\ttry {\n\t\t\t\tif (gvMethod === \"UPDATE\" || gvMethod === 'update' || gvMethod === \"Update\") {\n\t\t\t\t\tvar lsJournal = _getOriginalGuid();\n\t\t\t\t\t// \t_updateLogEntry(lsJournal.MESSAGE_GUID);\n\t\t\t\t\tif (lsJournal.MESSAGE_GUID) {\n\t\t\t\t\t\t_deleteLogEntry(lsJournal.MESSAGE_GUID);\n\t\t\t\t\t\t_createLogEntryUpdate(lsJournal.MESSAGE_GUID);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t_createLogEntry();\n\t\t\t\t}\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t}\n\t\t\t//Delete all entries older than 90 days\n\t\t\ttry {\n\t\t\t\t//Logging Table\n\t\t\t\t// _deleteHistoricEntries();\n\t\t\t\t//Header Table\n\t\t\t\t// _deleteHistoricEntriesContentTables(gvHeaderTable);\n\t\t\t\t//Item Table\n\t\t\t\t// _deleteHistoricEntriesContentTables(gvItemTable);\n\t\t\t\t//Currency Table\n\t\t\t\t// _deleteHistoricEntriesContentTables(gvCurrencyTable);\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate += \"Error during deletion of historic entries:\" + errorObj.message;\n\t\t\t}\n\t\t\t//Save Payload Fields\n\t\t\ttry {\n\t\t\t\t// _savePayloadFields();\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate += \"Error saving Payload level entries:\" + errorObj.message;\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate\n\t\t\t}));\n\t\t}\n\t}", "function updateDB(POST,response){\n\n\ttitle=POST.title; description=POST.description; location=POST.location; id=POST.id; link=POST.link; status=POST.status;\n\tvar sqlQuery = 'UPDATE issues SET title=\"'+title+'\",description=\"'+description+'\",location=\"'+location+'\",link=\"'+link+'\", status=\"'+status +'\" WHERE id=' + id;\n\tdbAccess.runQuery(sqlQuery, serve(response,id));\n }", "Save( parameters ) {\n\t\treturn new Promise( ( next, fail ) => {\n\t\t\n\t\t\tvar data = parameters.data;\n\t\t\t\n\t\t\tvar is_insert = typeof( data.ID ) === 'undefined' || data.ID === null;\n\t\t\tvar is_async = this.Config.AsyncWrites && !parameters.force_sync && !is_insert;\n\t\t\t\n\t\t\tvar fields = '';\n\t\t\tvar values = [];\n\t\t\t\n\t\t\tfor ( var k in data ) {\n\t\t\t\t\n\t\t\t\tif ( k == 'id' )\n\t\t\t\t\tcontinue; // don't update id\n\t\t\t\t\n\t\t\t\tvar v = data[ k ];\n\t\t\t\t\n\t\t\t\tif ( is_insert ) {\n\t\t\t\t\tif ( !fields.length )\n\t\t\t\t\t\tfields += '( ';\n\t\t\t\t\telse\n\t\t\t\t\t\tfields += ', ';\n\t\t\t\t\tfields += '`' + k + '`';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( !fields.length )\n\t\t\t\t\t\tfields += 'SET ';\n\t\t\t\t\telse\n\t\t\t\t\t\tfields += ', ';\n\t\t\t\t\tfields += '`' + k + '` = ?';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvalues.push( v );\n\t\t\t}\n\t\t\tif ( is_insert )\n\t\t\t\tfields += ')';\n\t\t\t\n\t\t\tvar query = ( is_insert\n\t\t\t\t? 'INSERT INTO'\n\t\t\t\t: 'UPDATE'\n\t\t\t) + ' `' + parameters.table + '` ' + fields;\n\t\t\t\n\t\t\tif ( is_insert ) {\n\t\t\t\tvar fields2 = '';\n\t\t\t\tfor ( var k in data ) {\n\t\t\t\t\tif ( k == 'id' )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif ( !fields2.length )\n\t\t\t\t\t\tfields2 += '( ';\n\t\t\t\t\telse\n\t\t\t\t\t\tfields2 += ', ';\n\t\t\t\t\tfields2 += '?';\n\t\t\t\t}\n\t\t\t\tfields2 += ' )';\n\t\t\t\tquery += ' VALUES ' + fields2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tquery += ' WHERE `id` = ? LIMIT 1';\n\t\t\t\tvalues.push( data.ID );\n\t\t\t}\n\t\t\t\n\t\t\tthis.Sql.query( query, values, function ( err, result ) {\n\t\t\t\tif (err)\n\t\t\t\t\treturn fail( err );\n\t\t\t\t\n\t\t\t\tif ( is_insert ) {\n\t\t\t\t\tdata.ID = result.insertId;\n\t\t\t\t}\n\t\t\t\tif ( !is_async ) // if sync - return after query\n\t\t\t\t\treturn next( data );\n\t\t\t});\n\t\t\tif ( is_async ) // if async - return immediately, finish query in background\n\t\t\t\treturn next( data );\n\t\t\t\n\t\t});\n\t}", "function sendUpdateRequest(){\n\tvar xhr = new new_request();\n\n\txhr.open('POST', 'server.php', true);\n\txhr.setRequestHeader('COMMAND', 'Update');\n\n\txhr.send(null);\n\txhr.onreadystatechange = function () {\n\t\tif(xhr.readyState == 4){\n\t\t\tif(xhr.status != 200)\n\t\t\t\talert(\"Error code = \" + new String(xhr.status));\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t// Get the return object and pares as JSON\n\t\t\t\tif(xhr.responseText != databaseStr){\n\t\t\t\t\tdatabaseStr = xhr.responseText;\n\t\t\t\t\tdatabaseObj = JSON.parse(xhr.responseText);\n\t\t\t\t\tshouldUpdate = true;\n\t\t\t\t} else {\n\t\t\t\t\tshouldUpdate = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n}", "function main(){\n\ttry {\n\t\tsql.openConnection();\n\t\thandleRequest({\n\t\t\t\"POST\": handlePost\n\t\t});\n\t}\n\tcatch (e) {\n\t\tif (!httpStatus) {\t\t\t\n\t\t\thttpStatus = $.net.http.BAD_REQUEST;\n\t\t\t$.response.contentType = \"text/plain\";\n\t\t\t$.response.setBody(e.toString());\n\t\t}\n\t}\n\tfinally {\n\t\tsql.closeConnection();\n\t\t$.response.status = httpStatus || $.net.http.BAD_REQUEST;\n\t}\n}", "save() {\n try {\n this._toggleSaveThrobber();\n this._readFromForm();\n this.dao.save();\n\n // make sure the edit input is showing the correct id, reload data from server\n document.getElementById('edit_id').value = this.dao.id;\n this.read();\n \n } catch(e) {\n console.log(e);\n alert(e);\n }\n this._toggleSaveThrobber();\n }", "function insert(query, params, response) {\n connection.query(query, params, (error, result) => {\n if (error) {\n response.status(500);\n response.json({\n ok: false,\n results: error.message,\n });\n } else {\n response.json({\n ok: true,\n results: result.insertId,\n });\n }\n });\n}", "function handleSubmit(e) {\r\n // update to database\r\n }", "createEmployee(employee) {\r\n return this.connection.query(\"INSERT INTO employee SET ?\", employee);\r\n }", "insertProduct(product) {\n return this.pool\n .request()\n .input(\"id\", sql.VarChar(255), product.id)\n .input(\"subtitle\", sql.NVarChar(255), product.subtitle)\n .input(\"title\", sql.NVarChar(255), product.title)\n .input(\"image\", sql.VarChar(255), product.image)\n .input(\"inAssortment\", sql.Bit, product.inAssortment)\n .input(\"isAvailable\", sql.Bit, product.isAvailable)\n .input(\"link\", sql.NVarChar(255), product.link)\n .input(\"status\", sql.NVarChar(255), product.status)\n .input(\"retailSet\", sql.Bit, product.retailSet)\n .input(\"brand\", sql.NVarChar(255), product.brand)\n .input(\"category\", sql.NVarChar(255), product.category)\n .input(\"prices\", sql.NVarChar(sql.MAX), JSON.stringify(product.prices))\n .input(\n \"quantityOptions\",\n sql.NVarChar(sql.MAX),\n JSON.stringify(product.quantityOptions)\n )\n .input(\n \"primaryBadge\",\n sql.NVarChar(sql.MAX),\n JSON.stringify(product.primaryBadge)\n )\n .input(\n \"secondaryBadges\",\n sql.NVarChar(sql.MAX),\n JSON.stringify(product.secondaryBadges)\n )\n .input(\n \"promotions\",\n sql.NVarChar(sql.MAX),\n JSON.stringify(product.promotions)\n ).query(`\n USE ${this.DB_NAME}\n UPDATE products \n SET \n subtitle = @subtitle,\n title = @title,\n image = @image,\n inAssortment = @inAssortment,\n isAvailable = @isAvailable,\n link = @link,\n status = @status,\n retailSet = @retailSet,\n brand = @brand,\n category = @category,\n prices = @prices,\n quantityOptions = @quantityOptions,\n primaryBadge = @primaryBadge,\n secondaryBadges = @secondaryBadges,\n promotions = @promotions\n WHERE id=@id\n IF @@ROWCOUNT = 0\n INSERT INTO ${this.TABLE_NAME} \n (\"id\",\"subtitle\",\"title\",\"image\", \"inAssortment\", \"isAvailable\",\"link\",\"status\",\"retailSet\",\"brand\",\"category\",\"prices\",\"quantityOptions\",\"primaryBadge\",\"secondaryBadges\",\"promotions\")\n VALUES \n (@id, @subtitle,@title,@image, @inAssortment, @isAvailable, @link, @status, @retailSet, @brand,@category, @prices,@quantityOptions, @primaryBadge, @secondaryBadges, @promotions);\n `);\n }", "function sendData(postData){\n var clientServerOptions = {\n body: JSON.stringify(postData),\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n }\n }\n // on response from server, log response\n let response = request('POST', 'http://localhost:8983/solr/gettingstarted/update/json/docs?commit=true&overwrite=true', clientServerOptions);\n if (response.statusCode !== 200) {\n throw(response.body)\n } else {\n //console.log('sent')\n }\n}", "save() {\n // use. result when you might want a report about how many rows got affected\n return db.result(`\n \n update users set\n first_name='${this.firstName}',\n last_name='${this.lastName}',\n email='${this.email}',\n password='${this.password}' \n \n where id=${this.id}\n `)\n }", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"POST is not supported, perform a GET to update the status from HCI\"\n\t\t\t}));\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t//Get all the Entries that are applicable for update\n\t\t\t\tvar oDBRecords = getAllDBEntries();\n\t\t\t\t//Read the Status from Cloud Integration\n\t\t\t\tvar oHCIRecords = retrieveRecordsFromHCI(oDBRecords.valueSet);\n\t\t\t\t//Execute the updates\n\t\t\t\tvar oUpdateResults = mapUpdates(oHCIRecords.retrievedValues, oDBRecords.valueMap);\n\t\t\t\t//Write to the trace\n\t\t\t\t$.trace.info(JSON.stringify({\n\t\t\t\t\ttotalDBRecords: oDBRecords.valueSet.length,\n\t\t\t\t\ttotalHCIRecordsRetrieved: oHCIRecords.retrievedValues.length,\n\t\t\t\t\ttotalHCIFailedRetrievals: oHCIRecords.failedRetrievals.length,\n\t\t\t\t\tHCIFailedRetrievalDetails: oHCIRecords.failedRetrievals,\n\t\t\t\t\tupdatesRequested: oUpdateResults.iUpdatesRequested,\n\t\t\t\t\tupdatesProcessed: oUpdateResults.iUpdatesProcessed\n\t\t\t\t}));\n\t\t\t} catch (err) {\n\t\t\t\t$.trace.error(JSON.stringify({\n\t\t\t\t\tmessage: err.message\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate\n\t\t\t}));\n\t\t}\n\t}", "function handleUpdate(req, res) {\n console.log('handleUpdate called');\n let id = req.params.id;\n let type = req.body.type;\n let setup = req.body.setup;\n let punchline = req.body.punchline;\n let values = [type, setup, punchline, id];\n\n\n console.log({ id });\n let sql = `update jokes set type=$1,setup=$2,punchline=$3 where id=$4;`;\n client.query(sql, values).then(data => {\n console.log({ data });\n })\n\n\n}", "addLevelDBData(key,value){\n\n return db.put(key, value , function(err){\n if(err)\n console.log(\"submission failed\")\n });\n \n}", "initUpdateEndpoint() {\n this.router.put('/:id', (req, res) => {\n if (!req.body.id) {\n try {\n req.body.id = parseInt(req.params.id);\n } catch (error) {\n return this.sendErr(res, 400, error.message);\n }\n }\n return this.getDAO().update(req.body, { user: req.user })\n .then(user => res.status(200).send(user))\n .catch(err => {\n debug('[update]', err.message);\n return this.sendErr(res, 400, err.message);\n });\n });\n }", "save() {}", "getUpdateEmployeeManager(){\n connection.query(\"SELECT * FROM employees\", function(err, res) {\n if (err) throw err;\n \n // Log all results of the SELECT statement\n console.log(res);\n connection.end();\n });\n }", "function insertData(sqlQuery, obj, successFn, errFn){\r\n console.log(\"\\nSQL Query::\"+sqlQuery);\r\n console.log(\"\\nObJ : \" + obj);\r\n connMgr.getConn(function (connection) {\r\n connection.query(sqlQuery, obj, function(err,res){\r\n if(err) throw err;\r\n if(successFn)successFn(obj, res.insertId);\r\n if(res != undefined)\r\n console.log('Last insert ID:', res.insertId);\r\n }, errFn);\r\n });\r\n}", "function postInsert(response) {\n\tif (response != \"ERROR\") {\n\t\twindow.location.reload();\n\t} else\n\t\talert(\"Action failed\");\n}", "function saveBorrowing() {\n retrieveValues();\n saveToServer();\n}", "function main() {\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\tif (gvMethod === \"DELETE\") {\n\t\t\t\t//Perform Table Entry to be deleted from Table\n\t\t\t\ttry {\n\t\t\t\t\t_deleteEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table entry deletion:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"UPDATE\") {\n\t\t\t\ttry {\n\t\t\t\t\t_updateEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table update:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"CREATE\") {\n\t\t\t\t//Perform Table Entry to be created\n\t\t\t\ttry {\n\t\t\t\t\t_createEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"ADD\") {\n\t\t\t\t//Perform Table Entry to be created\n\t\t\t\ttry {\n\t\t\t\t\t_addEntries();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"DELETE_CONDITION\") {\n\t\t\t\t//Perform Table Entries to be deleted Table\n\t\t\t\ttry {\n\t\t\t\t\t_deleteAll();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table entry deletion:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate,\n\t\t\t\tStatus: gvStatus,\n\t\t\t\tCONDITION_ID: gvConditionId\n\t\t\t}));\n\n\t\t} else if ($.request.method === $.net.http.GET) {\n\t\t\t//Read Entries from the Table\n\t\t\ttry {\n\t\t\t\t_getEntries();\n\t\t\t} catch (errorObj) {\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tresult: gvErrorMessage,\n\t\t\t\t\tStatus: gvStatus\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}", "handleAdd() {\n const { opps, formData } = this.state\n // Optimistic update\n this.teardownForm()\n this.setState({\n opps: opps.slice().concat([formData])\n })\n\n // Update server\n xhr({\n url: '/api/opps',\n method: 'POST',\n json: formData,\n }, (err, res) => {\n if (err || res.statusCode !== 201) {\n // Rollback if error\n return this.setState({opps})\n }\n\n // Sync client and server\n return this.setState({\n opps: res.body.opps\n })\n })\n }", "insertNewEmployee() {\n return `INSERT INTO employee (first_name, last_name, role_id, manager_id)\n VALUES (?, ?, ?, ?);`\n}", "function add(requestIdActive, httpMethod, requestTitle, urlRequest, requestBody, requestHeadersKey1, requestHeadersValue1, requestDescription) {\n\n //TESTING to double confirm this func triggered by new request, not existing (update).\n //check either requestIdActive has value or not. has value = update, no value = save\n if (requestIdActive) {\n //means update\n alert(\"requestIdActive has a value!\");\n } else {\n //means save a new data\n alert(\"requestIdActive has no value!\");\n }\n\n const uuidV4 = require('uuid/v4');\n var idRequest = uuidV4();\n\n alert(idRequest + \" \" + httpMethod + \" \" + requestTitle + \" \" + urlRequest + \" \" + requestHeadersKey1 + \" \" + requestHeadersValue1 + \" \" + requestBody + \" \" + requestDescription);\n var request = db.transaction([\"requestlist\"], \"readwrite\")\n\n .objectStore(\"requestlist\")\n .add(\n {\n id: idRequest,\n method: httpMethod,\n title: requestTitle,\n url: urlRequest,\n headers: [{key : requestHeadersKey1, value: requestHeadersValue1}],\n body: requestBody,\n description: requestDescription\n // body: \"{ \\\"id\\\": \\\"3a08a161-80ef-44bf-a23e-9cf47d821bba\\\", \\\"name\\\": \\\"James Burke\\\"}\"\n }\n );\n\n request.onsuccess = function(event) {\n // alert(\"Data has been added to your database.\");\n };\n\n request.onerror = function(event) {\n // alert(\"Unable to add data\\r\"+ idRequest +\"is aready exist in your database! \");\n }\n\n // savetoMongoDB();\n // notifyClient(id);\n\n //check if sync = On\n if(sync==='on') {\n savetoMongoDBSelfHosted(idRequest)\n }\n else {\n //TODO : need to reload new data in left menu if sync is OFF!\n alert(\"sync is not on, this will not be saved to server!\")\n menuLoadNewlyAddedRequest(idRequest)\n }\n\n}", "function addUserToDB(id , name) {\n url = serverURL + \"/sendUserInfo\";\n sendPostRequest(url, {'id': id,'name': name});\n}", "function save_results(e_val, a_val, c_val, n_val, o_val) {\n let user_results = {\n e_val: e_val,\n a_val: a_val,\n c_val: c_val,\n n_val: n_val,\n o_val: o_val\n };\n //Get working with DB\n const url = \"/test\";\n var xhr = new XMLHttpRequest();\n xhr.open(\"PUT\", url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify(user_results));\n}", "save() {\n // get values from form\n var data = {\n _token: $('#snmpDialogContent #_token').val(),\n id: $('#snmpDialogContent #snmpId').val(),\n name: $('#snmpDialogContent #snmpName').val(),\n ip_address: $('#snmpDialogContent #snmpIPAddress').val(),\n format: $('#snmpDialogContent #snmpFormat').val(),\n snmp_version_id: $('#snmpDialogContent #snmpVersion').val(),\n read_community: $('#snmpDialogContent #snmpReadCommunity').val(),\n write_community: $('#snmpDialogContent #snmpWriteCommunity').val()\n };\n\n\n // If there is an id, update. Otherwise, add new\n var method = data.id.length > 0 ? 'PUT' : 'POST';\n var url = data.id.length > 0 ? '/api/Snmpforward/' + data.id : \"/api/Snmpforward\";\n\n\n $.ajax({\n url: url,\n method: method,\n dataType: 'json',\n data: data,\n success: function (data) {\n window.snmp.grid.reload();\n window.snmp.cancel();\n }\n });\n }", "insert() {\r\n var sql = 'INSERT INTO post (id, title, text) VALUES (?,?,?)'\r\n var params = [this.id, this.title, this.text]\r\n db.run(sql, params, function (err, result) {\r\n if (err) {\r\n throw err // TODO: useful error handling here...\r\n return\r\n }\r\n });\r\n }", "function insertOrUpdate(req, res){\n var slColl = utils.getCollection(req);\n var lid = req.params.listId;\n\n if (lid && lid.match(/^[0-9a-fA-F]{24}$/)) {\n\n var itemName = req.body.itemName;\n var itemStatus = req.body.itemStatus;\n if (itemName && itemStatus){\n var newElem = { 'itemname': itemName ,\n 'itemstatus': itemStatus };\n\n proceedIfListExists(slColl, lid, newElem, res, upsert);\n } else {\n res.send(400, \"You need to provide valid itemName and itemStatus properties.\");\n }\n } else {\n res.send(400, \"The supplied List ID is not valid.\");\n }\n}", "function addTemplateToDB(data, key, objectStore) {\n var request = window.indexedDB.open('formsAdministrationDB', 1);\n var data1;\n var formhtml;\n request.onsuccess = function (event) {\n var db = event.target.result;\n var tx = db.transaction(\"administratorTemplate\", 'readwrite');\n var store = tx.objectStore(\"administratorTemplate\");\n data1 = store.get(key);\n data1.onsuccess = function (event) {\n\n store.put(data, key);\n \n }\n\n\n\n\n };\n\n}", "function addToDbHandler(req,res){\n\n// collect the data (first step)\nlet { name, image, level} = req.query; // name ,level,image is the value for (name) attribute in the form\n // importanttttt (req.body) when the method is (post , PUT,DELETE) , and (req.body) when method is (get)\n // our form is GET method so we used req.query\n// insert the data\nlet sql= `INSERT INTO digi_test (name , image ,level) VALUES ($1,$2,$3);`; // $... THIS TO MAKE SECURE VALUES\nlet safeValues= [ name,image,level] ; // now the values is stored \n\nclient.query(sql,safeValues).then(()=>{ // here there is no result so we put ()\n\nres.redirect('/selectData') // this route will do the selecting the data to render them in/from db\n // now do a route definition for it and a function above \n}) // redirect : have one parameter just , and its pirpose is to activate this route inside it \n\n}", "async update ({ params, request, response }) {\n const {name, observetion } = request.all()\n const client = await Client.findOrFail(params.id)\n client.name = name\n client.observetion = observetion\n await client.save()\n return response.status(200).send(client)\n\n }", "function startServerSideOperation () { // this is a lot of stuff - best to extract into a function and call the function where you want all this to happen\n // console.log( 'in startServerSideOperation' );\n // assemble object from input. don't have to set as new vars, can put the stuff after the = in inputObject, but looks cleaner to do it this way\n var firstNumber = $('#firstNum').val();\n var secondNumber = $('#secondNum').val();\n var mathOperation = doThis;\n\n var inputObject = {\n \"input1\": firstNumber,\n \"input2\": secondNumber,\n \"oper\": mathOperation\n }; // end inputObject\n\n // post to server with ajax;\n $.ajax({ // this is a method call to AJAX in jQuery that receives an object\n url: \"/pathPost\",\n type: \"POST\", // makes request to server, server posts this ajax call to above url using app.post. if type were GET, would make request to server, server would get this ajax call from above url.\n data: inputObject, // what gets sent to the server\n success: function(newData){ // represents response from server (calculation completed in server node module that gets passed in app.post as res.write or res.send)\n console.log(newData);\n // // if post is successful we've received back \"newData\"\n // // send \"newData\" to processResponse to do something with it (display to DOM)\n processResponse(newData);\n },\n statusCode: {\n 404: function(){\n alert('error connecting to server');\n } // end 404\n } // end statusCode\n }); // end AJAX request\n} // end startServerSideOperation function", "function remoteSync(method, model, options, error) {\n switch (method) {\n case \"read\":\n RemoteSync.fetch.apply(this, arguments)\n break;\n case \"create\":\n case \"update\":\n case \"delete\":\n RemoteSync.save.apply(this, arguments)\n break;\n break;\n }\n }", "function creation(request,response,table,params) {\n\tconst req=request.query\n\tconst query=\"INSERT INTO \"+table+\" SET ?\";\n\tvar params2=[];\n\tconst params3={nom:req.nom,surnom:req.surnom,qtte_heures:req.qtth,qtte_heures_sup:req.qtthsup}\n\tfor(var i = 0;i<params.length;i++){\n\t\tparams2.push(params[i]+':req.'+params[i]);\n\t}\n\tconsole.log(params2);\n\tconnection.query(query,params2,(err,result,fields) => {\n \t\tif(err) throw err;\n \t\tresponse.json({saved:result.affectedRows,inserted_id:result.insertId})\n\t});\n}", "function ce(e,t,n){if(!n||!P(t,\"upsert\",!1))return;z(e)[n]||(t.overwrite?e[n]=0:(e.$setOnInsert||(e.$setOnInsert={}),e.$setOnInsert[n]=0))}", "update(req, res, next) {\n res.status(200).json({\n msg: 'Not implemented yet!'\n }).end()\n }", "async function ctrl(){\n const users = await User\n .find({id:req.body.id});\n if(users.length===0){\n addNew();\n } else\n res.status(400).send(`HTTP 400 -- Bad Request ~Same User in DB`);\n }", "function UploadProcess(serverIP, fileName, dbObj) {\r\n\r\n\t// Delete the doc before insert\r\n\tDBOperationRemoveDocByNode(serverIP, fileName, dbObj);\r\n\r\n\t// Parse the doc to MongoD\r\n\tDBOperationParseETLToMongoD(serverIP, fileName, dbObj);\r\n\r\n\t//Query count\r\n\t//DBOperationFindDoc(serverIP, fileName, dbObj);\r\n}", "function _addEntries() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Next Item Number available\n\t\t\tvar lvItem;\n\t\t\tlvItem = _getNextItem(oBody.CONDITION_ID);\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\n\t\t\t//Build the Statement to insert the entries\n\t\t\tvar oStatement = oConnection.prepareStatement('INSERT INTO \"' + gvSchemaName + '\".\"' + gvTableName +\n\t\t\t\t'\" VALUES (?, ?, ?, ?, ?, ?)');\n\n\t\t\t//Loop through the items to be added to the database\n\t\t\tfor (var i = 0; i < oBody.ITEMS.length; i++) {\n\t\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t\t//Id\n\t\t\t\toStatement.setInt(1, parseFloat(oBody.CONDITION_ID));\n\t\t\t\t//Item\n\t\t\t\tlvItem = lvItem + 1;\n\t\t\t\toStatement.setInt(2, lvItem);\n\t\t\t\t//Structure\n\t\t\t\toStatement.setString(3, oBody.ITEMS[i].STRUCTURE);\n\t\t\t\t//Field\n\t\t\t\toStatement.setString(4, oBody.ITEMS[i].FIELD);\n\t\t\t\t//Operator\n\t\t\t\toStatement.setString(5, oBody.ITEMS[i].OPERATOR);\n\t\t\t\t//Value\n\t\t\t\toStatement.setString(6, oBody.ITEMS[i].VALUE);\n\t\t\t\t//Add Batch process to executed on the database\n\t\t\t\toStatement.addBatch();\n\t\t\t}\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries created successfully: \" + gvTableName + \";\";;\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem inserting entries into the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "function registerResponse(resp,cb){\n if(resp.response != \"\"){\n console.log(\"Response registration Start\");\n dbShellResponsesForExercise.transaction(\n function(tx){\n// console.log(resp.teacher_id + \" \"+ resp.student_id + \" \" + resp.lesson_id + \" \" + resp.exercise_id + \" \" + resp.response);\n// \"CREATE TABLE IF NOT EXISTS responseandmark(row_id INTEGER,teacher_id INTEGER,student_id INTEGER,lesson_id INTEGER,\\\n// exercise_id INTEGER,response,scoremark,comment,PRIMARY KEY(row_id))\"\n tx.executeSql(\"select response from responseandmark where teacher_id=? and student_id=? and lesson_id=? and exercise_id=?\",\n [resp.teacher_id,resp.student_id,resp.lesson_id,resp.exercise_id],\n function(tx1,res1){\n if(res1.rows.length == 0){\n tx.executeSql( \"insert into responseandmark(teacher_id,student_id,lesson_id,exercise_id,response) \\\n values(?,?,?,?,?)\",\n [resp.teacher_id,resp.student_id,resp.lesson_id,resp.exercise_id,resp.response],\n function(tx2,res2){\n console.log(\"Response data registered(no update) for student in the responseandmark table in database.\");\n },\n function(err){\n console.log(\"Response register(no update) Error: \"+err.message + \"\\nCode=\"+err.code);\n alert(\"Response register(no update) Error: \"+err.message + \"\\nCode=\"+err.code);\n }\n );\n }else{\n console.log(\"scoremark = \" + resp.scoremark + \"comment = \" + resp.comment);\n\n \n if(resp.scoremark == null && resp.comment == null){\n tx1.executeSql(\"update responseandmark set response=? where teacher_id=? and student_id=? and lesson_id=? and exercise_id=?\",\n [resp.response,resp.teacher_id,resp.student_id,resp.lesson_id,resp.exercise_id],\n function(tx3,res3){\n console.log(\"Response data registered(update) for student in the responseandmark table in database.\");\n },\n function(err){\n console.log(\"Response register(update) Error: \"+err.message + \"\\nCode=\"+err.code);\n alert(\"Response register(update) Error: \"+err.message + \"\\nCode=\"+err.code);\n }\n ); \n }else{\n tx1.executeSql(\"update responseandmark set response=?,scoremark=?,comment=? where teacher_id=? and student_id=? and lesson_id=? and exercise_id=?\",\n [resp.response,resp.scoremark,resp.comment,resp.teacher_id,resp.student_id,resp.lesson_id,resp.exercise_id],\n function(tx3,res3){\n console.log(\"Response data registered(update with score,comment) for student in the responseandmark table in database.\");\n $(\"#scoremarkHolder\").html(\"スコアー: \" + resp.scoremark);\n $(\"#commentHolder\").html(\"先生のコメント: \" + resp.comment);\n },\n function(err){\n console.log(\"Response register(update with score,comment) Error: \"+err.message + \"\\nCode=\"+err.code);\n alert(\"Response register(update with score,comment) Error: \"+err.message + \"\\nCode=\"+err.code);\n }\n );\n }\n \n }\n },\n function(err){\n console.log(\"Response register Error: \"+err.message + \"\\nCode=\"+err.code);\n alert(\"Response register Error: \"+err.message + \"\\nCode=\"+err.code);\n }\n );\n },function(err){\n console.log(\"Response Register DB Error: \"+err.message + \"\\nCode=\"+err.code);\n alert(\"Response Register DB Error: \"+err.message + \"\\nCode=\"+err.code);\n },cb\n );\n\n }\n\n}", "function __update(url,data,callback){\n if(_debug)console.log(\"update exist document against \"+url,data);\n var req = new XMLHttpRequest();\n req.open('PATCH', url, true);\n req.setRequestHeader('Content-Type', 'application/json');\n req.setRequestHeader('Authorization', _auth);\n req.setRequestHeader('Api-Key', 'foobar');\n req.onreadystatechange = function() {\n if (req.readyState === 4) {\n if (req.status >= 200 && req.status < 400) {\n if(_debug)console.log(\"commit successfully. got callback\",JSON.parse(req.responseText),req);\n //将meta数据、提交的item数据、返回结果合并作为item,存储到本地\n /**\n var res = JSON.parse(req.responseText);\n const mergedData = {\n ...JSON.parse(_meta_item),\n ...data,\n ...res\n };\n //提交到本地:返回数据带有_key等信息\n if(_debug)console.log(\"commit successfully. got callback\",mergedData);\n __postMessage(mergedData); \n //**/ \n } else {\n // Handle error case\n }\n if(callback && typeof callback == 'function'){\n callback();\n }\n }\n };\n req.onerror = function(jqXHR, textStatus, errorThrown){\n //do nothing\n console.log(\"update document error.\",jqXHR,textStatus,errorThrown);\n }; \n try{\n delNullProperty(data)//删除其中空值,仅仅更新有数据的部分,避免数据覆盖\n //自动添加meta数据\n const mergedData = {\n ...data,\n ...JSON.parse(_meta_item)\n };\n if(data.status&&data.status.sync)mergedData.status.sync=data.status.sync;\n if(data.meta && data.meta.category)mergedData.status.classify=\"ready\";\n if(data.timestamp && data.timestamp.classify)mergedData.timestamp.classify=data.timestamp.classify; \n //if(_debug)\n console.log(\"try to send update data.\",mergedData); \n req.send(JSON.stringify(mergedData));//post data \n //提交到本地:由于网络存在中断情况,此处先提交到本地,在控制面板中显示\n //if(_debug)console.log(\"try to send local storage\",mergedData);\n //__postMessage(mergedData); \n }catch(e){\n if(_debug)console.log(\"Error while update data to create new document.\"+e);\n }\n}", "function insertRecord(){\n\n var usernametemp = $('input:text[id=username]').val();\n\n var usernameemailtemp = $('input:text[id=useremail]').val();\n\n db.transaction(function (tx){ tx.executeSql(insertStatemen); });\n\n //tx.executeSql(SQL Query Statement,[ Parameters ] , Sucess Result Handler Function, Error Result Handler Function);\n}", "function handlerCRUD(fullObject, operationType) {\n\n\n //console.log(fullObject); // OK\n //console.log(operationType); // OK\n\n let helpers = {\n statusID: function (valueNeeded) {\n\n let newStatus;\n\n statuses.forEach(function (currentValue) {\n if (currentValue.Status == valueNeeded) {\n newStatus = currentValue.ID;\n }\n });\n\n return newStatus.toString();\n },\n internalID: function (fullObjId, fullObjInternalId) {\n\n console.log(fullObjId, fullObjInternalId);\n\n if (fullObjInternalId == '0') {\n return fullObjId;\n } else {\n return fullObjInternalId;\n }\n }\n };\n\n\n if (operationType == \"Update\") {\n\n\n\t let valuepairs = [\n\t\t\t[\"Title\", fullObject.RequestCodeSAP],\n\t\t\t[\"Date\", new Date(fullObject.StartDate).toISOString()],\n\t\t\t[\"Approver\", fullObject.ApproverID],\n\t\t\t[\"Reason\", fullObject.Reason],\n\t\t\t[\"WorkSchedule\", fullObject.WorkScheduleID],\n\t\t\t[\"OvertimeNo\", fullObject.OvertimeNo],\n\t\t\t[\"HolidaysNo\", fullObject.HolidaysNo],\n\t\t\t[\"End_x0020_Date\", new Date(fullObject.EndDate).toISOString()],\n\t\t\t[\"ChildrenCareHours\", fullObject.ChildrenCareHours],\n\t\t\t[\"TimeAdmin\", fullObject.IdTimeAdmin],\n\t\t];\n\n\n\n /* this operation make sens only if update */\n\n let statusChanged = helpers.statusID(\"Changed\");\n let statusHistory = helpers.statusID(\"History\");\n\n //console.log(\"statusy pierwszy changed: \", statusChanged, statusHistory);\n console.log(\"inside update\");\n //console.log(fullObject);\n console.log(fullObject.ID, fullObject.InternalID);\n\n let internalID = \"\" + helpers.internalID(fullObject.ID, fullObject.InternalID);\n console.log(\"internal ID \", internalID);\n\n\n\n valuepairs.push([\"InternalID\", '' + internalID]);\n valuepairs.push([\"Status\", helpers.statusID(\"Changed\")]);\n\n console.log(valuepairs);\n\n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"New\",\n listName: \"Requests\",\n valuepairs: valuepairs,\n completefunc: function (xData, Status) {\n console.log(\"New Changed!\" + \" \" + Status);\n }\n });\n\n\n\n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"Update\",\n listName: \"Requests\",\n ID: fullObject.ID,\n valuepairs: [\n [\"InternalID\", internalID],\n [\"Status\", statusHistory]\n ],\n completefunc: function (xData, Status) {\n console.log(\"History Request!\" + \" \" + Status);\n }\n });\n\n } else if (operationType == \"Accepted\") {\n \n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"Update\",\n listName: \"Requests\",\n ID: fullObject.ID,\n valuepairs: [[\"Status\", helpers.statusID(operationType)]],\n completefunc: function (xData, Status) {\n console.log(\"Request Approved!\" + \" \" + Status);\n }\n });\n\n } else if (operationType == \"Declined\") {\n \n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"Update\",\n listName: \"Requests\",\n ID: fullObject.ID,\n valuepairs: [[\"Status\", helpers.statusID(operationType)]],\n completefunc: function (xData, Status) {\n console.log(\"Request Declined!\" + \" \" + Status);\n }\n });\n\n } else if (operationType == \"Create\") {\n \n \n\t let valuepairs = [\n\t\t\t[\"Title\", fullObject.RequestCodeSAP],\n\t\t\t[\"Date\", new Date(fullObject.StartDate).toISOString()],\n\t\t\t[\"Approver\", fullObject.ApproverID],\n\t\t\t[\"Reason\", fullObject.Reason],\n\t\t\t[\"WorkSchedule\", fullObject.WorkScheduleID],\n\t\t\t[\"OvertimeNo\", fullObject.OvertimeNo],\n\t\t\t[\"HolidaysNo\", fullObject.HolidaysNo],\n\t\t\t[\"End_x0020_Date\", new Date(fullObject.EndDate).toISOString()],\n\t\t\t[\"ChildrenCareHours\", fullObject.ChildrenCareHours],\n\t\t\t[\"TimeAdmin\", fullObject.IdTimeAdmin],\n\t\t];\n\n valuepairs.push([\"InternalID\", '0']);\n valuepairs.push([\"Status\", helpers.statusID(\"Submitted\")]);\n\n\n console.log(valuepairs);\n\n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"New\",\n listName: \"Requests\",\n valuepairs: valuepairs,\n completefunc: function (xData, Status) {\n console.log(\"Request Sent for Approval!\" + \" \" + Status);\n let tmpstr = xData.responseText;\n let arr = tmpstr.split(\" \");\n // console.log(arr);\n let ktory = 29; \n arr.forEach( function(item, indx) {\n \tif(item.indexOf(\"ows_ID=\") == 0 ) {\n \t\tktory = indx;\n \t\t\n \t\tconsole.log(item);\n \t}\n });\n // always 29? - i masz odpowiedz, ze nie zawsze jest to 29!!!\n\n //console.log( arr[ktory].replace('\"','').replace('\"','').split(\"=\")[1] );\n // return parseInt( arr[29].replace('\"','').replace('\"','').split(\"=\")[1] );\n let newAjdi = arr[ktory].replace('\"','').replace('\"','').split(\"=\")[1];\n fullObject.ID = newAjdi;\n }\n });\n } else {\n\n\n\n let statusDelete;\n if (fullObject.Status == helpers.statusID(\"Accepted\")) {\n statusDelete = helpers.statusID(\"Removing Accepted\");\n } else if (fullObject.Status == helpers.statusID(\"Completed\")) {\n statusDelete = helpers.statusID(\"Removing Completed\");\n } else {\n statusDelete = helpers.statusID(\"Deleted\");\n }\n $().SPServices({\n operation: \"UpdateListItems\",\n async: false,\n batchCmd: \"Update\",\n listName: \"Requests\",\n ID: fullObject.ID,\n valuepairs: [\n\t\t\t\t[\"Status\", statusDelete]\n\t\t\t],\n completefunc: function (xData, Status) {\n console.log(\"Data Deletion Done!\");\n }\n });\n }\n \n \n}", "function _createEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Latest ID Number\n\t\t\tvar lvId;\n\t\t\tif (!oBody.CONDITION_ID) {\n\t\t\t\tlvId = _getNextId();\n\t\t\t} else {\n\t\t\t\tlvId = oBody.CONDITION_ID;\n\t\t\t}\n\n\t\t\t//Item Number\n\t\t\tvar lvItem = 0;\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\n\t\t\t//Build the Statement to insert the entries\n\t\t\tvar oStatement = oConnection.prepareStatement('INSERT INTO \"' + gvSchemaName + '\".\"' + gvTableName +\n\t\t\t\t'\" VALUES (?, ?, ?, ?, ?, ?)');\n\n\t\t\t//Loop through the items to be added to the database\n\t\t\tfor (var i = 0; i < oBody.ITEMS.length; i++) {\n\t\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t\t//Id\n\t\t\t\toStatement.setInt(1, parseFloat(lvId));\n\t\t\t\t//Item\n\t\t\t\tlvItem = lvItem + 1;\n\t\t\t\toStatement.setInt(2, lvItem);\n\t\t\t\t//Structure\n\t\t\t\toStatement.setString(3, oBody.ITEMS[i].STRUCTURE);\n\t\t\t\t//Field\n\t\t\t\toStatement.setString(4, oBody.ITEMS[i].FIELD);\n\t\t\t\t//Operator\n\t\t\t\toStatement.setString(5, oBody.ITEMS[i].OPERATOR);\n\t\t\t\t//Value\n\t\t\t\toStatement.setString(6, oBody.ITEMS[i].VALUE);\n\t\t\t\t//Add Batch process to executed on the database\n\t\t\t\toStatement.addBatch();\n\t\t\t}\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries created successfully: \" + gvTableName + \";\";;\n\t\t\tgvConditionId = lvId;\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem inserting entries into the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "function postAppliance(applianceDbObj) {\n\n}", "async save(isCreated){\n \n let sql = '';\n // insert\n if(isCreated){\n \n sql = `INSERT INTO ${this.tableName} (tenTheLoai,moTa) VALUES ('${this.columns.tenTheLoai}','${this.columns.moTa}')`;\n try {\n let results = await database.excute(sql);\n this.id = results.insertId;\n } catch (error) {\n throw error;\n }\n }\n\n // update\n else{\n sql = `UPDATE ${this.tableName} SET moTa='${this.columns.moTa}',tenTheLoai='${this.columns.tenTheLoai}' `+\n `WHERE id = ${this.id}`;\n try {\n let rs = await database.excute(sql);\n this.id = rs.id; \n } catch (error) {\n throw error;\n }\n }\n }", "function insertRow() {\n let mydata = {\n \"commit_hash\": commit_hash.value,\n \"branch_name\": branch_name.value,\n \"os\": os.value,\n \"cpu\": cpu.value,\n \"mem\": mem.value,\n \"note\": note.value\n };\n let url = \"/data\";\n\n // checking if browser does CORS\n let xhr = createCORSRequest('POST', url);\n if (!xhr) { throw new Error('CORS not supported'); }\n xhr.setRequestHeader('Content-type', 'application/json');\n\n xhr.onload = function() {\n let responseStr = xhr.responseText;\n let status = xhr.status;\n console.log(responseStr,status);\n\n if(status == 400) { // failure\n // document.getElementById(\"errormessage\").textContent = \"Invalid username or password\";\n }\n else if(status == 200) { \n // clear fields\n commit_hash.value = \"\";\n branch_name.selectedIndex = 0;\n os.selectedIndex = 0;\n cpu.value = \"\";\n mem.value = \"\";\n note.value = \"\";\n\n // reload table\n mytable.draw();\n }\n else {\n console.log(\"should not happen\");\n }\n };\n\n xhr.onerror = function() { alert('Error occured.'); };\n\n xhr.send(JSON.stringify(mydata));\n}", "async function run(client) {\n let ddl = `CREATE TABLE IF NOT EXISTS ${TABLE_NAME} \\\n(id INTEGER, name STRING, userInfo JSON, PRIMARY KEY(id))`;\n\n console.log('Create table ' + TABLE_NAME);\n let res = await client.tableDDL(ddl, {\n tableLimits: {\n readUnits: 1,\n writeUnits: 5,\n storageGB: 1\n }\n });\n console.log(' Creating table %s', res.tableName);\n console.log(' Table state: %s', res.tableState.name);\n\n // Wait for the operation completion\n await client.forCompletion(res);\n console.log(' Table %s is created', res.tableName);\n console.log(' Table state: %s', res.tableState.name);\n\n ddl = `CREATE INDEX IF NOT EXISTS city_idx ON ${TABLE_NAME} \\\n(userInfo.city AS STRING)`;\n\n console.log('\\nCreate index city_idx on %s', TABLE_NAME);\n res = await client.tableDDL(ddl);\n console.log(' Creating index city_idx');\n console.log(' Table state: %s', res.tableState.name);\n\n // Wait for the operation completion\n await client.forCompletion(res);\n console.log(' Index city_idx is active');\n\n // Write some records\n res = await client.put(TABLE_NAME, {\n id: 10,\n name: 'Taylor',\n userInfo: {\n age: 79,\n city: 'Seattle'\n }\n });\n res = await client.put(TABLE_NAME, {\n id: 33,\n name: 'Xiao',\n userInfo: {\n age: 5,\n city: 'Shanghai'\n }\n });\n res = await client.put(TABLE_NAME, {\n id: 49,\n name: 'Supriya',\n userInfo: {\n age: 16,\n city: 'Bangalore'\n }\n });\n res = await client.put(TABLE_NAME, {\n id:55,\n name: 'Rosa',\n userInfo: {\n age: 39,\n city: 'Seattle'\n }\n });\n\n // Find user with id 49 with a simple query\n let statement = `SELECT * FROM ${TABLE_NAME} WHERE id = 49`;\n console.log('\\nUse a simple query: %s', statement);\n await runQuery(client, statement);\n\n // Find all the Seattle dwellers with a prepared statement\n statement = `DECLARE $city STRING; SELECT * FROM ${TABLE_NAME} u WHERE \\\nu.userInfo.city = $city`;\n console.log(`\\nUse a prepared statement: '${statement}'`);\n const preparedStmt = await client.prepare(statement);\n const city = 'Seattle';\n console.log(' Set variable $city to \"%s\" in prepared statement', city);\n preparedStmt.set('$city', city);\n // We limit number of rows to 1 in each query invocation to illustrate\n // the use of the continuation key\n await runQuery(client, preparedStmt, 1);\n\n // Drop the table\n console.log('\\nDrop table');\n ddl = `DROP TABLE ${TABLE_NAME}`;\n res = await client.tableDDL(ddl);\n console.log(' Dropping table %s', res.tableName);\n\n // Wait for the table to be removed\n await client.forCompletion(res);\n console.log(' Table state is %s', res.tableState.name);\n}", "function saveChanges() {\n var grid = $grid.pqGrid('getInstance').grid;\n\n //debugger;\n //attempt to save editing cell.\n if (grid.saveEditCell() === false) {\n return false;\n }\n\n var isDirty = grid.isDirty();\n if (isDirty) {\n //validate the new added rows. \n var addList = grid.getChanges().addList;\n //debugger;\n for (var i = 0; i < addList.length; i++) {\n var rowData = addList[i];\n var isValid = grid.isValid({ \"rowData\": rowData }).valid;\n if (!isValid) {\n return;\n }\n }\n var changes = grid.getChanges({ format: \"byVal\" });\n\n //post changes to server \n $.ajax({\n dataType: \"json\",\n type: \"POST\",\n async: true,\n beforeSend: function (jqXHR, settings) {\n grid.showLoading();\n },\n url: \"/pro/products/batch\", //for ASP.NET, java \n data: { list: JSON.stringify(changes) },\n success: function (changes) {\n //debugger;\n grid.commit({ type: 'add', rows: changes.addList });\n grid.commit({ type: 'update', rows: changes.updateList });\n grid.commit({ type: 'delete', rows: changes.deleteList });\n\n grid.history({ method: 'reset' });\n },\n complete: function () {\n grid.hideLoading();\n }\n });\n }\n }", "function start(response, postData, dbPool) {\n console.log(\"Request handler 'start' was called.\");\n response.writeHead(200, {\"Content-Type\": \"text/html; charset=UTF-8\"});\n\n dbPool.acquire(function(err, db) {\n if (err) {\n return res.end(\"CONNECTION error: \" + err);\n }\n\n db.query()\n .select([\"NUMBER\", \"NAME\", \"POSITION\"])\n .from(\"hockey\")\n .execute(function(error, rows, columns){\n dbPool.release(db);\n if (error) {\n console.log('ERROR: ' + error);\n response.write(responseStart + '<p>' + error + '</p>' + responseEnd);\n response.end();\n return;\n }\n // Go through result set\n var body = '<form action=\"/upload\" method=\"post\">'+\n '<table border=\"1\"><tr><td>Number</td><td>Name</td><td>Position</td></tr>';\n for (i = 0; i < rows.length; i++) {\n body += '<tr>'+\n '<td>'+rows[i].NUMBER+'</td>'+\n '<td>'+rows[i].NAME+'</td>'+\n '<td>'+rows[i].POSITION+'</td>'+\n '<td><input type=\"radio\" name=\"selected\" value=\"select_'+rows[i].NUMBER+'\"/></td>'+\n '</tr>';\n }\n body += '</table><br/>'+\n 'Number: <input name=\"number\" type=\"text\"></input>'+\n 'Name: <input name=\"name\" type=\"text\"/>'+\n 'Position: <input name=\"position\" type=\"text\"/>'+\n '<input type=\"submit\" name=\"submit_action\" value=\"Insert\" />/'+\n '<input type=\"submit\" name=\"submit_action\" value=\"Update\" /><br/>'+\n 'Choose radio button and <input type=\"submit\" name=\"submit_action\" value=\"Delete\" />'+\n '</form>';\n \n response.write(responseStart + body + responseEnd);\n response.end();\n \n console.log(rows);\n });\n });\n}", "function insertIntoMongoDB(req, res) {\n let author = new Author();\n author.authorName = req.body.authorName;\n author.authorId = req.body.authorId;\n author.authorEmail = req.body.authorEmail;\n author\n .save()\n .then((authorSaved) => res.send(authorSaved).status(201))\n .catch((err) => res.send(err).status(400));\n}", "async function insertSingleUserData(req, res) {\n let name = req.body.username;\n let email = req.body.email;\n let address = req.body.address;\n // GET data from BODY object\n // INSERT data in user table\n model.insertUserData(name, email, address).then(function(result) {\n console.log(result)\n // Send successfully reponse\n res.jsonp({\n status: true,\n message: \"SuccessFullay data saved in DB\",\n data: result\n });\n }, function(err) {\n console.log(err);\n // IF some Error Occur Send Failure reponse\n res.jsonp({\n status: false,\n message: \"Error while saving the data\",\n data: err\n });\n })\n}", "function clientDB() {\n\n /**\n * object store from IndexedDB\n * @type {object}\n */\n var store = getStore();\n\n /**\n * request for deleting dataset\n * @type {object}\n */\n var request = store.delete( key );\n\n // set success callback\n request.onsuccess = localCache;\n\n }", "setUserClienteData(req, res) {\n // PASSWORD DATA\n let jsonData = req.body;\n // CONNECTING TO THE DATABASE\n pool.connect()\n // ON SUCCESS => CONNECTED\n .then(client => {\n // UPDATE QUERY\n client.query(\"UPDATE tbCliente SET nomeUser = $1, nomeCliente = $2, emailCliente = $3, dataNascimento = $4, enderecoDoCliente = $5, latCliente = $6, lngCliente = $7, telefoneCliente = $8 WHERE idCliente = $9\", [jsonData.user_name, jsonData.name, jsonData.email, jsonData.dataNascimento, jsonData.address, jsonData.lat, jsonData.lng, jsonData.telefone, jsonData.id])\n // ON SUCCESS\n .then(() => {\n // RESPONSE OK 200\n res.status(200).json({ title: 'Dados atualizados', message: 'Seus dados foram atualizados com sucesso.' })\n })\n // ON ERROR => RESPONSE BAD REQUEST 400\n .catch(err => res.status(400).json({ message: err.message }))\n // DISCONNECTING TO THE DATABASE\n client.release();\n })\n // ON ERROR => RESPONSE BAD REQUEST 400\n .catch(err => res.status(400).json({ message: err.message }));\n }", "function handle_remote_update() {\n update_edit_form_display()\n //update_entity_tee(current_entity, current_id);\n}", "function putFunction(first, last, email, registration) {\n let id = Context.id.slice(1);\n console.log(typeof(id))\n console.log(\"putFunction 2\",Context.id);\n\n return $.ajax({\n url: \"http://assessment.aspcore.net/students/76\",\n type: 'PUT',\n data: {\n\n firstName: first,\n lastName: last,\n emailAddress: email,\n registrationDate: registration,\n processData: false,\n contentType: false,\n },\n\n success: function (result) {\n console.log(\"row Edited\", result)\n }\n });\n}", "async save() {\n const {\n query,\n values\n } = sqlForPartialUpdate(\n 'questions', {\n survey_id: this.survey_id,\n title: this.title,\n question_type: this.question_type\n },\n 'id',\n this.id\n );\n\n const result = await db.query(query, values);\n\n if (result.rows.length === 0) {\n const err = new Error(`Cannot find question to update`);\n err.status = 400;\n throw err;\n }\n }", "function updateAllObjectsFromServer()\n{\n // send comms request\n serverGet(getPanelObjectsToUpdate());\n}", "async insertRemoteModel(collection) {\n return await this.getServerInstance().postInCollection(collection, this.getServerInstance().getDataModel(), false);\n }", "save(params) {\n this.sendAction('save', params);\n }", "function upsertServerList(list) {\n var defer = $q.defer();\n \n global.db.transaction(function (tx) {\n var query = \"select listLocalId, ifnull(deleted, 'N') deleted from list where listServerId = ?\";\n // check if list exists\n var listLocalId;\n console.log(\"aalatief - step1 - upsertServerList: List : \" + JSON.stringify(list));\n tx.executeSql(query, [list.list._id], function (tx, result) {\n var myList = {\n listName: list.list.listname,\n listServerId: list.list._id,\n listOwnerServerId: list.ownerServerId,\n listDescription: list.listDescription \n };\n if (result.rows.length == 0) {\n console.log(\"serverHandlerListV2.upsertServer ListInserting list \" + angular.toJson(list));\n var insertQuery = \"insert into list(listLocalId,listName,listDescription,listServerId, flag, origin, listOwnerServerId, newCount, crossCount) values (null,?,?,?, 'S', 'S', ?, 0, 0)\";\n tx.executeSql(insertQuery, [list.list.listname,list.list.listDescription, list.list._id, list.ownerServerId], function (tx, res) {\n myList.listLocalId = res.insertId;\n maintainGlobalLists(myList, \"ADD\");\n upsertProspects(list.list.prospectusers, res.insertId);\n upsertRelatedUsers(list.list.relatedusers, res.insertId);\n defer.resolve({\n status: 'Y',\n list: myList\n });\n });\n }\n else {\n myList.listLocalId = result.rows.item(0).listLocalId;\n if (result.rows.item(0).deleted == 'Y') {\n var activateQuery = \"update list set deleted = 'N' where listLocalId = ?\";\n maintainGlobalLists(myList, \"ADD\");\n tx.executeSql(activateQuery, [result.rows.item(0).listLocalId], function (tx, res) {\n defer.resolve({status: 'Y'});\n });\n } else {\n defer.resolve({\n status: 'N',\n list: myList\n });\n }\n console.log(\"aalatief - step2 - list.list.prospectusers: \" + JSON.stringify(list.list.prospectusers)); \n console.log(\"aalatief - step2 - list.list.relatedusers: \" + JSON.stringify(list.list.relatedusers)); \n upsertProspects(list.list.prospectusers, result.rows.item(0).listLocalId);\n upsertRelatedUsers(list.list.relatedusers, result.rows.item(0).listLocalId);\n }\n }\n ,\n function (error) {\n console.error(\"serverHandlerListV2.upsertServer count query = \" + angular.toJson(error.message));\n defer.reject(error);\n }\n );\n }\n ,\n function (error) {\n console.error(\"serverHandlerListV2.upsertServer db error \" + angular.toJson(error.message));\n defer.reject(error);\n }\n ,\n function () {\n }\n )\n ;\n\n return defer.promise;\n }", "saveAll() {\n for (var server_id in this.servers) {\n this.servers[server_id].save();\n }\n }" ]
[ "0.61276644", "0.61202306", "0.5780118", "0.5706676", "0.5695957", "0.56039673", "0.55870914", "0.5522567", "0.5522521", "0.5460507", "0.53991175", "0.5395969", "0.5385457", "0.5377517", "0.53357613", "0.53357613", "0.53292316", "0.5327486", "0.5327486", "0.5327486", "0.53114897", "0.53047925", "0.5297023", "0.5284926", "0.5262192", "0.52596354", "0.5252794", "0.5244989", "0.5240472", "0.52200186", "0.5216487", "0.5216411", "0.5215743", "0.52107596", "0.52003044", "0.5177002", "0.5175854", "0.5169827", "0.5165859", "0.5148871", "0.51475704", "0.5146851", "0.513077", "0.5130634", "0.5130074", "0.5120938", "0.5120871", "0.5120363", "0.51122797", "0.5103893", "0.5102509", "0.5101687", "0.510102", "0.5099788", "0.50996673", "0.50976896", "0.50929344", "0.5086096", "0.5076531", "0.50756264", "0.50743973", "0.5074105", "0.507391", "0.507187", "0.5069875", "0.5068219", "0.5067901", "0.50655323", "0.50588936", "0.5057447", "0.5056492", "0.5054009", "0.50481594", "0.5047057", "0.50457865", "0.5045544", "0.5038473", "0.50374043", "0.50353116", "0.5029395", "0.50266516", "0.5025334", "0.5021645", "0.5016771", "0.50166506", "0.50149184", "0.5014798", "0.50145024", "0.5011755", "0.5011722", "0.4996306", "0.4993159", "0.49915546", "0.49904314", "0.49893937", "0.49846447", "0.49841687", "0.49840873", "0.49822474", "0.4980154", "0.49800718" ]
0.0
-1
it inits the image canvas to draw on. It sets up the events to respond to (click, mouse on, etc.) it is also the place where the data is sent via socket.io
async function initCanvas(sckt, imageUrl, oldImage) { socket = sckt; userId = document.getElementById('who_you_are').value; // this isn't working for some reason room = document.getElementById('roomNo').value; selectCamera('Room'); //sets up original values for use for each client let flag = false, prevX, prevY, currX, currY = 0; let canvas = $('#canvas'); cvx = document.getElementById('canvas'); let img = document.getElementById('image'); img.src = imageBase; ctx = cvx.getContext('2d'); ctx.save(); // event on the canvas when the mouse is on it canvas.on('mousemove mousedown mouseup mouseout', function (e) { let color = document.getElementById('colorOptions').value; prevX = currX; prevY = currY; currX = e.clientX - canvas.position().left; currY = e.clientY - canvas.position().top; if (e.type === 'mousedown') { flag = true; } if (e.type === 'mouseup' || e.type === 'mouseout') { flag = false; } // if the flag is up, the movement of the mouse draws on the canvas if (e.type === 'mousemove') { if (flag) { drawOnCanvas(imageBase, ctx, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness); // draw on the canvas, lets everyone know via socket.io by sending them drawOnCanvas data socket.emit('pic', room, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness); } } }); // Captures button click for clearing the canvas for everyone in room $('.canvas-clear').on('click', function (e) { let c_width = canvas.width let c_height = canvas.height ctx.clearRect(0, 0, c_width, c_height); clearAnnotations(imageBase, room); img.height = c_height; img.width = c_width; drawImageScaled(img, cvx, ctx); // communicates that a client has cleared the canvas everyone via socket.io socket.emit('clear', room) }); // Capture event when someone else clears the canvas socket.on('clear-display', function (room) { let c_width = canvas.width let c_height = canvas.height ctx.clearRect(0, 0, c_width, c_height); clearAnnotations(imageBase, room); img.height = c_height; img.width = c_width; drawImageScaled(img, cvx, ctx); }); // capture the event on the socket when someone else is drawing on their canvas (socket.on...) socket.on('pic_display', function (room, width, height, x1, y1, x2, y2, color, thickness) { //document.getElementById('who_you_are').innerHTML= "Third test"; drawOnCanvas(imageBase, ctx, width, height, x1, y1, x2, y2, color, thickness) }); // this is called when the src of the image is loaded // this is an async operation as it may take time img.addEventListener('load', () => { // it takes time before the image size is computed and made available // here we wait until the height is set, then we resize the canvas based on the size of the image let poll = setInterval(async function () { if (img.naturalHeight) { clearInterval(poll); // resize the canvas let ratioX = 1; let ratioY = 1; // if the screen is smaller than the img size we have to reduce the image to fit if (img.clientWidth > window.innerWidth) ratioX = window.innerWidth / img.clientWidth; if (img.clientHeight > window.innerHeight) ratioY = img.clientHeight / window.innerHeight; let ratio = Math.min(ratioX, ratioY); // resize the canvas to fit the screen and the image cvx.width = canvas.width = img.clientWidth * ratio; cvx.height = canvas.height = img.clientHeight * ratio; // draw the image onto the canvas drawImageScaled(img, cvx, ctx); // hide the image element as it is not needed img.style.display = 'none'; //Adding past image data to idb for follow checking paths await addData({ 'image': imageBase, 'room': document.getElementById('roomNo').value, 'annotations': [], 'chat': [], 'knowledge': [], 'previousImage': oldImage, 'nextImage': "" }); await checkNextPrevious(imageBase); } }, 10); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initCanvas(sckt, imageUrl) {\n room=roomNo;\n socket = sckt;\n let flag = false,\n prevX, prevY, currX, currY = 0;\n let canvas = $('#canvas');\n let cvx = document.getElementById('canvas');\n let img = document.getElementById('image');\n let ctx = cvx.getContext('2d');\n img.src = imageUrl;\n\n // event on the canvas when the mouse is on it\n canvas.on('mousemove mousedown mouseup mouseout', function (e) {\n prevX = currX;\n prevY = currY;\n currX = e.clientX - canvas.position().left;\n currY = e.clientY - canvas.position().top;\n if (e.type === 'mousedown') {\n flag = true;\n }\n if (e.type === 'mouseup' || e.type === 'mouseout') {\n flag = false;\n }\n // if the flag is up, the movement of the mouse draws on the canvas\n if (e.type === 'mousemove') {\n if (flag) {\n drawOnCanvas(ctx, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness);\n chat.emit('drawCanvas', room, userId, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness)\n // @todo if you draw on the canvas, you may want to let everyone know via socket.io (socket.emit...) by sending them\n // room, userId, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness\n }\n }\n });\n\n // this is code left in case you need to provide a button clearing the canvas (it is suggested that you implement it)\n $(\"#canvas-clear\").on(\"click\", function (e) {\n let c_width = canvas.width;\n let c_height = canvas.height;\n ctx.clearRect(0, 0, c_width, c_height);\n chat.emit('Clear',room,userId,c_width,c_height);\n // @todo if you clear the canvas, you want to let everyone know via socket.io (socket.emit...)\n\n });\n\n\n chat.on('Canvas',function (userId, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness) {\n let ctx = canvas[0].getContext('2d');\n drawOnCanvas(ctx, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness)\n\n });\n\n\n chat.on('clear',function (userId,cw,ch) {\n\n ctx.clearRect(0, 0, cw,ch);\n\n });\n // @todo here you want to capture the event on the socket when someone else is drawing on their canvas (socket.on...)\n\n // I suggest that you receive userId, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness\n // and then you call\n // let ctx = canvas[0].getContext('2d');\n // drawOnCanvas(ctx, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness)\n\n // this is called when the src of the image is loaded\n // this is an async operation as it may take time\n img.addEventListener('load', () => {\n\n // it takes time before the image size is computed and made available\n // here we wait until the height is set, then we resize the canvas based on the size of the image\n let poll = setInterval(function () {\n if (img.naturalHeight) {\n clearInterval(poll);\n // resize the canvas\n let ratioX=1;\n let ratioY=1;\n // if the screen is smaller than the img size we have to reduce the image to fit\n if (img.clientWidth>window.innerWidth)\n ratioX=window.innerWidth/img.clientWidth;\n if (img.clientHeight> window.innerHeight)\n ratioY= img.clientHeight/window.innerHeight;\n let ratio= Math.min(ratioX, ratioY);\n // resize the canvas to fit the screen and the image\n cvx.width = canvas.width = img.clientWidth*ratio;\n cvx.height = canvas.height = img.clientHeight*ratio;\n // draw the image onto the canvas\n drawImageScaled(img, cvx, ctx);\n // hide the image element as it is not needed\n img.style.display = 'none';\n }\n }, 10);\n });\n}", "function init() { \n \n notification = document.getElementById(\"notification\");\n \n document.getElementById('FileBox').addEventListener('change', fileChosen); \n document.getElementById('FileBox').addEventListener('click', chooseFileButtonPressed); \n document.getElementById(\"UploadButton\").addEventListener('click', upload, false);\n \n previewReader = new FileReader();\n fileReader = new FileReader();\n \n canvas = document.getElementById(\"previewCanvas\");\n canvas.addEventListener(\"mousedown\", downhandler, false);\n canvas.addEventListener(\"mousemove\", movehandler, false);\n canvas.addEventListener(\"mouseup\", uphandler, false);\n ctx = canvas.getContext(\"2d\");\n \n img = new Image();\n img.addEventListener(\"load\", loadhandler, false);\n \n clipSize = 500;\n xClip = 0;\n yClip = 0;\n \n mouseDownInClipArea = false;\n \n socket.on('Upload Complete', function(msg) {\n //inform user that the upload was successful\n }); \n}", "function newConnection(socket) {\n var thisID;\n console.log('new connection: ' + socket.id);\n //store all user IDs here paired with their socket ID\n allSocketID[IDindex] = socket.id;\n\n socket.on(\"newDrawing\", sendNewDrawings);\n socket.on(\"newMouseClick\", sendNewMouseClick);\n socket.on(\"newUser\", sendNewUserID);\n socket.on(\"requestCanvases\", sendCanvases);\n socket.on(\"requestImageOfCanvas\", sendCanvasImage);\n socket.on(\"newPath\", sendNewPath);\n socket.on(\"newCircle\", sendNewCircle);\n socket.on(\"reset\", Reset);\n\n function sendNewDrawings(data) {\n //console.log(\"Got Here\");\n //console.log(data.drawing);\n canvasImages[data.id] = data.image;\n socket.broadcast.emit(\"newDrawingData\", data);\n }\n\n function sendNewMouseClick(data) {\n socket.broadcast.emit(\"newMouseClickData\", data);\n }\n\n function sendNewUserID() {\n //console.log(allSocketID[IDindex]);\n socket.emit(\"newUserID\", IDindex);\n IDindex += 1;\n }\n\n function sendCanvases() {\n data = {\n canvases: canvases\n }\n socket.emit(\"receivedCanvases\", data);\n }\n\n //send image of specific canvas\n function sendCanvasImage(id) {\n requestedCanvas = {\n image: canvasImages[id],\n id: id\n }\n socket.emit(\"receiveCanvasImage\", requestedCanvas);\n }\n\n function sendNewPath(data) {\n socket.broadcast.emit(\"receiveNewPath\", data);\n }\n\n function sendNewCircle(data) {\n socket.broadcast.emit(\"receiveNewCircle\", data);\n }\n\n function Reset() {\n canvasImages = {};\n socket.broadcast.emit(\"receiveReset\");\n }\n}", "function sendCanvasImage(id) {\n requestedCanvas = {\n image: canvasImages[id],\n id: id\n }\n socket.emit(\"receiveCanvasImage\", requestedCanvas);\n }", "function setup()\n{\n createCanvas(window.innerWidth , window.innerHeight);\n //input = createInput(200);\n document.addEventListener(\"pointerdown\", mouseClick);\n document.addEventListener(\"pointerup\", mouseRelease);\n //socket = socket.io.connect('http://localhost:4040');\n socket = io();\n socket.on('mouse', newDrawing);\n //createCanvas(window.innerWidth, window.innerHeight);\n \n if (window.DeviceOrientationEvent)\n {\n window.addEventListener(\"deviceorientation\", getOrientation, true); \n }\n\n frameRate(30);\n\n buildGrid();\n}", "socketEventHandlers(canvas) {\n\n console.log(`Received a request to wire up the socket handlers`);\n\n if (canvas == null ) {\n console.log(`Canvas not loaded, not wiring any event handlers`);\n return;\n }\n\n /**\n * EVENT: `object:removed` is fired by the server sockets\n * when the client is connected to a room in which the other collaborator\n * wants to undo an event which is currently only `object:added`\n **/\n this.socket.on('object:removed', (identifier)=> {\n\n console.log(`RECEIVED event for object removal finalllyy`);\n\n var objects = canvas.getObjects();\n\n for(var i=0; i < objects.length; i++) {\n\n if(objects[i].id == identifier) {\n canvas.remove(objects[i]);\n break;\n }\n }\n\n this.setState({canvas: canvas});\n });\n\n /**\n * EVENT: `object:added` \n * This event is emitted by the server socket when\n * a new object is added to the canvas. Upon receiving\n * the object we augment the local canvas with the object also.\n **/\n this.socket.on('object:added', (rawObjects) => {\n\n fabric.util.enlivenObjects([rawObjects], (objects)=> {\n objects.forEach((o)=> {\n canvas.add(o);\n });\n });\n\n this.setState({canvas: canvas});\n });\n\n\n /**\n * EVENT: `object:modified` is fired by the server socket \n * when an earlier object created is modified in terms of shape, position\n * size etc. At this moment, only images are allowed to be modified and therefore\n * this event is fired for the changes in the image.\n **/\n this.socket.on('object:modified', (modObj) => {\n\n var objs = canvas.getObjects();\n var matchObj = null;\n\n for(var i=0; i < objs.length; i++) {\n if (objs[i].id == modObj.id) {\n matchObj = objs[i];\n break;\n }\n }\n\n if (matchObj == null) {\n return;\n }\n\n canvas.remove(matchObj);\n\n fabric.util.enlivenObjects([modObj], (objects)=> {\n objects.forEach((o)=> {\n canvas.add(o);\n });\n });\n\n this.setState({canvas: canvas});\n });\n }", "function setup() {\r\n\tcreateCanvases();\r\n\r\n\t//handle messages\r\n\t/*\r\n\t*\treceive Objects from Server\r\n\t*/\r\n\tsocket.on('receiveObj', function (obj, username, filename) {\r\n\t\tdrawObject(obj);\r\n\t\tcurrentFile.drawObjects.push(obj);\r\n\t\t//displays username on mousex and mousey from obj and fadeOut after 3000\r\n\t\tif (filename == fileName) {\r\n\t\t\t$(\"#foreground\").html(username);\r\n\t\t\t$(\"#foreground\").css({ 'top': obj.y, 'left': obj.x, 'background-color': 'moccasin', 'padding': '5px' }).fadeIn('fast');\r\n\t\t\t$(\"#foreground\").delay(3000).fadeOut();\r\n\t\t}\r\n\t}\r\n\t);\r\n\r\n\t/*\r\n\t*\treceive clear command from server\r\n\t*/\r\n\tsocket.on('clear',\r\n\t\tfunction (fileName) {\r\n\t\t\tclearCanvas();\r\n\t\t\t$(\"#foreground\").html(\"\");\r\n\t\t\t$(\"#foreground\").css({ 'display': 'none' });\r\n\t\t\twindow.location.href = \"/drawPadLoad\";\r\n\t\t}\r\n\t);\r\n\r\n\tupdateUserList();\r\n\tdrawObjects(data); // replaces parseAndDrawString();\r\n\r\n\t/*\r\n\t* appendUser to #containerInfoRight\r\n\t*/\r\n\tsocket.on('appUpdateUsers', function (users, username, fileName) {\r\n\t\tusersConnected = users;\r\n\t\t$(\"#containerInfoRight\").html(\"Online sind: \");\r\n\r\n\t\tfor (var i = 0; i < usersConnected.length; i++) {\r\n\t\t\tif (usersConnected[i].mindMapValue002 == fileName) {\r\n\t\t\t\t$(\"#containerInfoRight\").append(\"<font style='color:\" + usersConnected[i].usercolor + \";'>\" + usersConnected[i].username + \"</font> \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (usersConnected.length <= 1) {\r\n\t\t\tsaveFile(fileName);\r\n\t\t}\r\n\t});\r\n}", "function onConnection(socket) {\n\t// update counter\n\tclient_count++;\n\tio.sockets.emit('counter', {'number': client_count});\n\n\t// send current state\n\tsocket.emit('data', {'action': 'new_lines', 'data': current_image});\n\n\t// handle canvas updates\n\tsocket.on('data', function(command) {\n\t\tvar action = command[\"action\"];\n\n\t\tif(action == \"new_lines\") {\n\t\t\t// save to own data structure\n\t\t\tfor(var p in command['data']) {\n\t\t\t\t// command['data'] == list of lines\n\t\t\t\tvar line = command['data'][p];\n\n\t\t\t\tvar entry = {};\n\t\t\t\tentry['line'] = line;\n\t\t\t\tentry['properties'] = command['properties'];\n\t\t\t\tcurrent_image.push(entry);\n\t\t\t}\n\n\t\t\t// broadcast changes\n\t\t\ttell_clients(socket, command);\n\t\t} else if(action == \"clear_lines\") {\n\t\t\tconsole.log(\"Clearing image...\");\n\n\t\t\tcurrent_image = [];\n\t\t\tsocket.broadcast.emit('data', {'action': 'clear_lines'});\t\n\t\t}\n\t});\n\n\t// smoother drawing (onthefly)\n\tsocket.on('onthefly', function(command) {\n\t\ttell_clients(socket, command);\n\t});\n\n\t// handle disconnects\n\tsocket.on('disconnect', function() {\n console.log('Client disconnected');\n client_count--;\n socket.broadcast.emit('counter', {'number': client_count});\n });\n}", "function render(evt) {\n imagedata = evt;\n\n\n $('#canvasWrapper').show();\n $('#fileSelectdiv').hide();\n $('#closeImage').show();\n $('#right-side-menu').show();\n\n canvas = document.getElementById(\"image-canvas\");\n canvas2 = document.getElementById(\"anno-canvas\");\n var image = new Image();\n image.onload = function () {\n\n if (image.height > MAX_HEIGHT) {\n image.width *= MAX_HEIGHT / image.height;\n image.height = MAX_HEIGHT;\n }\n var context = canvas.getContext(\"2d\");\n context.clearRect(0, 0, canvas.width, canvas.height);\n canvas.width = image.width;\n canvas.height = image.height;\n canvas2.width = image.width;\n canvas2.height = image.height;\n context.drawImage(image, 0, 0, image.width, image.height);\n imageType = false;\n };\n image.src = evt;\n }", "function setup() {\n socket.on(\"script\", function (firstmatrix) {\n createCanvas(side * w, side * h);\n background(\"#acacac\");\n frameRate(5);\n console.log(\"Start\");\n });\n}", "function drawCanvas() {\n if( drawio.loadedIMG != ''){\n drawio.ctx.drawImage(drawio.loadedIMG, 0, 0);\n }\n for( var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n if(drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n }", "start() {\n console.log('starting');\n this.imageCanvas.addEventListener('mousemove', this.handleMouseMove);\n this.imageCanvas.addEventListener('onwheel', this.handleMouseMove);\n window.addEventListener('resize', this.resizeCanvases);\n //var currentDiv = document.getElementById('beforeThis');\n //var idekDiv = document.getElementById('idek');\n //idekDiv.insertBefore(this.imageCanvas, currentDiv);\n // document.body.appendChild(this.imageCanvas);\n if (this.imageCanvas) {\n this.resizeCanvases();\n this.tick();\n }\n }", "function startPaint(e){\n\n e.preventDefault();\n\tctx.beginPath();\n\tctx.moveTo(x_pos(e),y_pos(e));\n\n\tcanvas.addEventListener(\"touchmove\",paint,false);\n\tcanvas.addEventListener(\"mousemove\",paint,false);\n\n\tsocket.emit('start paint',{x: x_pos(e), y: y_pos(e), name:nickName.val()});\n\n}", "function setup() {\n socket = io.connect(\"http://localhost:3000\");\n //socket = io();\n\n createCanvas(600, 600);\n //p = new Player();\n b = new Ball();\n\n //test socket only with 1 ball\n /*for (var i = 0; i < 4; i++) { \n balls[i] = new Ball();\n }*/\n \n\n socket.on('getCounter', function(data){\n counter = data;\n if (p === undefined) {\n if (counter%2 === 0) \n p = new Player(0);\n else \n p = new Player(width);\n \n }\n\n var data = {\n x: p.x,\n y: p.y,\n v: p.v,\n w: p.w,\n h: p.h,\n p: p.p\n };\n socket.emit('start', data);\n\n\n var data = {\n x: b.x,\n y: b.y,\n xv: b.xv,\n yv: b.yv,\n r: b.r\n };\n socket.emit('startBall', data);\n\n\n if (counter===2) { \n go=true;\n }\n \n });\n \n\n socket.on('heartBeat', function(data){ //still thread here for data, not in draw function (only draw)\n players = data;\n });\n\n socket.on('heartBeatBall', function(data){\n if (data !== null) {\n b.x = data.x;\n b.y = data.y;\n b.xv = data.xv;\n b.yv = data.yv;\n b.r = data.r;\n }\n });\n\n}", "function initCanvas(onDrawingCallback) {\n let flag = false,\n prevX, prevY, currX, currY = 0;\n let canvasJq = $('#canvas');\n let canvasEle = document.getElementById('canvas');\n let imgEle = document.getElementById('image');\n\n // event on the canvas when the mouse is on it\n canvasJq.on('mousemove mousedown mouseup mouseout', function (e) {\n prevX = currX;\n prevY = currY;\n currX = e.clientX - canvasJq.position().left;\n currY = e.clientY - canvasJq.position().top;\n if (e.type === 'mousedown') {\n flag = true;\n }\n if (e.type === 'mouseup' || e.type === 'mouseout') {\n flag = false;\n }\n // if the flag is up, the movement of the mouse draws on the canvas\n if (e.type === 'mousemove') {\n if (flag) { \n data = { \n canvas: { \n width: canvasEle.width, \n height: canvasEle.height \n }, \n paths: [\n { \n x1: prevX, \n y1: prevY, \n x2: currX, \n y2: currY \n }\n ], \n color: inkColor, \n thickness: thickness \n }\n pushPath(data);\n onDrawingCallback(data);\n }\n }\n });\n\n // Loaded & resize event\n imgEle.addEventListener('load', () => {\n repositionCanvas();\n });\n\n window.addEventListener('resize', () => {\n repositionCanvas();\n });\n\n // If the image has already been loaded.\n if (imgEle.naturalHeight && imgEle.clientWidth > 0) {\n repositionCanvas();\n }\n}", "function drawCanvas() {\n\tif (imageId != null) {\n\t\tdrawJointJS(imageId);\n\t\timageId = null;\n\t}\n}", "drawCanvas(imgData) {\n\t\t// abstract\n\t}", "function init() {\n resize()\n\n // when resize window\n window.addEventListener('resize', resize)\n\n // when mouse down\n canvas.addEventListener('mousedown', startPressPen)\n\n // when mouse up\n canvas.addEventListener('mouseup', stopPressPen)\n\n // when mouse moving\n canvas.addEventListener('mousemove', draw)\n\n // when pressed Cmd+Shift+C\n ipcRenderer.on('clear', clear)\n }", "initializeCanvas(){\n\t\tconsole.log(`======] Init Canvas [======`, this.state);\n\n\t\tif(this.state.device.width && this.state.device.height){\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.canvas.id = 'screen-canvas';\n\t\t\tthis.canvas.width = this.state.device.width/2;\n\t\t\tthis.canvas.height = this.state.device.height/2;\n\t\t\tthis.canvas.style = 'margin: 50px; border: 1px solid black; cursor: pointer;';\n\t\t\tthis.canvas.onmouseover = this.cursorOver.bind(this);\n\t\t\tthis.canvas.onmouseout = this.cursorOut.bind(this);\n\t\t\tthis.canvas.onmousedown = this.interactStart.bind(this);\n\t\t\tthis.canvas.onmousemove = this.interactMove.bind(this);\n\t\t\tthis.canvas.onmouseup = this.interactEnd.bind(this);\n\t\t\tthis.canvas.onmousewheel = this.mouseWheel.bind(this);\n\t\t\tdocument.body.onkeydown = this.keyDown.bind(this);\n\t\t\tdocument.body.onkeyup = this.keyUp.bind(this);\n\n\t\t\tdocument.getElementById('screen-container').appendChild(this.canvas)\n\t\t\tthis.ctx = this.canvas.getContext('2d');\n\t\t}else{\n\t\t\talert(`Device resolution failed to be detected`);\n\t\t}\n\t}", "render(){\n this.canvas_data.set(this.data);\n this.context.putImageData(this.canvas_imageData, 0, 0);\n }", "function draw() {\n // clear the canvas\n that.canvas.width = that.canvas.width;\n\n // check if we have a valid image\n if (that.image.width * that.image.height > 0) {\n context.drawImage(that.image, 0, 0, that.width, that.height);\n } else {\n // center the error icon\n context.drawImage(errorIcon.image, (that.width - (that.width / 2)) / 2,\n (that.height - (that.height / 2)) / 2, that.width / 2, that.height / 2);\n that.emit('warning', 'Invalid stream.');\n }\n\n // check for an overlay\n if (overlay) {\n context.drawImage(overlay, 0, 0);\n }\n\n // silly firefox...\n if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\n var aux = that.image.src.split('?killcache=');\n that.image.src = aux[0] + '?killcache=' + Math.random(42);\n }\n }", "setupCanvases() {\n this.mainCanvas = document.getElementById('main-canvas');\n this.strokeCanvas = document.getElementById('stroke-canvas');\n\n this.mainCanvas.width = this.windowWidth;\n this.mainCanvas.height = this.windowHeight;\n\n this.canvas = [];\n\n for (let i = 0; i < this.images.length; i++) {\n // Create temp and draw canvases for each image\n this.canvas[i] = {\n 'temp': document.createElement('canvas'),\n 'draw': document.createElement('canvas')\n };\n\n // Set canvases to width and height of main canvas\n this.canvas[i].temp.width = this.canvas[i].draw.width = this.strokeCanvas.width = this.mainCanvas.width;\n this.canvas[i].temp.height = this.canvas[i].draw.height = this.strokeCanvas.height = this.mainCanvas.height;\n }\n\n // draw the stuff to start\n this.recompositeCanvases();\n\n this.mouseDown = false;\n\n // Bind events\n this.strokeCanvas.addEventListener('mousedown', this.mousedown_handler, false);\n this.strokeCanvas.addEventListener('touchstart', this.mousedown_handler, false);\n\n this.strokeCanvas.addEventListener('mousemove', this.mousemove_handler, false);\n this.strokeCanvas.addEventListener('touchmove', this.mousemove_handler, false);\n\n this.strokeCanvas.addEventListener('mouseup', this.mouseup_handler, false);\n this.strokeCanvas.addEventListener('touchend', this.mouseup_handler, false);\n }", "function initDraw()\n{\n\t/* Resize */\n\tboardCanvas.width = WIDTH;\n\tboardCanvas.height = HEIGHT;\n\n\tboardCanvas.offset = new vector(0,0);\n\n//\tviewCanvas.width = WIDTH;\n//\tviewCanvas.height = HEIGHT;\n\n\tviewCanvas.offset = new vector(0,0);\n\n\ttitleImg = loadImage(\"images/PhysEd.png\");\n\tbgImage = loadImage(\"images/dropman.png\");\n\tplatformImg = loadImage(\"images/ground_grass.png\");\n\tplatformCloudImg = loadImage(\"images/platform_cloud.png\");\n\tplatformTreeImg = loadImage(\"images/platform_tree.png\");\n\tplatformBWImg = loadImage(\"images/ground_grass_bw.png\");\n\tgymFloorImg = loadImage(\"images/gym_floor.png\");\n\tgroundImg = platformImg; /* init */\n\t\n\tpineappleImg = loadImage(\"images/pineapple.png\");\n\tdoorImg = loadImage(\"images/door.png\");\n\tballImg = loadImage(\"images/dodgeball2.png\");\n\trockImg = loadImage(\"images/rock1.png\");\n\tsammyImg = loadImage(\"images/sammy1.png\");\n\t\n\t/* background images */\n\ttreeImg = loadImage(\"images/tree.png\");\n\t\n\tvar tempImg = loadImage(\"images/dropman_right.png\");\n\ttempImg = loadImage(\"images/dropman_left.png\");\n\n\tframeCount = 0;\n}", "function draw() {\n var data={\n pX :prevX, \n pY :prevY , \n cX :currX , \n cY :currY , \n xi :x , \n yi :y\n }\nctx.beginPath();\nctx.moveTo(prevX, prevY);\nctx.lineTo(currX, currY);\nctx.strokeStyle = x;\nctx.lineWidth = y;\nctx.stroke();\nctx.closePath();\nsocket.emit(\"drawn\", data); //Send everyone in room the data and tell them to draw what who drew\n}", "function init() {\n clearCanvas()\n drawBackgroundColor()\n drawOrigin()\n }", "function setup() {\n createCanvas(800, 600);\n\n // this happens later:\n socket.on('donut', function(data) {\n console.log(data);\n fill(data.red, data.green, data.blue)\n background(255-data.red, 255-data.green, 255-data.blue);\n });\n\n\n }", "function prepareCanvas() {\n canvas = window._canvas = new fabric.Canvas('canvas');\n canvas.backgroundColor = '#ffffff';\n canvas.isDrawingMode = 1;\n canvas.freeDrawingBrush.color = \"black\";\n canvas.freeDrawingBrush.width = 1;\n canvas.renderAll();\n //setup listeners \n canvas.on('mouse:up', function(e) {\n getFrame();\n mousePressed = false\n });\n canvas.on('mouse:down', function(e) {\n mousePressed = true\n });\n canvas.on('mouse:move', function(e) {\n recordCoor(e)\n });\n}", "function SendAsBinary() {\n var encodedCanvas = canvas.toDataURL();\n socket.emit('imgBinary', encodedCanvas);\n }", "loadDrawing(){\n submitCanvas(this.sendToNeuralNet);\n }", "function wsConnect(){\n\n socket = io(\"http://\" + window.location.hostname + \":2345\"); \n\n socket.on('reconnecting',function(){\n // notify the user that he is currently deconnected\n $(\"#status\").html(langs[lang].reconnecting + \"<span id='ellipsisSpan'></span>\");\n startEllipsis();\n });\n socket.on('reconnect',function(){\n stopEllipsis();\n })\n socket.on('connect', function() {\n $(\"#server\").hide();\n $('#waitForConnection').show();\n $(\"#status\").html(langs[lang].connected);\n socket.emit(\"fetch img\");\n });\n\n socket.on('close', function() {\n console.log('disconnected');\n $(\"#server\").show();\n $('#waitForConnection').hide();\n });\n\n socket.on('update img',function(data) {\n grid = data;\n loadFromGrid();\n });\n\n socket.on('update pixel',function(pixel) {\n grid[pixel[0][0]][pixel[0][1]] = pixel[1];\n drawPixel(pixel[0][0],pixel[0][1],pixel[1]);\n });\n\n socket.on('set rot speed',function(rotSpeed){\n $(\"#rotationSpeed\").val(rotSpeed);\n });\n\n // receive a binary Array and transform it to array to finally save it with the library FileSaver\n socket.on('get raw file',function(rawFile){\n // You can't directly use a binary Array, to use it, you have to create a DataView\n var data = new DataView(rawFile);\n var offset = 0;\n var array = new Array(rawFile.byteLength);\n while(offset < rawFile.byteLength)\n {\n //An array isn't a binary array, so, we have to transform uint8 to char \n array[offset] = String.fromCharCode(data.getUint8(offset));\n offset++;\n } \n\n saveAs(new Blob(array),\"sphere.colors\");\n });\n}", "function init() {\n console.log(\"init\")\n\n socketStuffs();\n\n // when mouse moves\n document.addEventListener('mousemove', sendPos);\n function sendPos(e) {\n // store psotion of my mouse\n var mousePos = {\n x: e.clientX,\n y: e.clientY\n }\n socket.emit('sendingMousePos', mousePos);\n }\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n for (let i = 0; i < 100; i++) {\n let x = random(width);\n let y = random(height);\n console.log(x, y);\n // boids[i] = new Boid(x,y);\n }\n\n pixelDensity(2);\n\n // colorMode(RGB, 100);\n\n loadAsset();\n\n function loadAsset() {\n textFont(\"Poiret One\");\n\n function assetLoaded() {\n // assetCounter++;\n // if(assetCounter == assetNumber) {\n isLoading = false;\n // }\n }\n }\n\n textAlign(CENTER);\n\n isStarted = false;\n isTapped = true;\n isPlayScreen = false;\n\n sizeList();\n\n colorList(100, 100);\n socket.on(\"data\", data => {\n console.log(\"key: \" + data[\"key\"]);\n });\n socket.on(\"touchData\", touchData => {\n for (let i = 0; i < 5; i++) {\n // animations.push(new AnimationTouch0(width / 2, height / 2, i));\n animations.push(new AnimationTouch7(width / 2, height / 2, i));\n }\n\n console.log(\"touchData:\" + touchData);\n });\n}", "function ev_canvas (ev) {\n if (ev.layerX || ev.layerX == 0) { // Firefox\n ev._x = ev.layerX;\n ev._y = ev.layerY;\n } else if (ev.offsetX || ev.offsetX == 0) { // Opera\n ev._x = ev.offsetX;\n ev._y = ev.offsetY;\n }\n\n\tvar data = [ev.type, ev._x, ev._y];\n\tvar dataStr = JSON.stringify(data);\n\tws.send(dataStr);\n }", "function connect() {\n\tif ((game != null && (game.readyState == 1 || state == 1)) || !window.location.hash) {\n\t\treturn;\n\t}\n\tstate = 1;\n\t\n\t// Extract server from url\n\tvar url = \"ws://\" + window.location.host + \n\t\twindow.location.pathname.slice(0, \n\t\twindow.location.pathname.length - \"client.html\".length) + \"socket\";\n\t\n var hash = window.location.hash.substring(1)\n\tgame = new WebSocket(url, hash);\n\tgame.onmessage = function (event) {\n\t\tvar msg = undefined;\n\t\ttry {\n\t\t\tmsg = JSON.parse(event.data);\n\t\t} catch(err) {\n\t\t\tconsole.log(\"Unable to parse server message\");\n\t\t\tconsole.log(err)\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar action = msg['action'];\n\t\tif (action == \"render\") {\n\t\t\tvar width = msg['width'];\n\t\t\tvar height = msg['height'];\n\t\t\tvar elements = msg['elements'];\n\t\t\n\t\t\t// Update the canvas size\n\t\t\tif (c.width != window.innerWidth - 15 || c.height != window.innerHeight - 15) {\n\t\t\t\tc.width = window.innerWidth - 15;\n\t\t\t\tc.height = window.innerHeight - 15;\n\t\t\t}\n\t\t\tvar scalex = c.width / width;\n\t\t\tvar scaley = c.height / height;\n\t\t\n\t\t\t// Compute the 'dirty' area\n\t\t\t/*\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tvar element = elements[i];\n\t\t\t\tvar type = element['type'];\n\t\t\t\t\n\t\t\t\tif (target == 0) {\n\t\t\t\t\telementSize(element);\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t// Draw the base color\n\t\t\tvar ctx = c.getContext(\"2d\");\n\t\t\tdraw(width, height);\n\t\t\t\n\t\t\t// Draw the elements\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tvar element = elements[i];\n\t\t\t\tvar type = element['type'];\n\t\t\t\t\n\t\t\t\t// Check for render target changes\n\t\t\t\tif (type == 'base') {\n\t\t\t\t\tvar enabled = element['enabled'];\n\t\t\t\t\tif (enabled) {\n\t\t\t\t\t\tbase = [];\n\t\t\t\t\t\ttarget = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if (target == 1) {\n\t\t\t\t\tbase.push(element);\n\t\t\t\t} else {\n\t\t\t\t\tdrawElement(element, scalex, scaley);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tgame.onopen = function() {\n\t\tconsole.log(\"open\");\n\t\tstate = 2;\n\t}\n\tgame.onclose = function() { \n\t\tconsole.log(\"closed\");\n\t\tstate = 0;\n\t};\n}", "componentDidMount() \n {\n //fetch imageid's all data and set in the state\n this.setImageNoteData();\n\n this.state.ctx = this.canvas.current.getContext(\"2d\");\n this.canvas.current.width = 250;\n this.canvas.current.height = 150;\n var newObj = this;\n this.canvas.current.addEventListener(\"mousemove\", function (e) {\n newObj.findxy('move', e);\n }, false);\n this.canvas.current.addEventListener(\"mousedown\", function (e) {\n newObj.findxy('down', e);\n }, false);\n this.canvas.current.addEventListener(\"mouseup\", function (e) {\n newObj.findxy('up', e);\n }, false);\n this.canvas.current.addEventListener(\"mouseout\", function (e) {\n newObj.findxy('out', e);\n }, false);\n }", "readyToSend() {\n const _img = this._sketch.current.toDataURL();\n this.setState({\n img: _img,\n showSendOption: true\n });\n }", "function start() {\n document.addEventListener('mousemove', onMouseMove);\n window.addEventListener('resize', resizeCanvases);\n document.body.appendChild(imageCanvas);\n resizeCanvases();\n tick();\n \n}", "canvasEventHandlers(canvas) {\n\n if (canvas == null) {\n return;\n }\n\n console.log(`Received a request to wire up the canvas event handlers`);\n\n /**\n *\n **/\n canvas.on('object:added', (e) => {\n\n if (e.target.id != null) {\n return;\n }\n\n e.target.id = uuid4();\n\n /**\n * Path objects created by the user are not modifiable,\n * only the images uploaded are the ones which could\n * be updated/modified by the user.\n **/\n if (e.target.type == 'path') {\n\n e.target.hasControls = false;\n e.target.lockMovementX = true;\n e.target.lockMovementY = true;\n }\n \n /**\n * Inform the server socket about the changes that are made\n * by the client by firing `object:added` events to the server.\n *\n * In addition to this, execute the `handleCanvasObjectEvent` handler\n * which captures the object added to the canvas and update the\n * history of the events. The history in turn is used when the user\n * wants to perform the undo-redo task.\n *\n * WARNING: Here we are storing the canvas as the object and not a json format.\n * This means that we have to inflate the object when running the redo event.\n **/\n this.props.handleCanvasObjectEvent(e.target);\n this.socket.emit('object:added', e.target.toJSON(['id']));\n });\n\n canvas.on('object:modified', (e)=> {\n\n if (e.target.id == null) {\n console.log(`Received a modiied event for the object which is missing unique identifier, dropping`);\n return;\n }\n\n this.socket.emit('object:modified', e.target.toJSON(['id']));\n });\n }", "function render_user_interface()\n{\n mycanvas_context.drawImage(m_canvas, 0, 0);\n}", "function setupSocket(){\n socket = io();\n socket.on('disconnect', function(){\n changeState(gameConfig.GAME_STATE_END);\n });\n socket.on('setSyncUser', function(user){\n gameConfig.userID = user.objectID;\n });\n //change state game on\n socket.on('resStartGame', function(userDatas, foodsDatas, virusesDatas){\n Manager.setUsers(userDatas);\n Manager.setFoods(foodsDatas);\n Manager.setViruses(virusesDatas);\n console.log(Manager.users);\n\n canvasAddEvent();\n documentAddEvent();\n\n changeState(gameConfig.GAME_STATE_GAME_ON);\n });\n socket.on('userJoined', function(data){\n Manager.setUser(data);\n });\n socket.on('createViruses', function(virusesData){\n Manager.createViruses(virusesData);\n });\n socket.on('deleteVirus', function(virusID){\n Manager.deleteVirus(virusID);\n });\n socket.on('createFoods', function(foodsDatas){\n Manager.createFoods(foodsDatas);\n });\n socket.on('deleteFood', function(foodID){\n Manager.deleteFood(foodID);\n });\n socket.on('updateUser', function(userDatas){\n Manager.updateUsers(userDatas);\n });\n socket.on('userDestroy', function(userID){\n if(userID === gameConfig.userID){\n changeState(gameConfig.GAME_STATE_END);\n }\n Manager.deleteUser(userID);\n })\n socket.on('userLeave', function(objID){\n Manager.kickUser(objID);\n });\n socket.on('rename', function(){\n changeState(gameConfig.GAME_STATE_START_SCENE);\n });\n}", "function setup(){\n //- - - - - overall\n\t// var screenSize = windowHeight - 100;\n\t// createCanvas(int(screenSize * .666), screenSize);\n\tcreateCanvas(windowWidth, windowHeight);\n\tbackground(0, 150, 50);\n\n\n // Listen for confirmation of connection\n socket.on('connect', function() {\n console.log(\"Connected\");\n });\n\n\t// - - - - - heartbeat\n\tsocket.on('heartbeat',\n\t\tfunction(dteam2ata){\n\t\t}\n\t);\n\n\tsocket.on('team1',\n\t\tfunction(bubbles){\n\t\t\tconsole.log('got 1')\n\t\t\tteam1 = bubbles;\n\t\t});\n\n\tsocket.on('team2',\n\t\tfunction(bubbles){\n\t\t\tconsole.log('got 2')\n\t\t\tteam2 = bubbles;\n\t\t});\n}", "startFrame() {\n // setup event listeners\n const listener = this.eventListenerIn.bind(this);\n this.canvas.addEventListener(this.EVENT_TYPE_CLICK, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_KEYDOWN, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_KEYUP, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_MOUSEDOWN, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_TOUCHSTART, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_TOUCHMOVE, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_TOUCHEND, listener, false);\n this.canvas.addEventListener(this.EVENT_TYPE_TOUCHCANCEL, listener, false);\n // schedule for update canvas\n requestAnimationFrame(this.drawFrame.bind(this));\n }", "function init() {\n socket.on('connect', function() {\n console.log(\"Connected\");\n });\n\n socket.on('disconnect', function() {\n console.log(\"Connection closed\");\n });\n \n socket.on('person_name', function(message) {\n if(message !== initialName) {\n speak(generateGreetingMessage(message));\n initialName = message;\n }\n });\n \n socket.on('face_coordinates', function(coordinates) {\n if (coordinates.status == 'SUCCESS') {\n let left = coordinates.left;\n let top = coordinates.top;\n let width = coordinates.right - coordinates.left;\n let height = coordinates.bottom - coordinates.top;\n rectangleCoordinates = { left, top, width, height };\n } else {\n rectangleCoordinates = null;\n }\n });\n}", "function init() {\n\tcanvas = document.getElementById('canvas');\n\tctx = canvas.getContext('2d');\n\tw = canvas.width;\n\th = canvas.height;\n\n\tcanvas.addEventListener('mousemove', function (e) {\n\t\tfindxy('move', e)\n\t}, false);\n\n\tcanvas.addEventListener('mousedown', function (e) {\n\t\tfindxy('down', e)\n\t}, false);\n\n\tcanvas.addEventListener('mouseup', function (e) {\n\t\tfindxy('up', e)\n\t}, false);\n\n\tcanvas.addEventListener('mouseout', function (e) {\n\t\tfindxy('out', e)\n\t}, false);\n\n\t// Remove transparent background.\n\tclear();\n}", "render() {\n this.context.drawImage(this.buffer.canvas,\n 0, 0,\n this.buffer.canvas.width,\n this.buffer.canvas.height,\n 0, 0,\n this.context.canvas.width,\n this.context.canvas.height);\n }", "function renderPhoto(data) {\n // create the canvas elt\n var photoElt = document.createElement('canvas');\n photoElt.classList.add('photo');\n var ctx = photoElt.getContext('2d');\n ctx.canvas.width = 300;\n ctx.canvas.height = 150;\n img = ctx.createImageData(300, 150);\n\n // set the image data\n img.data.set(data);\n ctx.putImageData(img, 0, 0);\n\n // write the new src into the DOM\n $(\"#downloaded\").attr(\"src\", convertCanvasToImage(photoElt).src);\n isInitiator = true;\n\n // let the server know about the successfull transfer\n socket.emit('downloaded', room);\n\n // close the data channel and pc\n dataChannels[Object.keys(dataChannels)[0]].close();\n delete dataChannels[Object.keys(dataChannels)[0]];\n peerConn.close();\n}", "function initCanvas() {\n if(isDebugged) {\n debug.style.display = \"block\";\n } else {\n debug.style.display = \"none\";\n }\n\n console.log(\"initializing canvas\");\n\n //var canvasElement = document.querySelector(\"#canvas\");\n canvas = new fabric.Canvas(\"canvas\",{\n selection: false,\n height: canvas_initial_height,\n width: canvas_initial_width,\n backgroundColor: canvas_background_color\n });\n\n //canvas.isDrawingMode = true;\n\n canvas.on(\"mouse:down\", onMouseDownCanvas);\n\n canvas.on(\"mouse:up\", onMouseUpCanvas);\n\n canvas.on(\"mouse:move\", onMouseMoveCanvas);\n\n //updateAndSyncCanvasSize(canvas_initial_width, canvas_initial_height);\n}", "constructor(newX, newY, newType, newSocket, ){\n x = newX;\n y = newY;\n this.typeChange(newType);\n socket = newSocket;\n\n document.addEventListener(\"keydown\", keyDownHandler, false);\n document.addEventListener(\"keyup\", keyUpHandler, false);\n\n }", "RenderInit() {\n this.canvas.width = this.size;\n this.canvas.height = this.size;\n this.context = this.canvas.getContext(\"2d\");\n this.buffer = this.size / this.gamestate.layout.length;\n this.draw();\n this.drawKey();\n this.drawExit();\n this.drawPlayers();\n this.drawAdversaries();\n }", "start () {\n const serv = NET.createServer(client => {\n console.log('client connected from', client.remoteAddress)\n client.write('hello\\r\\n') // say hello to client\n\n // create a new canvas for this client\n let canvas = new CANVAS(client)\n\n // once the client has exited, do any clean necessary\n client.on('end', () => {\n console.log('client', client.remoteAddress, 'disconnected')\n canvas = undefined\n })\n })\n\n // bad thing happen, throw error\n serv.on('error', (err) => {\n throw err\n })\n\n // turn on server and listen on specificed port\n serv.listen(this.port, () => {\n console.log('server bound and listening on', this.port)\n })\n }", "draw() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // display problem\n this.drawProblem()\n // display input field\n if (this.input) {\n this.input._value = ''\n }\n \n this.drawInputField()\n\n // draw attacks\n this.attacks.draw(this.ctx, this.attackIndex)\n\n // draw player data\n this.player.drawPlayerData(this.ctx)\n // draw computer data\n this.computer.drawComputerData(this.ctx)\n \n }", "async function run() {\n const model = await faceTracker.loadMyModel();\n\n app.get('/', (req, res) => {\n res.sendFile(__dirname + '/index.html');\n })\n\n io.on('connection', (socket) => {\n console.log('a user connected');\n socket.on('disconnect', () => {\n console.log('user disconnected');\n });\n socket.on('myStream', (data) => {\n frameCount++;\n console.log('frames recieved ', frameCount);\n\n //console.log(typeof(data));\n var image = new Image();\n image.src = data;\n\n ctx.drawImage(image, 0, 0, ctx.width, ctx.height);\n //console.log(image);\n // var imgd = ctx.getImageData(0,0, ctx.width, ctx.height);\n // var buf32 = new Uint32Array(imgd.data.buffer);\n const predictions = faceTracker.predictFromMyModel(canvas);\n\n if (predictions.length > 0) {\n predictions.forEach(prediction => {\n const keypoints = prediction.scaledMesh;\n\n if (state.triangulateMesh) {\n ctx.strokeStyle = GREEN;\n ctx.lineWidth = 0.5;\n\n for (let i = 0; i < TRIANGULATION.length / 3; i++) {\n const points = [\n TRIANGULATION[i * 3], TRIANGULATION[i * 3 + 1],\n TRIANGULATION[i * 3 + 2]\n ].map(index => keypoints[index]);\n\n drawPath(ctx, points, true);\n }\n } else {\n ctx.fillStyle = GREEN;\n\n for (let i = 0; i < NUM_KEYPOINTS; i++) {\n const x = keypoints[i][0];\n const y = keypoints[i][1];\n\n ctx.beginPath();\n ctx.arc(x, y, 1 /* radius */, 0, 2 * Math.PI);\n ctx.fill();\n }\n }\n\n if (keypoints.length > NUM_KEYPOINTS) {\n ctx.strokeStyle = RED;\n ctx.lineWidth = 1;\n\n const leftCenter = keypoints[NUM_KEYPOINTS];\n const leftDiameterY = distance(\n keypoints[NUM_KEYPOINTS + 4],\n keypoints[NUM_KEYPOINTS + 2]);\n const leftDiameterX = distance(\n keypoints[NUM_KEYPOINTS + 3],\n keypoints[NUM_KEYPOINTS + 1]);\n\n ctx.beginPath();\n ctx.ellipse(leftCenter[0], leftCenter[1], leftDiameterX / 2, leftDiameterY / 2, 0, 0, 2 * Math.PI);\n ctx.stroke();\n\n if (keypoints.length > NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS) {\n const rightCenter = keypoints[NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS];\n const rightDiameterY = distance(\n keypoints[NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS + 2],\n keypoints[NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS + 4]);\n const rightDiameterX = distance(\n keypoints[NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS + 3],\n keypoints[NUM_KEYPOINTS + NUM_IRIS_KEYPOINTS + 1]);\n\n ctx.beginPath();\n ctx.ellipse(rightCenter[0], rightCenter[1], rightDiameterX / 2, rightDiameterY / 2, 0, 0, 2 * Math.PI);\n ctx.stroke();\n }\n }\n });\n }\n //ctx.drawImage(image, 0, 0, ctx.width, ctx.height);\n // Write \"Awesome!\"\n ctx.font = '30px Impact'\n //ctx.rotate(0.1)\n ctx.fillText('Awesome!', 50, 100)\n // Draw line under text\n var text = ctx.measureText('Awesome!')\n ctx.strokeStyle = 'rgba(0,0,0,0.5)'\n ctx.beginPath()\n ctx.lineTo(50, 102)\n ctx.lineTo(50 + text.width, 102)\n ctx.stroke()\n\n //socket.emit('player',data);\n socket.emit('player', canvas.toDataURL('image/webp'));\n })\n });\n\n}", "function initCanvas()\n {\n document.addEventListener(\"keydown\", this.keyDownHandler, true);\n document.addEventListener(\"keyup\", this.keyUpHandler, true);\n \t//Use the document object to create a new element canvas.\n \tvar canvas = document.createElement(\"canvas\");\n \t//Assign the canvas an id so we can reference it elsewhere.\n \tcanvas.id = 'mycanvas';\n \tcanvas.width = window.innerWidth;\n \tcanvas.height = window.innerHeight;\n \t//We want this to be a 2D canvas.\n \tvar ctx = canvas.getContext(\"2D\");\n \t//Adds the canvas element to the document.\n \tdocument.body.appendChild(canvas);\n document.addEventListener(\"touchstart\", onTouchStart.bind(null,canvas));\n document.addEventListener(\"touchmove\", onTouchMove, {passive:false});\n document.addEventListener(\"touchend\", onTouchEnd);\n }", "function onInit() {\r\n gCanvas = document.querySelector('.my-canvas')\r\n gCtx = gCanvas.getContext('2d')\r\n renderGallary()\r\n addEventListeners()\r\n // drawCanvas()\r\n}", "init(data){\r\n //Receive the socket\r\n this.socket = data.socket;\r\n //Send to SERVER the information that I'm playing \r\n this.socket.emit('playerStartLevel1', data.texture);\r\n this.texture = data.texture;\r\n }", "drawCanvas() {\n\n\t}", "function SendAsDiv() {\n var encodedCanvas = canvas.toDataURL();\n var imageElement = new Image(250, 250);\n imageElement.src = encodedCanvas;\n var payload = imageElement.outerHTML;\n\n socket.emit('divimg', payload);\n }", "function init(){\n canvas = document.querySelector(\"canvas\");\n context = canvas.getContext(\"2d\");\n w = canvas.width;\n h = canvas.height;\n canvas.onpointermove = handlePointerMove;\n canvas.onpointerdown = handlePointerDown;\n canvas.onpointerup = stopDrawing;\n canvas.onpointerout = stopDrawing;\n document.querySelector(\".clear\").onclick = clearCanvas;\n}", "render() {\n this.context.drawImage(this.buffer.canvas, 0, 0, this.buffer.canvas.width, this.buffer.canvas.height, 0, 0, this.context.canvas.width, this.context.canvas.height);\n }", "function initialiseCanvas()\n{\n //set the globals\n global_canvasElement = document.getElementById('paper');\n global_canvas = global_canvasElement.getContext('2d');\n \n //simulated touch (ie. mouse) dragging for writing pad\n global_canvasElement.addEventListener('mousedown', mousedownForCanvas, false);\n global_canvasElement.addEventListener('mousemove', mousemoveForCanvas, false);\n global_canvasElement.addEventListener('mouseup', mouseupForCanvas, false);\n \n //touch dragging for writing pad\n global_canvasElement.addEventListener('touchstart', touchstartForCanvas, false);\n global_canvasElement.addEventListener('touchmove', touchmoveForCanvas, false);\n global_canvasElement.addEventListener('touchend', touchendForCanvas, false);\n \n //line drawing style\n global_canvas.strokeStyle = '#990000'; //our trademark red\n global_canvas.lineWidth = 10;\n global_canvas.lineCap = 'round'; //dat calligraphy feel\n global_canvas.lineJoin = 'round'; //dat calligraphy feel\n}", "function init() {\n // Get the specific canvas element from the HTML document\n //canvas = document.getElementById('sketchpad');\n var canvas = '<canvas id=\"sketchpad\" width=\"'+(window.innerWidth-25)+'\" height=\"300\"></canvas>';\n document.getElementById(\"preCanvas\").innerHTML = canvas;\n canvas = document.getElementById('sketchpad');\n asignarAsuntos();\n\n\n // If the browser supports the canvas tag, get the 2d drawing context for this canvas\n if (canvas.getContext)\n ctx = canvas.getContext('2d');\n ctx.strokeStyle = \"#000\";\n ctx.lineWidth = 5;\n\n // Check that we have a valid context to draw on/with before adding event handlers\n if (ctx) {\n // React to mouse events on the canvas, and mouseup on the entire document\n //canvas.addEventListener('mousedown', sketchpad_mouseDown, false);\n //canvas.addEventListener('mousemove', sketchpad_mouseMove, false);\n //window.addEventListener('mouseup', sketchpad_mouseUp, false);\n\n // React to touch events on the canvas\n // canvas.addEventListener('touchstart', sketchpad_touchStart, false);\n // canvas.addEventListener('touchmove', sketchpad_touchMove, false);\n drawTouch();\n }\n }", "function main()\n{\n\t//Function to execute when a canvas is created:\n\tvar canvasLoaded = 0;\n\tvar onLoadCanvas = function()\n\t{\n\t\tif (CB_REM.DEBUG_MESSAGES) { CB_console(\"Canvas '\" + this.getId() + \"' loaded! Mode used: \" + this.getMode()); }\n\n\t\tcanvasLoaded++;\n\n\t\t//Gets the \"context\" object to start working with the canvas:\n\t\tvar canvasContext = this.getContext();\n\t\tif (!canvasContext) { CB_console(\"ERROR: canvas context could not be obtained! Drawing cannot be performed.\"); return; }\n\n\t\t//Stores the canvas in the 'canvases' object:\n\t\tcanvases[this.getId()] = this;\n\n\t\t//If both canvas (normal and buffer) have been created, proceeds with the rendering:\n\t\tif (canvasLoaded >= 2)\n\t\t{\n\t\t\t//When the screen changes its size or its orientation, both canvases will be re-adapted:\n\t\t\tvar onResizeOrChangeOrientationTimeout = null;\n\t\t\tvar onResizeOrChangeOrientation = function()\n\t\t\t{\n\t\t\t\tclearTimeout(onResizeOrChangeOrientationTimeout);\n\t\t\t\tonResizeOrChangeOrientationTimeout = setTimeout //NOTE: needs a delay as some clients on iOS update the screen size information in two or more steps (last step is the correct value).\n\t\t\t\t(\n\t\t\t\t\tfunction()\n\t\t\t\t\t{\n\t\t\t\t\t\t//Resizes the canvas:\n\t\t\t\t\t\tcanvases[\"my_canvas\"].setWidth(CB_Screen.getWindowWidth());\n\t\t\t\t\t\tcanvases[\"my_canvas\"].setHeight(CB_Screen.getWindowHeight());\n\t\t\t\t\t\tcanvases[\"my_canvas\"].clear(); canvases[\"my_canvas\"].disableAntiAliasing();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Resizes the buffer canvas:\n\t\t\t\t\t\tcanvases[\"my_canvas_buffer\"].setWidth(CB_Screen.getWindowWidth());\n\t\t\t\t\t\tcanvases[\"my_canvas_buffer\"].setHeight(CB_Screen.getWindowHeight());\n\t\t\t\t\t\tcanvases[\"my_canvas_buffer\"].clear();\n\t\t\t\t\t\tcanvases[\"my_canvas_buffer\"].disableAntiAliasing();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\t\t\tCB_Screen.onResize(onResizeOrChangeOrientation);\n\n\t\t\t//Clears both canvas:\n\t\t\tcanvases[\"my_canvas\"].clear();\n\t\t\tcanvases[\"my_canvas_buffer\"].clear();\n\t\t\t\n\t\t\t//Disables anti-aliasing to avoid problems with adjacent sprites:\n\t\t\tcanvases[\"my_canvas\"].disableAntiAliasing();\n\t\t\tcanvases[\"my_canvas_buffer\"].disableAntiAliasing();\n\t\t\t\n\t\t\t//Creates the sprites groups:\n\t\t\tvar graphicSpritesSceneObject = createSpritesGroups();\n\n\t\t\t//Caches all needed images (performance purposes) and starts rendering sprites groups when all are loaded:\n\t\t\tmyREM = new CB_REM();\n\t\t\tmyREM.cacheImages\n\t\t\t(\n\t\t\t\tgraphicSpritesSceneObject, //CB_GraphicSpritesSceneObject.\n\t\t\t\tundefined, //reload.\n\t\t\t\tfunction(imagesLoaded) //onLoad.\n\t\t\t\t{\n\t\t\t\t\t//Sets the current time as the start time to start counting the FPS (erased each second automatically):\n\t\t\t\t\tmyREM._startTimeFPS = CB_Device.getTiming();\n\n\t\t\t\t\t//Show the FPS (Frames Per Second) every time there is a new value:\n\t\t\t\t\tmyREM.onUpdatedFPS(function(FPS) { graphicSpritesSceneObject.getById(\"fps_group\").getById(\"fps\").src = \"FPS: \" + FPS; });\n\t\t\t\t\t\n\t\t\t\t\t//Processes the sprites groups:\n\t\t\t\t\tif (CB_REM.DEBUG_MESSAGES) { CB_console(\"Starts processing graphic sprites scene ('CB_GraphicSpritesScene' object) constantly...\"); }\n\t\t\t\t\t\n\t\t\t\t\tprocessSpritesGroups(graphicSpritesSceneObject, canvases[\"my_canvas\"], canvases[\"my_canvas\"].getContext(), canvases[\"my_canvas_buffer\"], canvases[\"my_canvas_buffer\"].getContext());\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\t\n\t//Creates the canvases:\n\tvar canvases = {};\n\tcanvases[\"my_canvas\"] = new CB_Canvas\n\t(\n\t\t\"my_canvas\", //canvasId. Unique required parameter.\n\t\t\"2d\", //contextType. NOTE: some emulation methods only support \"2d\". Default: \"2d\".\n\t\tCB_Screen.getWindowWidth(), //canvasWidth. Use 'CB_Screen.getWindowWidth()' for complete width. Default: CB_Canvas.WIDTH_DEFAULT.\n\t\tCB_Screen.getWindowHeight(), //canvasHeight. Use 'CB_Screen.getWindowHeight()' for complete height. Default: CB_Canvas.HEIGHT_DEFAULT.\n\t\tonLoadCanvas, //onLoad.\n\t\tfunction(error) { CB_console(\"Canvas object problem! Error: \" + error); }, //onError.\n\t\tundefined, undefined, !!FORCED_EMULATION_METHOD, !!FORCED_EMULATION_METHOD //Forces emulation method.\n\t);\n\tcanvases[\"my_canvas_buffer\"] = new CB_Canvas\n\t(\n\t\t\"my_canvas_buffer\", //canvasId. Unique required parameter.\n\t\t\"2d\", //contextType. NOTE: some emulation methods only support \"2d\". Default: \"2d\".\n\t\tCB_Screen.getWindowWidth(), //canvasWidth. Use 'CB_Screen.getWindowWidth()' for complete width. Default: CB_Canvas.WIDTH_DEFAULT.\n\t\tCB_Screen.getWindowHeight(), //canvasHeight. Use 'CB_Screen.getWindowHeight()' for complete height. Default: CB_Canvas.HEIGHT_DEFAULT.\n\t\tonLoadCanvas, //onLoad.\n\t\tfunction(error) { CB_console(\"Canvas object problem! Error: \" + error); }, //onError.\n\t\tundefined, undefined, !!FORCED_EMULATION_METHOD, !!FORCED_EMULATION_METHOD //Forces emulation method.\n\t);\n}", "function init2() {\n canvas = document.getElementById('pictureCanvas');\n HEIGHT = canvas.height;\n WIDTH = canvas.width;\n ctx = canvas.getContext('2d');\n ghostcanvas = document.createElement('canvas');\n ghostcanvas.height = HEIGHT;\n ghostcanvas.width = WIDTH;\n gctx = ghostcanvas.getContext('2d');\n \n //fixes a problem where double clicking causes text to get selected on the canvas\n canvas.onselectstart = function () { return false; }\n \n // fixes mouse co-ordinate problems when there's a border or padding\n // see getMouse for more detail\n if (document.defaultView && document.defaultView.getComputedStyle) {\n stylePaddingLeft = parseInt(document.defaultView.getComputedStyle(canvas, null)['paddingLeft'], 10) || 0;\n stylePaddingTop = parseInt(document.defaultView.getComputedStyle(canvas, null)['paddingTop'], 10) || 0;\n styleBorderLeft = parseInt(document.defaultView.getComputedStyle(canvas, null)['borderLeftWidth'], 10) || 0;\n styleBorderTop = parseInt(document.defaultView.getComputedStyle(canvas, null)['borderTopWidth'], 10) || 0;\n }\n \n // make mainDraw() fire every INTERVAL milliseconds\n // setInterval(mainDraw, INTERVAL);\n setInterval(mainDrawImages, INTERVAL);\n \n // set our events. Up and down are for dragging,\n // double click is for making new boxes\n canvas.onmousedown = myDown;\n canvas.onmouseup = myUp;\n canvas.ondblclick = myDblClick;\n canvas.onmousemove = myMove;\n \n // set up the selection handle boxes\n for (var i = 0; i < 5; i ++) {\n var rect = new Box2Image;\n selectionHandles.push(rect);\n }\n \n // add custom initialization here:\n\n // addRectImage(\"images/city.png\");\n // addRectImage(\"images/kohls_sunglasses1.png\");\n // addRectImage(\"images/kohls_sunglasses1.png\");\n addRectImage(\"images/kohls_sunglasses1.png\");\n // addRectImage(\"http://devarapps.seemoreinteractive.com/files/clients/85/products/kohls_sunglasses1.png\");\n\n}", "function init() {\n console.log('start');\n\n canvas = document.createElement('canvas');\n WIDTH = canvas.width = (window.innerWidth - 10);\n HEIGHT = canvas.height = (window.innerHeight - 10); \n document.body.appendChild(canvas);\n\n ctx = canvas.getContext('2d');\n ghostcanvas = document.createElement('canvas');\n ghostcanvas.height = HEIGHT;\n ghostcanvas.width = WIDTH;\n gctx = ghostcanvas.getContext('2d');\n \n //fixes a problem where double clicking causes text to get selected on the canvas\n canvas.onselectstart = function () { return false; }\n \n // fixes mouse co-ordinate problems when there's a border or padding\n // see getMouse for more detail\n if (document.defaultView && document.defaultView.getComputedStyle) {\n stylePaddingLeft = parseInt(document.defaultView.getComputedStyle(canvas, null)['paddingLeft'], 10) || 0;\n stylePaddingTop = parseInt(document.defaultView.getComputedStyle(canvas, null)['paddingTop'], 10) || 0;\n styleBorderLeft = parseInt(document.defaultView.getComputedStyle(canvas, null)['borderLeftWidth'], 10) || 0;\n styleBorderTop = parseInt(document.defaultView.getComputedStyle(canvas, null)['borderTopWidth'], 10) || 0;\n }\n \n // make draw() fire every INTERVAL milliseconds\n setInterval(draw, INTERVAL);\n \n // set our events. Up and down are for dragging,\n // double click is for making new boxes\n canvas.onmousedown = myDown;\n canvas.onmouseup = myUp;\n canvas.onmousemove = myMove;\n // add custom initialization here:\n \n addRect(((WIDTH/2)-200), ((HEIGHT/2)-200), 25, 25, 'red');\n addRect(((WIDTH/2)-100), ((HEIGHT/2)-100), 25, 25, 'blue');\n updateInputs();\n\n infoBox.addEventListener(\"mouseover\", ( event ) => {\n ipc.send('hoverOn', true);\n })\n infoBox.addEventListener(\"mouseleave\", ( event ) => {\n ipc.send('hoverOff', true);\n });\n\n spot1.addEventListener(\"mouseover\", ( event ) => {\n spot1.classList.toggle('hoverOver');\n ipc.send('hoverOn', true);\n })\n spot1.addEventListener(\"mouseleave\", ( event ) => {\n ipc.send('hoverOff', true);\n spot1.classList.toggle('hoverOver');\n });\n\n spot2.addEventListener(\"mouseover\", ( event ) => {\n ipc.send('hoverOn', true);\n spot2.classList.toggle('hoverOver');\n })\n spot2.addEventListener(\"mouseleave\", ( event ) => {\n ipc.send('hoverOff', true);\n spot2.classList.toggle('hoverOver');\n });\n\n\n}", "init() {\n // setup the canvas\n this.canvasHolder.append(this.can)\n this.canvasHolder.append(this.paneOb.ta)\n this.canvasHolder.append(this.infoHolder)\n this.paneDiv.append(this.canvasHolder)\n this.can.height = this.size\n this.can.width = this.size\n this.invisican.height = this.size\n this.invisican.width = this.size\n //create interpolators for drawing\n //map xmin - xmax to 0 to 5000 or whatever width is do the same for y\n // create the regnametoValueMap\n /** This is the html canvas element context used for drawing lines and filling shapes on the canvas */\n this.ctx = this.can.getContext(\"2d\")\n /** This is the drawing context for the invisible canvas */\n this.invisictx = this.invisican.getContext(\"2d\")\n // calculate the regionSize min and max for all the slices, and allow us to scale the canvas content depending on that in the future\n this.calcRegionSizeGlobal()\n // take care of binding various functions to the events that get emitted\n // events to track valcolchange,radiobuttonchanged,sliderchange, filterChange\n // valcolchange we need to wait until something happens with the sliders?\n\n this.can.addEventListener(\"click\", this.getPos.bind(this))\n //radiobutton and slider change have implications for the slice we are looking at\n this.can.addEventListener(\"radiobuttonchanged\", () => {\n // must also trigger a slider update because otherwise slices get counted wrong\n this.setupCanvas()\n this.drawCanvas()\n })\n this.can.addEventListener(\"sliderchange\", () => {\n this.setupCanvas()\n this.drawCanvas()\n })\n\n //activity filter change, and valcolchange mean we must update our version of the ctrlInstance coldat, requires updating the regNameToValMap also\n this.can.addEventListener(\"filterChange\", () => {\n this.setupCanvas()\n this.drawCanvas()\n })\n\n }", "function drawCanvas() {\n var canvas = $('#MapCanvas');\n var ctx = canvas.get(0).getContext('2d');\n\n // Draw the map image on canvas\n ctx.drawImage(mMapImage, 0, 0);\n\n // Draw multi-colored circle overlays.\n for (var i in mSensors) {\n var sensor = mSensors[i];\n var color = getSensorColor(sensor);\n var arrowColor = getArrowColor(sensor);\n drawCircle(ctx, sensor.x, sensor.y, mSensorCircleSize, color);\n drawArrow(ctx, sensor.x, sensor.y, arrowColor)\n }\n }", "function generateAndDrawImage()\n { \n // generate image data from DICOM\n view.generateImageData(imageData); \n // set the image data of the layer\n imageLayer.setImageData(imageData);\n // draw the image\n imageLayer.draw();\n }", "function setupCanvas() {\r\n var gameCanvas = \"gameCanvas\";\r\n var height = 500;\r\n var width = 800;\r\n var square = 100;\r\n \r\n backgroundImg = new imageLib(gameCanvas, width, height, 0, 0);\r\n \r\n /*Add background image to canvas*/\r\n backgroundImg.addImg(gameImage.loadedImg[\"background\"]);\r\n \r\n /*Setup interface screens*/\r\n setupInterfaces();\r\n \r\n /*Initiate grid*/\r\n //backgroundImg.canvasGrid(backgroundImg.canvas.width, backgroundImg.canvas.height);\r\n backgroundImg.canvasGrid(square); //Square size\r\n backgroundImg.gridSqHeight = square;\r\n backgroundImg.gridSqWidth = square;\r\n setupGridSpots();\r\n \r\n /*Set up the game ref*/\r\n backgroundImg.gameRef.turn = \"character\";\r\n backgroundImg.gameRef.preTurn = \"wolf\";\r\n \r\n backgroundImg.gameRef.players.push(\"character\");\r\n backgroundImg.gameRef.players.push(\"wolf\");\r\n \r\n backgroundImg.gameRef.actionList.push(\"charRoll\"); \r\n backgroundImg.gameRef.action = \"waitRoll\";\r\n \r\n /*Draw the character on the screen*/\r\n setupCharacter(gameCanvas);\r\n addEnemy(gameCanvas);\r\n \r\n /*Drawing out paths in the game*/\r\n //setupObstacles();\r\n \r\n /*Draw up the cards*/\r\n setupCard(gameCanvas);\r\n setupCardChoices();\r\n \r\n /*Draw up the dice images*/\r\n setupDiceImg(gameCanvas);\r\n \r\n /*Draw up trap images*/\r\n setupTrapImg(gameCanvas);\r\n}", "function handleReady()\n{\n socket.emit('ready', masterRoomCode);\n $('#showdown_gun').attr(\"src\", \"/static/images/GunTilt.png\");\n $('#showdown_btn_text').html('');\n}", "function drawFeed(img) {\n\t console.log(\"Start drawing kinectron\")\n\t kinectContext.drawImage(img, 10, 10);\n\t}", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "initialize() {\n this.canvas.addEventListener('mousedown', function(event) {\n if(event.offsetX < self.screenX && event.offsetY < self.screenY) {\n self.isDragging = true;\n }\n });\n\n document.addEventListener('mouseup', function(event) {\n self.isDragging = false;\n });\n\n this.canvas.addEventListener('mousemove', function(event) {\n if(self.isDragging) {\n self.screenDisplacementX = self.screenDisplacementX + event.movementX;\n self.screenDisplacementY = self.screenDisplacementY + event.movementY;\n self.computeCenter();\n self.redraw();\n }\n });\n\n this.canvas.addEventListener('wheel', function(event) {\n if(event.deltaY !== 0) {\n self.pixelsPerUnitHorizontal *= Math.sign(event.deltaY) > 0 ? 0.909 : 1.1;\n self.pixelsPerUnitVertical *= Math.sign(event.deltaY) > 0 ? 0.909 : 1.1;\n self.context.setTransform(1, 0, 0, 1, 0, 0);\n self.redraw();\n }\n });\n }", "function init() {\n\tcontext = canvas.getContext('2d');\n\tcanvas.height = 420;\n\tcanvas.width = window.innerWidth;\n\t//Calls the draw function on a repeated interval to draw the bubbles.\n\tsetInterval(draw, 10);\n}", "function JSCanvasLib(){\r\n\t// creates the internal object in JSON style\r\n\tvar odata={\r\n\t\t/*\r\n\t\t* about Shows the about dialog\r\n\t\t* Note: (a little ego in here)\r\n\t\t*\r\n\t\t*/\r\n\t\tabout:function(){alert(\"JSCanvas 1.0\\nby Gustavo Adolfo Flores González\")},\r\n\t\t\r\n\t\t/*\r\n\t\t* Context reference of the canvas\r\n\t\t*\r\n\t\t*/\r\n\t\tctx:null,\r\n\t\t\r\n\t\t/*\r\n\t\t* This is the image list (used to save image instances).\r\n\t\t*\r\n\t\t*/\r\n\t\t_images:{},\r\n\t\t\r\n\t\t/*\r\n\t\t* The magic function _asyncDrawImage\r\n\t\t* Description: This functions gets the parameters from the AsyncImage object, and do the actual drawing\r\n\t\t* @param data The basic data for the image (the actual parameters)\r\n\t\t*\r\n\t\t* Description\r\n\t\t* This are the true parameters:\r\n\t\t* data.img Image path\r\n\t\t* data.pars.x Parameter X\r\n\t\t* data.pars.y Parameter Y\r\n\t\t* data.pars.w Parameter w (Width)\r\n\t\t* datapars.h Parameter h (Height)\r\n\t\t* \r\n\t\t* Note: When data.pars.w and data.pars.h are set to a value, it uses the full drawImage.\r\n\t\t*\r\n\t\t*/\r\n\t\t_asyncDrawImage:function(data){\r\n\t\t\t//data.pars is the actual parameters when drawImage was called (url,ix,iy)\r\n\t\t\t//data.pars.x is the x position\r\n\t\t\t//data.pars.y is the y position\r\n\t\t\t//data.pars.ctx is the current context (2d context of canvas)\r\n\t\t\tif(isset(data.pars.w) && isset(data.pars.h))\r\n\t\t\t{\r\n\t\t\t\tdata.pars.ctx.drawImage(data.img,data.pars.x,data.pars.y,data.pars.w,data.pars.h);\r\n\t\t\t}else{\r\n\t\t\t\tdata.pars.ctx.drawImage(data.img,data.pars.x,data.pars.y);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\t\r\n\t\t/*\r\n\t\t* This function do the initial async creation of the image calling\r\n\t\t* \r\n\t\t* @param url The url to the image (local or web based path)\r\n\t\t* @param ix X coordinate\r\n\t\t* @param iy Y coordinate\r\n\t\t*/\r\n\t\tdrawImage:function(url,ix,iy){\r\n\t\t\t\r\n\t\t\tthis._images[url]=new AsyncImage(url,{x:ix,y:iy,ctx:this.ctx},this._asyncDrawImage);\r\n\t\t},\r\n\r\n\t\t/*\r\n\t\t* This function do the initial async creation of the image calling (with Stretch)\r\n\t\t*\r\n\t\t* @param url The url to the image (local or web based path)\r\n\t\t* @param ix Initial X coordinate\r\n\t\t* @param iy Initial Y coordinate\r\n\t\t* @param iw Initial Width\r\n\t\t* @param ih Initial Height\r\n\t\t*\r\n\t\t*/\r\n\t\tdrawImageStretch:function(url,ix,iy,iw,ih){\r\n\t\t\t\r\n\t\t\tthis._images[url]=new AsyncImage(url,{x:ix,y:iy,w:iw,h:ih,ctx:this.ctx},this._asyncDrawImage);\r\n\t\t},\r\n\r\n\t\t\r\n\t\t/*\r\n\t\t* Set the reference to the canvas object from DOM\r\n\t\t*\r\n\t\t* @param id The id of the canvas object (DOM based)\r\n\t\t*\r\n\t\t*/\r\n\t\tsetCanvas:function(id){\r\n\t\t\t\tthis.ctx=document.getElementById(id).getContext('2d');\r\n\t\t\t},\r\n\t\t\t\r\n\t\t/*\r\n\t\t* This maps the property fillStyle to a function\r\n\t\t*\r\n\t\t* @param aColor Is the actual color\r\n\t\t*\r\n\t\t*/\r\n\t\tsetColor:function(aColor){\r\n\t\t\t\tthis.ctx.fillStyle=aColor;\r\n\t\t\t},\r\n\t\t\t\r\n\t\t/*\r\n\t\t* This maps the property font to a function\r\n\t\t*\r\n\t\t* @param aFont Current font to set\r\n\t\t*\r\n\t\t*/\r\n\t\tsetFont:function(aFont){\r\n\t\t\t\tthis.ctx.font=aFont;\r\n\t\t\t},\r\n\t\t\r\n\t\t/*\r\n\t\t* This function combines this.setColor and this.ctx.fillText to get a simple call to draw a string with color\r\n\t\t*\r\n\t\t* @param text The texto to write\r\n\t\t* @param x X coordinate\r\n\t\t* @param y Y coordinate\r\n\t\t* @param aColor Color of the string to draw\r\n\t\t*\r\n\t\t*/\r\n\t\tdrawString:function(text, x,y,aColor){\r\n\t\t\t\tthis.setColor(aColor);\r\n\t\t\t\tthis.ctx.fillText(text,x,y);\r\n\t\t\t},\r\n\t\t\r\n\t\t/*\r\n\t\t* This function combines this.setColor and this.ctx.fillRect to draw a rectangle with color\r\n\t\t*\r\n\t\t* @param x X coordinate\r\n\t\t* @param y Y coordinate\r\n\t\t* @param w Width\r\n\t\t* @param h Height\r\n\t\t* @param aColor The color to fill the Rectangle\r\n\t\t*\r\n\t\t*/\r\n\t\tfillRect:function(x,y,w,h,aColor){\r\n\t\t\t\tthis.setColor(aColor);\r\n\t\t\t\tthis.ctx.fillRect(x,y,w,h);\r\n\t\t\t}\r\n\t};\r\n\t\r\n\treturn odata;\r\n\t\r\n}", "function setupSocket(){\n\t\tvar pos = {\n\t\t\tx: Math.floor(Math.random()*451),\n\t\t\ty: Math.floor(Math.random()*451),\n\t\t};\n\n\t\tvar color = {\n\t\t\tr: Math.floor(Math.random()*256),\n\t\t\tg: Math.floor(Math.random()*256),\n\t\t\tb: Math.floor(Math.random()*256)\n\t\t};\n\n\t\tuser.pos = pos;\n\t\tuser.radius = 20;\n\t\tuser.color = color;\n\t\tuser.hit = 0;\n\n\t\tsocket.emit('join', {\n\t\t\tname: user.name,\n\t\t\tpos: pos,\n\t\t\tradius: 20,\n\t\t\tcolor: color,\n\t\t\thit: 0,\n\t\t\tscore: 0,\n\t\t});\n\n\t\t// get other clients data from server\n\t\tsocket.on('initData', function(data){\n\t\t\tplayers = data.players;\n\t\t\tarrayBullets = data.arrayBullets;\n\t\t});\n\n\t\t// updates player movements & bullets\n\t\tsocket.on('update', function(data){\n\t\t\tplayers = data.players;\n\t\t\tarrayBullets = data.arrayBullets;\n\t\t\tdraw();\n\t\t});\n\t}", "function init(){\r\n if (context){\r\n //React to mouse events on the canvas, and mouseup on the entire document\r\n canvas.addEventListener('mousedown', canvas_mouseDown, false);\r\n canvas.addEventListener('mousemove', canvas_mouseMove, false);\r\n window.addEventListener('mouseup', canvas_mouseUp, false);\r\n\r\n //React to touch events on the canvas\r\n canvas.addEventListener('touchstart', canvas_touchStart, false);\r\n canvas.addEventListener('touchend', canvas_touchEnd, false);\r\n canvas.addEventListener('touchmove', canvas_touchMove, false);\r\n }\r\n}", "function renderCanvas() {\n\n // Handle curr meme img\n const currMeme = getCurrMemeInfo('img');\n const memeImg = new Image();\n memeImg.src = currMeme.url;\n const memeImgWidth = memeImg.width * resizer;\n const memeImgHeight = memeImg.height * resizer;\n\n // Draw curr meme img to canvas (than handle lines)\n memeImg.addEventListener('load', () => {\n gCtx.drawImage(memeImg, 0, 0, memeImgWidth, memeImgHeight);\n\n // Handle curr meme lines\n let memeLines = getMemeLinesById(gCurrMeme);\n\n if (memeLines.length) {\n memeLines = memeLines[0].lines\n memeLines.forEach((line) => {\n drawLine(line.txt, line.font, line.stroke, line.pos);\n })\n }\n\n }, false);\n\n}", "function init() \n\t{\n\t\tcanvas = document.getElementById(\"canvas\");\n\t\tcontext = canvas.getContext('2d');\n\t\tcontext.lineWidth = 4;\n\t\tcontext.lineCap = 'round';\n\t\n\t\tcircleCount=0;\t\n\t\tdraggingDraw = false;\n\t\tbgColor = \"#000000\";\n\t\tcircles = [];\n\t\t\n\t\t//event listeners to draw circles\n\t\tcanvas.addEventListener('mousedown', dragStart, false);\n\t\tcanvas.addEventListener('mousemove', drag, false);\n\t\tcanvas.addEventListener('mouseup', dragStop, false);\n\t\t\n\t\t//event listener to delete circle\n\t\tcanvas.addEventListener('dblclick', deleteCircle,false);\n\t}", "function main() {\n //get canvas elementFromPoint\n canvas = document.getElementById(\"AMC\");\n if (!canvas)\n console.log(\"Obtaining canvas from main document failed\\n\");\n else\n console.log(\"Obtaining canvas from main document succeeded\\n\");\n //print obtained canvas width and height on console\n console.log(\"Canvas width:\" + canvas.width + \" height:\" + canvas.height);\n canvas_original_width_ata = canvas.width;\n canvas_original_height_ata = canvas.height;\n\n\n //register keyboard and mouse event with window class\n window.addEventListener(\"keydown\", keydown, false);\n window.addEventListener(\"click\", mouseDown, false);\n window.addEventListener(\"resize\", resize, false);\n\n init();\n resize();\n draw();\n}", "function draw_image( img ) {\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.drawImage(img, 0, 0, canvas.width, canvas.height);\n }", "function game(){\n // Used for receiving and sending all server messages and data\n var socket = io.connect('http://localhost:8000'); \n \n // Start Button - creates a ship for the player after he enters a username \n $('#submit').click(function(){\n var userName = $(\"#userName\").val();\n createThisPlayer(userName);\n $(this).hide();\n });\n \n // Canvas Element \n var canvas = document.getElementById(\"stage\"),\n ctx = canvas.getContext(\"2d\"),\n shipPlayers = {},\n rocks = [];\n \n // Create a ship for the player on this browser\n function createThisPlayer(userName){\n // Create a ship for this browser\n makePlayer(false, { userName: userName });\n // Tell the other players that this browser just connected\n socket.emit('newPlayer' , { userName: userName, x: 40, y: 40, radian: 0 });\n }\n \n function makePlayer(internet, data){\n if(internet){\n var newShip = { \n socket: socket, \n canvas: canvas, \n canvasContext: ctx, \n userName: data.userName, \n startX: data.x, \n startY: data.y, \n startRotation: data.r, \n isInternet: true \n };\n shipPlayers[data.userName] = new ship(newShip);\n } else {\n var newShip = {\n socket: socket, \n canvas: canvas, \n canvasContext: ctx, \n userName: data.userName, \n startX: 40, \n startY: 40, \n startRotation: 0, \n isInternet: false\n };\n shipPlayers.thisPlayer = new ship(newShip);\n }\n\n \n }\n \n \n // Clear the canvas on the stage\n function clearCanvas (){\n ctx.clearRect( 0, 0, canvas.width, canvas.height);\n }\n \n // Render every ship on the stage\n function renderPlayers(){\n for( var key in shipPlayers){\n shipPlayers[key].renderShip();\n }\n }\n function renderRocks(){\n for(var curRock in rocks){\n var renderRock = rocks[curRock];\n var radian = renderRock.r * Math.PI / 180;\n var transx = renderRock.x + 25;\n var transy = renderRock.y + 25;\n ctx.save();\n ctx.setTransform(1,0,0,1,0,0);\n ctx.translate(transx, transy);\n ctx.rotate(radian);\n ctx.translate(-transx,-transy);\n ctx.drawImage(rockImage, renderRock.x, renderRock.y);\n ctx.restore();\n }\n }\n \n\n \n \n // Main Set interval for the rendering of the stage and movement\n var runProgram = setInterval(function(){\n movePlayer(shipPlayers);\n clearCanvas();\n renderPlayers();\n renderRocks();\n }, 30);\n \n // ---------SOCKET SERVER INTERACTION BELOW------------------ // \n \n // Loads previous players onto the canvas\n socket.on('getPreviousPlayers', function(playerArray){\n for(var playerNum = 0; playerNum < playerArray.length; playerNum += 1){ \n var data = playerArray[playerNum];\n makePlayer(true, data);\n }\n \n }); \n \n // Loads the ship position for a specific player\n socket.on('getSPos', function(newPosition){\n if(shipPlayers[newPosition.uN]){\n shipPlayers[newPosition.uN].setPosition(newPosition);\n }\n \n });\n \n // Creates a new ship when a new player joins\n socket.on('newPlayer', function(data){\n console.log('new player joining');\n makePlayer(true, data);\n \n });\n \n socket.on('getRocks', function(newRocks){\n \n rocks = newRocks;\n \t\t\n });\n\n }", "function init(){\n \n c.fillStyle = canvasBkg\n c.fillRect(0, 0, canvas.width, canvas.height)\n}", "function drawImages() {\n if (counter < project.renderImages.length) {\n var imageForm = new FormData();\n ctx.clearRect(0, 0, canvasRender.width, canvasRender.height);\n var image = project.renderImages[counter];\n var posX = parseInt((res.width / 2) - (image.originalWidth / 2));\n var posY = parseInt((res.height / 2) - (image.originalHeight / 2));\n ctx.putImageData(image, posX, posY);\n var imgData = canvasRender.toDataURL(\"image/jpeg\", 1.0);\n // convert base64 string to blob\n var blobBin = atob(imgData.split(',')[1]);\n var array = [];\n for (var j = 0; j < blobBin.length; j++) {\n array.push(blobBin.charCodeAt(j));\n }\n var file = new Blob([new Uint8Array(array)], {\n type: 'image/jpeg'\n });\n\n var fieldname = filename = \"image\" + counter;\n console.log(\"making\", filename);\n imageForm.append('projectID', project.getProjectID());\n imageForm.append('currImageNum', counter + 1);\n imageForm.append(fieldname, file, filename + \".jpg\");\n\n var request = new XMLHttpRequest();\n request.open(\"POST\", \"/render\");\n request.send(imageForm);\n request.onreadystatechange = function() {\n if (request.readyState == 4) {\n if (request.status === 200) {\n drawImages();\n } else {\n swal(\"Error\", \"There was a problem with the image upload. Try again\", \"error\");\n }\n }\n }\n counter += 1;\n } else {\n done = true;\n formData.append('currImageNum', counter);\n }\n }", "function onLoad() {\n // opens websocket\n function isOpen(ws) {\n return socket.readyState === ws.OPEN;\n }\n //connecting to camera using websocket\n var socket = new WebSocket(\"ws://\" + window.location.host + \"/ws\");\n var img_socket = new WebSocket(\n \"ws://\" + window.location.host + \"/ws_camera_feed\"\n );\n\n // when websocket connected, prints statement in log\n socket.onopen = function () {\n socket.send(\"connected to the SocketServer...\");\n };\n //error message + log handling\n socket.onerror = function (error) {\n appendToLogs(`Error: ${error}`);\n };\n\n // message displayed on log after sensor detects something\n socket.onmessage = function (msg, cb) {\n appendToLogs(msg.data);\n if (cb) cb();\n };\n\n // camera log statement\n img_socket.onmessage = function (msg) {\n $(\"#cam\").attr(\"src\", \"data:image/jpg;base64,\" + msg.data);\n return false;\n };\n\n // displayed when camera mode switched\n $(\"form#camera_mode\").submit(function (event) {\n if (!isOpen(socket)) {\n appendToLogs(\"Already closed socket!\");\n return false;\n }\n sendRequest(\"camera\", c, $(\"#camera_mode_data\").val());\n return false;\n });\n\n // displayed when client disconnected from websocket\n $(\"form#disconnect\").submit(function (event) {\n if (!isOpen(socket)) {\n appendToLogs(\"Already closed socket!\");\n return false;\n }\n appendToLogs(\"Disconnected from the server...\");\n socket.send(\"disconnect_request\");\n return false;\n });\n}", "render() {\n image(this.image, this.x, this.y, this.width, this.height);\n }", "renderedCallback() {\n if(this.testDriveType==='C')\n {\n this.canvas = this.template.querySelector('[data-id=\"can\"]');\n this.ratio = Math.max(window.devicePixelRatio || 1, 1);\n this.w = this.canvas.width * this.ratio;\n this.h = this.canvas.height * this.ratio;\n \n //For desktop mouse move events\n this.canvas.addEventListener('mousemove', this.handlemouseMove.bind(this));\n this.canvas.addEventListener('mousedown', this.handlemousedown.bind(this));\n this.canvas.addEventListener('mouseup', this.handlemouseup.bind(this));\n this.canvas.addEventListener('mouseout', this.handlemouseout.bind(this));\n \n // Set up touch events for mobile, etc\n this.canvas.addEventListener('touchstart', this.handletouchstart.bind(this));\n this.canvas.addEventListener('touchend', this.handletouchend.bind(this));\n this.canvas.addEventListener('touchmove', this.handletouchmove.bind(this));\n }\n \n }", "constructor(canvas) {\n this.canvas = canvas;\n this.ctx = this.canvas.getContext('2d');\n this.width = this.canvas.width;\n this.height = this.canvas.height;\n this.time = 0;\n this.inputEvent = new EventEmitter();\n this.outputEvent = new EventEmitter();\n this._assignInputEvent();\n }", "function onInit() {\n canvasElement = document.getElementById(\"canvasElement\");\n ctx = canvasElement.getContext(\"2d\");\n\n addEventListeners();\n}", "static init() {\n document.body.style.margin = \"0\"; //\"{margin=0;padding=0;}\"\n var c = document.createElement(\"canvas\");\n c.id = \"crc2\";\n document.body.appendChild(c);\n crc2 = c.getContext(\"2d\");\n Setup.size(100, 100);\n window.addEventListener(\"touchmove\", Setup.updateMouseByTouch);\n window.addEventListener(\"touchstart\", Setup.updateMouseByTouch);\n window.addEventListener(\"touchend\", Setup.updateMouseByTouch);\n window.addEventListener(\"mousedown\", Setup.updateMouse);\n window.addEventListener(\"mouseup\", Setup.updateMouse);\n window.addEventListener(\"mousemove\", Setup.updateMouse);\n window.addEventListener(\"keyup\", Setup.trackKeypress);\n window.addEventListener(\"keydown\", Setup.trackKeypress);\n window.addEventListener(\"load\", Setup.printLinks);\n }", "function CanvasInit(){\n context.fillStyle = 'white';\n context.fillRect(0,0,canvas.width, canvas.height);\n context.fillStyle = 'black';\n context.strokeStyle = 'black'\n setUpCanvas();\n clear();\n}", "function createCanvas() {\n // console.log(parseInt(pixelByPixel.value));\n selectedFrameData = null;\n selectedFrameData = {};\n layerCount = 0;\n framesArray = [],\n currentFrame = 0,\n playbackRunning = false,\n playbackInterval = null,\n unsavedFrame = false;\n removeListeners();\n resetFrames();\n resetLayers();\n resetSelectionState();\n addDisplayFrame(0);\n setCurrentFrame(0);\n initCanvas(\"2d\", parseInt(pixelByPixel.value));\n}", "init() {\n const canvas = document.createElement('canvas');\n\n canvas.style.display = 'none';\n canvas.style.position = 'fixed';\n canvas.style.top = '0px';\n canvas.style.left = '0px';\n canvas.style.zIndex = '1000000';\n this.canvas = canvas;\n\n this.context = canvas.getContext('2d');\n\n document.body.appendChild(canvas);\n\n window.addEventListener('resize', (event) => this.resize());\n\n // UI events\n window.addEventListener('mousemove', (event) => this.mouseMove(event));\n window.addEventListener('mouseup', (event) => this.mouseUp(event));\n window.addEventListener('mousedown', (event) => this.mouseDown(event));\n window.addEventListener('keydown', (event) => this.keyDown(event));\n\n this.resize();\n }", "draw() {\n // Displaying the background\n image(hubImage, 0, 0, width, height);\n }", "function socketIOinit(io)\n{\n console.log(\"running on port\");\n //python client connects\n io.on('connection',function(socket){\n // socketListeners\n // call this immediately on PC client\n socket.on('registerListener',function(data){\n console.log(\"uid: \" + data['UID']);\n var uuid = data['UID'];\n if (!socketListeners[uuid]) {\n socketListeners[uuid] = [];\n }\n socketListeners[uuid].push(socket);\n });\n\n socket.on('reqFiles',function(data){\n var client = data[\"client\"];\n var dir = data[\"dir\"];\n var file = data[\"file\"];\n console.log(\"req files\");\n requestFilesFromClient(file, dir, client, socket);\n });\n\n socket.on(\"reqEncrypt\",function(data){\n var client = data[\"client\"];\n console.log(\"req encrypt\");\n encrypt(client);\n });\n\n socket.on(\"reqDecrypt\",function(data){\n var client = data[\"client\"];\n console.log(\"req decrypt\");\n decrypt(client);\n });\n\n socket.on(\"reqKeylog\",function(data){\n var client = data[\"client\"];\n console.log(\"req keylog\");\n keylog(client,socket);\n });\n\n socket.on(\"reqWebcam\",function(data){\n var client = data[\"client\"];\n console.log(\"req webcam\");\n webcam(client,socket);\n });\n\n socket.on(\"reqScreenshot\",function(data){\n var client = data[\"client\"];\n console.log(\"req screenshot\");\n screenshot(client,socket);\n });\n\n socket.on(\"reqTTS\",function(data){\n var client = data[\"client\"];\n var text = data[\"text\"];\n console.log(\"req tts\");\n tts(client,text);\n });\n\n });\n}", "function connect(){\n const socket = io(server);\n socket.on('connect', ()=>{\n console.log('connected')\n })\n\n emissionObject ={\n currentName:user.userName,\n currentImg:user.imgUrl,\n date:new Date().getTime,\n message:\"hello world\"\n }\n socket.on(room, (message)=>{\n console.log(`${user.username}: ${user.imgUrl}: ${message}`)\n let textLine = document.createElement(\"li\")\n let image = createImage(user.imgUrl);\n textLine.innerText = `${user.userName}: ${message}`\n textLine.appendChild(image);\n chatbox.appendChild(textLine);\n\n \n }) ;\n\n return socket;\n}", "function drawFeed(img) {\n console.log(\"Start drawing kinectron\")\n kinectContext.drawImage(img, 10, 10);\n}", "_setupCanvas () {\r\n\t\tthis.canvas = document.createElement('canvas');\r\n\t\tthis.context = this.canvas.getContext('2d');\r\n\r\n\t\tthis.canvas.width = 500;\r\n\t\tthis.canvas.height = 500;\r\n\r\n\t\tlet body = document.getElementById('body');\r\n\t\tbody.appendChild(this.canvas);\r\n\t}", "function setupCanvas() {\n// setup everything else\n\tconsole.log(\"Setting up canvas...\")\n\tcanvas = document.getElementById(\"drone-sim-canvas\");\n\twindow.addEventListener(\"keyup\", keyFunctionUp, false);\n\twindow.addEventListener(\"keydown\", keyFunctionDown, false);\n\twindow.onresize = doResize;\n\tcanvas.width = window.innerWidth-16;\n\tcanvas.height = window.innerHeight-200;\n\tconsole.log(\"Done.\")\n}", "function init() {\n var clickevent = document.createEvent('MouseEvents');\n clickevent.initEvent('click', true, true);\n\n body.addEventListener('mousedown', function(event) { prevX = event.clientX; prevY = event.clientY; isDown = true; }, false);\n body.addEventListener('mouseup', function() { isDown = false; }, false);\n body.addEventListener('click', function(event) {\n if (isClear(event)) {\n try { getBeneath(event).dispatchEvent(clickevent); } catch (e) { }\n }\n mouseMove(event); }, false);\n body.addEventListener('mousemove', function(event) { curX = event.clientX; curY = event.clientY; var ben = getBeneath(event); if (ben!=null && ben.nodeName=='A') canvas.style.cursor='pointer'; else if (ben!=null) canvas.style.cursor = ben.style.cursor; else canvas.style.cursor='default'; if (isDown) mouseMove(event); }, false);\n body.addEventListener('keydown', function(event) { onKeyDown(event); }, false);\n body.addEventListener('keyup', function(event) { gen = event.shiftKey; onKeyUp(event); if (holdForElement) { elemType='droplet'; }}, false);\n body.addEventListener('touchmove', function(event) { touchMove(event); }, false);\n\n canvas = document.createElement('canvas');\n canvas.id = 'growthCanvas';\n point = canvas.getContext('2d');\n if (inBackground) {\n canvas.style.zIndex = -9999;\n } else {\n canvas.style.zIndex = 9998;\n }\n\n canvas.setAttribute('width', window.innerWidth + 'px');\n canvas.setAttribute('height', window.innerHeight + 'px');\n canvas.style.position = 'fixed';\n canvas.style.left = '0px';\n canvas.style.top = '0px';\n body.appendChild(canvas);\n\n point.globalAlpha = opacity;\n point.font = '90px Arial';\n point.fillText(loadingText, (window.innerWidth - point.measureText(loadingText).width)/2, window.innerHeight/2, window.innerWidth);\n\n point.fillStyle = '#cccccc';\n point.font = '85px Arial';\n point.fillText(loadingText, (window.innerWidth - point.measureText(loadingText).width)/2, (window.innerHeight - 2)/2, window.innerWidth);\n\n reset();\n\n player = new Player();\n for (var i = 0; i < numBullets; i++) {\n player.bullets[i] = new Bullet();\n }\n\n /* load game */\n (function loadGame() {\n const partWidth = window.innerWidth/particleSize;\n const partHeight = window.innerHeight/particleSize;\n world.elements.forEach(({ shape, positioning, x, y, width, height, type }) => {\n if (positioning === 'relative') {\n if (shape === 'rectangle') {\n rectanglePoint(\n parseInt(partWidth * x, 10),\n parseInt(partHeight * y, 10),\n partWidth * width,\n partHeight * height,\n type, true, []);\n } else if (shape === 'circle') {\n circlePoint(\n parseInt(partWidth * x, 10),\n parseInt(partHeight * y, 10),\n parseInt(partWidth * width, 10),\n type, true, []);\n } else if (shape === 'elipse') {\n elipsePoint(\n parseInt(partWidth * x, 10),\n parseInt(partHeight * y, 10),\n parseInt(partWidth * width, 10),\n parseInt(partHeight * height, 10),\n type, true, []);\n }\n } else if (positioning === 'absolute') {\n if (shape === 'rectangle') {\n rectanglePoint(x, y, width, height, type, true, []);\n } else if (shape === 'circle') {\n circlePoint(x, y, width, type, true, []);\n } else if (shape === 'elipse') {\n elipsePoint(x, y, width, height, type, true, []);\n }\n }\n });\n\n if (world.player) {\n const { x, y, positioning } = world.player;\n point.clearRect(player.x * particleSize, player.y * particleSize, particleSize, particleSize);\n if (positioning == 'relative') {\n player.x = parseInt(partWidth * x, 10);\n player.y = parseInt(partHeight * y, 10);\n } else if (positioning === 'absolute') {\n player.x = parseInt(x, 10);\n player.y = parseInt(y, 10);\n }\n\n }\n })();\n /* End load game */\n\n /* Load images images */\n growthImage = new Image();\n growthImage.opacity = opacity;\n growthImage.src = require('./images/growth.png');\n\n dropletImage = new Image();\n dropletImage.opacity = opacity;\n dropletImage.src = require('./images/droplet.png');\n\n steamImage = new Image();\n steamImage.opacity = opacity;\n steamImage.src = require('./images/steam.png');\n\n fireImage = new Image();\n fireImage.opacity = opacity;\n fireImage.src = require('./images/fire.png');\n\n wallImage = new Image();\n wallImage.opacity = opacity;\n wallImage.src = require('./images/wall.png');\n\n genImage = new Image();\n genImage.opacity = opacity;\n genImage.src = require('./images/gen.png');\n\n isDown = false;\n elemType = 'droplet';\n\n point.clearRect(0, 0, window.innerWidth, window.innerHeight);\n setTimeout(update, gameSpeed);\n }" ]
[ "0.7730842", "0.7094081", "0.68212616", "0.65759593", "0.65700775", "0.64671576", "0.64510214", "0.64255697", "0.63993853", "0.63710254", "0.6361172", "0.6315473", "0.6306193", "0.6290534", "0.6289295", "0.62535805", "0.62452394", "0.61629826", "0.6147932", "0.61470073", "0.6146082", "0.61185634", "0.61064273", "0.61011165", "0.60857046", "0.6082415", "0.6052127", "0.6004087", "0.59952915", "0.59868956", "0.5986423", "0.5953856", "0.5930121", "0.5911251", "0.5904685", "0.58903104", "0.58853364", "0.58729464", "0.58719176", "0.58642507", "0.58575046", "0.5856028", "0.58505183", "0.58495784", "0.5841022", "0.58357894", "0.5831126", "0.5816964", "0.5811794", "0.58094555", "0.5805936", "0.58031076", "0.5794469", "0.57942814", "0.5787959", "0.57844126", "0.57836425", "0.5780034", "0.5777607", "0.57731915", "0.5767395", "0.5765957", "0.5751875", "0.57511467", "0.574843", "0.57458097", "0.5742203", "0.5729844", "0.57275075", "0.5714973", "0.5713284", "0.5713284", "0.5708128", "0.57060605", "0.5693675", "0.56920063", "0.5690378", "0.5685671", "0.56815284", "0.56784964", "0.5676181", "0.56756675", "0.5674301", "0.56735903", "0.5671606", "0.56657964", "0.5663338", "0.56574285", "0.565285", "0.5652232", "0.5652209", "0.5634455", "0.5632048", "0.56235164", "0.5622171", "0.56121707", "0.561122", "0.5602382", "0.5601064", "0.5601008" ]
0.6808372
3
called when to clear the current canvas for new a drawing
function resetCanvas(){ ctx.clearRect(0, 0, canvas.width, canvas.height); // Restore the transform ctx.restore(); // Clears the specific canvas completely for new drawing }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCanvas() {\n drawingContext.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "clearCanvas(){\n\t\tthis.ctx.save();\n\t\tthis.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);\n\t\tthis.ctx.restore();\n\t}", "function clearCanvas(){\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\t\t}", "function clearCanvas() {\n}", "clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\r\n\tcanvasBackground.clear();\r\n\tcurrentFile.drawObjects.length = 0;\r\n\tpencilObj.length = 0;\r\n\t$(\"#foreground\").html(\"\");\r\n\t$(\"#foreground\").css({ 'display': 'none' });\r\n}", "function clearCanvas() {\n context.clearRect(0, 0, sizeX, sizeY);\n }", "function clearCanvas() {\n _ctx.clearRect(0, 0, _canvas.width(), _canvas.height());\n }", "function paintCanvas() {\r\n ctx.clearRect(0, 0, width, height);\r\n }", "clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clearCanvas() {\r\n this.context = this.canvas.getContext('2d');\r\n this.isDrawing = false;\r\n this.x = 0;\r\n this.y = 0;\r\n // On récupère le decalage du canevas en x et y par rapport aux bords\r\n // de la page\r\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n }", "function clearCanvas (){\n ctx.clearRect( 0, 0, canvas.width, canvas.height);\n }", "clearCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clear() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }", "function clearCanvas(){\n\t\tvar context = canvasElement.getContext('2d');\n\t\tcontext.clearRect(0,0,canvasElement.width,canvasElement.height)\n\t}", "function ksfCanvas_clear()\n{\n\tif (context !== null && canvas !== undefined)\n\t{\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t}\n}", "function clearCanvas() {\n ctx.beginPath();\n ctx.clearRect(0, 0, c.width, c.height);\n ctx.closePath();\n }", "function clearCanvas()\n{\n\tctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "clearCanvas() {\n\t\tif (this._canvas) {\n\t\t\tconst ctx = this._canvas.getContext('2d');\n\t\t\tctx.clearRect(0, 0, this._canvas.width, this._canvas.height);\n\t\t}\n\t}", "clean () {\n this.context.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas() {\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "function clearCanvas() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas() {\n stopDrawing();\n canvasContext.clearRect(0, 0, element.width, element.height);\n canvasContext.fillStyle = settings.bgColour;\n canvasContext.fillRect(0, 0, element.width, element.height);\n if (!settings.displayOnly)\n drawSigLine();\n canvasContext.lineWidth = settings.penWidth;\n canvasContext.strokeStyle = settings.penColour;\n $(settings.output, context).val('');\n output = [];\n }", "function clearCanvas () {\n \tctx.clearRect(0, 0, c.width, c.height);\n}", "function clear () {\n context.clearRect(0, 0, canvas.width, canvas.height)\n }", "function clearCanvas() {\n context.clearRect(0, 0, canvas.width, canvas.height)\n}", "function clearCanvas() {\n\t\tcontext.clearRect(0, 0, context.canvas.width, context.canvas.height);\n\t\tsmall_context.clearRect(0, 0, small_context.canvas.width, small_context.canvas.height);\n\t\t$(\".msg\").remove();\n\t}", "function clearCanvas() {\n\tctx.fillStyle = \"rgb(64,145,164)\";\n\tctx.fillRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas(){ \n\tctx.fillStyle = \"#FFFFFF\";\n\tctx.clearRect(0,0,canvas.width,canvas.height); \n}", "clearCurrentFrame() {\n this.canvas.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n }", "function clearCanvas() {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "function clearCanvas() {\n\n\tcontext.fillStyle = '#000';\n\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\n}", "function clear() {\n context.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas() {\n\tcontext.clearRect(0, 0, WIDTH, HEIGHT);\n}", "clear() {\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n }", "function clearCanvas() {\n canvasContext.clearRect(0, 0, width, height);\n cancelAnimationFrame(id);\n console.log(\"Canvas Cleared\");\n }", "function clear(canvas) {\n canvas.getContext('2d').clearRect(0,0,canvas.width,canvas.height);\n }", "clearCanvas() {\n this.canvas.width = this.canvas.width;\n this.ctx.lineWidth = 3;\n }", "clearCanvas() {\n const ctx = this.canvas.current.getContext('2d');\n\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.canvas.current.width, this.canvas.current.height);\n ctx.restore();\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas() {\n // Remove any existing points\n for (point in points) delete points[point];\n delete points;\n // Make sure the canvas is blank\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n}", "function clearCanvas(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "clearCanvas() {\n const context= this.state.context;\n context.fillStyle = 'black';\n context.fillRect( 0, 0, this.state.engine.maxWidth, this.state.engine.maxHeight );\n }", "function clearCanvas() {\n\tctx.clearRect(0, 0, W, H);\n}", "function clearCanvas() {\r\n\t\tctx.beginPath();\r\n\t\tctx.fillStyle = \"#CBCEC5\";\r\n\t\tctx.fillRect(2, 2, screenWidth - 4, screenHeight - 4);\r\n\r\n\t}", "erase() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }", "function clearCanvas(){\n ctx.clearRect(0,0,$canvas.width,$canvas.height)\n}", "function clearCanvas() {\r\n ctx.clearRect(0, 0, w, h);\r\n }", "function clearCanvas() { //Runs anytime the choose file button is pressed\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t\tcanvas.width = 650;\n\t\tcanvas.height = 500;\n\t\tcurrentLabel = 2;\n\t\tnumOfTimesCreateWasClicked = 0;\n\t\tcanvasStatesArray = [];\n\t\tpoints = [];\n\t\txy = [];\n\t\tpictureW = 0;\n\t\tpictureH = 0;\n\t\t\n\t\t$('#parentElement').empty();\t\t\n\t} //function clearCanvas()", "function ClearCanvas(){\n context.clearRect(0,0,canvas.width,canvas.height);\n}", "function clearCanvas() {\n\tcanvas = document.getElementById(\"hackCanvas\");\n\th = canvas.getContext(\"2d\");\n\th.clearRect(0,0,590,390);\n\tconsole.log(\"canvas is going to be cleared\");\n}", "function clearCanvas() {\n _drawContext.clearRect(_scrollOffsetX,_scrollOffsetY, _canvas.width, _canvas.height);\n}", "clear() {\n // clear all three canvas\n this.clearBg();\n this.clearObj();\n this.clearGr();\n }", "clear() {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, w, h);\n }", "function clearCanvas() {\n drawBackground();\n}", "function clear() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas(context){\n context.beginPath();\n context.clearRect(0, 0, canvasWidth, canvasHeight);\n}", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\n active = false;\n while(canvas.firstChild) { \n canvas.removeChild(canvas.firstChild); \n } \n}", "function clean() {\r\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "function clear() {\n\t\t\n\t\tctx.fillStyle = \"white\";\n\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\n\t}", "function clearPaint(){\n\t\n\tctx.clearRect(0,0,canvas.width,canvas.height);\n\tsocket.emit('clear');\n\n}", "clearGraphic() {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height)\n this.drawAxes()\n }", "clear()\n {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\n layers = [{}, {}, {}];\n draw();\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas(){\r\n g_colors = [];\r\n g_points = [];\r\n // Specify the color for clearing <canvas> ===================\r\n gl.clearColor(0.0, 0.0, 0.0, 1.0);\r\n\r\n // Clear <canvas>\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n}", "function clearCanvas() {\n context.clearRect(0, 0, game.width, game.height);\n }", "clear() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); \n}", "function clearCanvas() {\n ctx.clearRect(0, 0, 2000, 2000);\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function cleanCanvas(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = \"white\";\n ctx.fillRect(0,0,canvas.width,canvas.height);\n}", "function clear() {\n //this line starts an animation loop\n const animationLoop = requestAnimationFrame(clear);\n //this line clears our canvas\n c.clearRect(0, 0, 608, 608)\n //this line stops our animation loop\n cancelAnimationFrame(animationLoop);\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, W, H);\n}", "function clearCanvas() {\n ctx.clearRect(0, 0, 800, 800)\n}", "function clearScreen(){\n\tcontext.clearRect(0,0,canvas.width,canvas.height);\n}", "clear () {\n let ctx = this.canvasContext\n\n ctx.clearRect(0, 0, this.width, this.height)\n }", "function clear(){\n\t\n\t$(\"#clearButton\").bind( \"click\", function(){\n\t\t\n\t\tcontext.clearRect( 0, 0, 280, 280 );\n\t\tcontext.fillStyle=\"white\";\n\t\tcontext.fillRect(0,0,canvas.width,canvas.height);\n\n\t});\n}", "function clearCanvas() {\n pureweb.getClient().queueCommand(\"Clear\");\n}", "function cleanCanvas()\n{\n paper.clear();\n}", "function clear(){\n\tif (!confirm(\"Are you sure you want to clear the drawing?\"))\n\t\treturn;\n\n\tcontext.clearRect(0, 0, context.canvas.width, context.canvas.height);\n\tclickX = new Array();\n\tclickY = new Array();\n\tclickDrag = new Array();\n\tclickColor = new Array();\n}", "clearCanvas(){\n this.canvas.width = this.canvas.width;\n }", "clear() {\n this.getContext().clearRect(0, 0, this.width, this.height);\n }", "function clear(ctx) {\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n}", "function ClearCanvas()\n{\n AddStatus(\"Entering ClearCanvas\");\n try\n {\n // Store the current transformation matrix\n ctx.save();\n\n // Use the identity matrix while clearing the canvas\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0,0, canvas.width, canvas.height);\n \n // Restore the transform\n ctx.restore();\n }\n catch(err)\n {\n AddStatus(err.message,true);\n }\n AddStatus(\"Exiting ClearCanvas\");\n}", "clearCanvas() {\n this.effacerButton.addEventListener('click', (e) => {\n e.preventDefault();\n this.validerButton.style.display = 'none';\n //0 = décalage gauche Canvas, 0 = décalage Top idem, width && height du rectangle a effacer\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n });\n }", "function updateCanvas() {\n ctx.clearRect(0, 0, 430, 430);\n fillCanvas();\n }", "function clearCanvas() {\n d3.select(\"#canvas\").selectAll(\"*\").remove();\n}", "function clearArea() {\r\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\r\n}", "clearObj() {\n let ctx = this.objCanvas.getContext(\"2d\");\n ctx.clearRect(0, 0, this.objCanvas.width, this.objCanvas.height);\n }", "function clear() {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n }", "function cleanCV(){\n const context = myCanvas.getContext('2d');\n context.clearRect(0, 0, myCanvas.width, myCanvas.height);\n}", "function clearCanvas(canvas, ctx){\n\t\tvar canvas = canvas || M.theCanvas[0];\n\t\tvar ctx = ctx || M.ctx;\n\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\t}", "clearAll() {\n const {width, height} = this.canvas\n this.ctx.clearRect(0, 0, width, height)\n this.ctx.fillStyle = this.proxy.bg_color\n this.ctx.fillRect(0, 0, width, height)\n this.lines.clearAll()\n }", "function clearCanvas() {\n var canvas = document.getElementById(\"canvas\");\n if (canvas.getContext) {\n var ctx = canvas.getContext(\"2d\");\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n }\n}", "function draw() { \n\n\tctx.clearRect(0,0,canvas.width, canvas.height); \n\t\n}", "clean() {\n const height = this.ctx.canvas.height;\n const width = this.ctx.canvas.width;\n // Origin is at the center, so start painting from bottom left.\n this.ctx.clearRect(width * -1 / 2, height * -1 / 2, width, height);\n }", "function clearCanvas(c,_c){ \n c.clearRect(0, 0, _c.width, _c.height);\n }" ]
[ "0.8589131", "0.8467042", "0.8408486", "0.8390245", "0.8385534", "0.8342247", "0.83386904", "0.83176255", "0.82841426", "0.8277673", "0.827302", "0.82594043", "0.82581776", "0.82549125", "0.8243102", "0.8240989", "0.8237806", "0.82364625", "0.82349086", "0.8230623", "0.82051694", "0.8188021", "0.8185849", "0.8173302", "0.81445974", "0.8143139", "0.8141754", "0.81276536", "0.8125939", "0.81140894", "0.81071246", "0.8106402", "0.81062603", "0.8106057", "0.8104767", "0.81013304", "0.8101315", "0.80973905", "0.80942607", "0.8067383", "0.8060959", "0.8060129", "0.804461", "0.8044091", "0.8032463", "0.80181193", "0.8016945", "0.80090255", "0.8007588", "0.8003315", "0.79915303", "0.79863906", "0.7977111", "0.7955213", "0.7949143", "0.7947726", "0.79421073", "0.79416656", "0.79388666", "0.79388666", "0.7935136", "0.79336005", "0.7923475", "0.79202235", "0.7917386", "0.789189", "0.7886143", "0.78838766", "0.78793", "0.7866618", "0.78268296", "0.78108674", "0.7810632", "0.7810632", "0.7799141", "0.77991086", "0.7792995", "0.7775273", "0.77672625", "0.7757827", "0.77570343", "0.7742108", "0.772054", "0.770664", "0.7696244", "0.7695567", "0.7690959", "0.76907593", "0.7685715", "0.7685426", "0.76810074", "0.76779795", "0.7666727", "0.7663867", "0.7657776", "0.76553744", "0.76551265", "0.7647479", "0.7644587", "0.76431423", "0.764261" ]
0.0
-1
called when it is required to draw the image on the canvas. We have resized the canvas to the same image size so ti is simpler to draw later
function drawImageScaled(img, canvas, ctx) { let scale = Math.min(canvas.width / img.width, canvas.height / img.height); // get the top left position of the image ctx.clearRect(0, 0, canvas.width, canvas.height); let x = (canvas.width / 2) - (img.width / 2) * scale; let y = (canvas.height / 2) - (img.height / 2) * scale; ctx.drawImage(img, x, y, img.width * scale, img.height * scale); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n // clear the canvas\n that.canvas.width = that.canvas.width;\n\n // check if we have a valid image\n if (that.image.width * that.image.height > 0) {\n context.drawImage(that.image, 0, 0, that.width, that.height);\n } else {\n // center the error icon\n context.drawImage(errorIcon.image, (that.width - (that.width / 2)) / 2,\n (that.height - (that.height / 2)) / 2, that.width / 2, that.height / 2);\n that.emit('warning', 'Invalid stream.');\n }\n\n // check for an overlay\n if (overlay) {\n context.drawImage(overlay, 0, 0);\n }\n\n // silly firefox...\n if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\n var aux = that.image.src.split('?killcache=');\n that.image.src = aux[0] + '?killcache=' + Math.random(42);\n }\n }", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "renderImageOld() { // renderImage\r\n var i = this.image.transferToImageBitmap();\r\n this.resizeOffscreenCanvas();\r\n this.ctx.drawImage(i,0,0,this.image.width, this.image.height);\r\n }", "putImage() {\n this.ctx.drawImage(\n this.image,\n this.x - this.size(),\n this.y - this.size(),\n this.size() * 2,\n this.size() * 2\n );\n this.loaded = true;\n }", "function updateImg() {\n context.drawImage($tmpCanvas[0], 0, 0); \n tmpContext.clearRect(0, 0, canvasWidth(), canvasHeight());\n }", "function img_update () {\r\n\t\t\tcontexto.drawImage(canvas, 0, 0);\r\n\t\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\r\n\t\t}", "function img_update () {\n\t\tcontexto.drawImage(canvas, 0, 0);\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n }", "function doneResizing(tempImg) {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n context.drawImage(tempImg, 0, 0);\n}", "drawCanvas(imgData) {\n\t\t// abstract\n\t}", "function imageLoaded() {\n self.framed = self.createFramedImage(self.image, width, height);\n //self.framed = self.image;\n self.object = self.createRendererObject();\n if(self.prepareCallback) {\n self.prepareCallback(true);\n }\n }", "function draw_image( img ) {\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.drawImage(img, 0, 0, canvas.width, canvas.height);\n }", "function loadImageToCanvas(){\n img.onload = function(){\n ctx.drawImage(img, 0,0);\n }\n img.src = imgHolder.src;\n }", "function drawCanvas() {\n\tif (imageId != null) {\n\t\tdrawJointJS(imageId);\n\t\timageId = null;\n\t}\n}", "function initCanvas(onDrawingCallback) {\n let flag = false,\n prevX, prevY, currX, currY = 0;\n let canvasJq = $('#canvas');\n let canvasEle = document.getElementById('canvas');\n let imgEle = document.getElementById('image');\n\n // event on the canvas when the mouse is on it\n canvasJq.on('mousemove mousedown mouseup mouseout', function (e) {\n prevX = currX;\n prevY = currY;\n currX = e.clientX - canvasJq.position().left;\n currY = e.clientY - canvasJq.position().top;\n if (e.type === 'mousedown') {\n flag = true;\n }\n if (e.type === 'mouseup' || e.type === 'mouseout') {\n flag = false;\n }\n // if the flag is up, the movement of the mouse draws on the canvas\n if (e.type === 'mousemove') {\n if (flag) { \n data = { \n canvas: { \n width: canvasEle.width, \n height: canvasEle.height \n }, \n paths: [\n { \n x1: prevX, \n y1: prevY, \n x2: currX, \n y2: currY \n }\n ], \n color: inkColor, \n thickness: thickness \n }\n pushPath(data);\n onDrawingCallback(data);\n }\n }\n });\n\n // Loaded & resize event\n imgEle.addEventListener('load', () => {\n repositionCanvas();\n });\n\n window.addEventListener('resize', () => {\n repositionCanvas();\n });\n\n // If the image has already been loaded.\n if (imgEle.naturalHeight && imgEle.clientWidth > 0) {\n repositionCanvas();\n }\n}", "onImageLoad() {\n this.cacheFrameReady = true;\n this.drawCurrentFrame();\n }", "function drawImageCanvas() {\n // Emulate background-size: cover\n var width = imageCanvas.width;\n var height = imageCanvas.width / image.naturalWidth * image.naturalHeight;\n \n if (height < imageCanvas.height) {\n width = imageCanvas.height / image.naturalHeight * image.naturalWidth;\n height = imageCanvas.height;\n }\n\n imageCanvasContext.clearRect(0, 0, imageCanvas.width, imageCanvas.height);\n imageCanvasContext.globalCompositeOperation = 'source-over';\n imageCanvasContext.drawImage(image, 0, 0, width, height);\n imageCanvasContext.globalCompositeOperation = 'destination-in';\n imageCanvasContext.drawImage(lineCanvas, 0, 0);\n}", "function img_update () {\n\t\tcontexto.drawImage(canvas, 5,5);\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n }", "function img_update () {\n contexto.drawImage(canvas, 0, 0);\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n }", "function onPhotoDataSuccess(imageData){\n\n myImageMiddle.onload = function() {\n\n $scope.scaleImgX = 1;\n $scope.scaleImgY = 1;\n $scope.ResizeValue = 0;\n\n var im_width = myImageMiddle.width;\n var im_height = myImageMiddle.height;\n var ratio = im_width/800;\n var contWidth = 800;\n var contHeight = im_height/ratio;\n\n var container = $('#customContainer');\n $('#customContainer').css({'width':contWidth,'height':contHeight}) // Originally 800 X 535\n //var contWidth = 800;\n //var contHeight = 800*ratio;\n $scope.contRatio = contWidth/contHeight;\n $('#ratio').html($scope.contRatio);\n\n $('#cont').html(contWidth+ ', '+contHeight);\n\n //$scope.scaleImgX = contWidth/myImageMiddle.width;\n //$scope.scaleImgY = contHeight/myImageMiddle.height;\n\n $scope.draw_w = myImageMiddle.width * $scope.scaleImgX;\n $scope.draw_h = myImageMiddle.height * $scope.scaleImgY;\n //alert(\"\"+$scope.draw_w)\n //alert(\"\"+$scope.draw_h)\n\n context.canvas.width = $scope.draw_w;\n context.canvas.height = $scope.draw_h;\n contextMiddle.canvas.width = $scope.draw_w;\n contextMiddle.canvas.height = $scope.draw_h;\n contextTop.canvas.width = $scope.draw_w;\n contextTop.canvas.height = $scope.draw_h;\n\n contextMiddle.drawImage(myImageMiddle, 0, 0, $scope.draw_w, $scope.draw_h);\n setTimeout(function(){ $scope.readJSON();},500);\n\n\n\n resize(0);\n }\n }", "function ev_imageLoaded () {\n // Did the image already load?\n if (imageLoaded) {\n return;\n }\n\n // The default position for the inserted image is the top left corner of the visible area, taking into consideration the zoom level.\n var x = MathRound(gui.elems.viewport.scrollLeft / canvasImage.canvasScale),\n y = MathRound(gui.elems.viewport.scrollTop / canvasImage.canvasScale);\n\n context.clearRect(0, 0, canvasImage.width, canvasImage.height);\n\n try {\n context.drawImage(imageElement, x, y);\n } catch (err) {\n alert(lang.errorInsertimg);\n return;\n }\n\n imageLoaded = true;\n needsRedraw = false;\n\n if (!timer) {\n timer = setInterval(_self.draw, config.toolDrawDelay);\n }\n\n gui.statusShow('insertimgLoaded');\n }", "function reDraw(){\n if(canvas != undefined){ //si le canvas existe\n setUpCanvas(); // redimensionne le canvas\n drawDataURIOnCanvas(sourceCanvas[sourceCanvas.length-1]); // redessine le canvas avec la taille redimensionnée\n }\n}", "updateDrawing(context) {\n if(!this.ded){\n context.drawImage(this.img, this.width * this.frameX, this.height * this.frameY, this.width, this.height, this.x, this.y, 50, 50)\n }\n }", "draw() {\n\t\tthis.x--;\n\t\t// Efecto de fondo infinito\n\t\t// Cuando la posicion de x es menor al ancho negatico (cuando la primer imagen sale del canvas, reseteamos x a 0).\n\t\tif (this.x < -this.width) this.x = 0;\n\t\tctx.drawImage(this.image, this.x, this.y, this.width, this.height);\n\t\tctx.drawImage(\n\t\t\tthis.image,\n\t\t\tthis.x + this.width,\n\t\t\tthis.y,\n\t\t\tthis.width,\n\t\t\tthis.height\n\t\t);\n\t}", "function onResize() {\n imageData=context.getImageData(0,0,canvas.width,canvas.height);\n canvas.width = window.innerWidth * 0.6;\n canvas.height = window.innerHeight * 0.8;\n context.putImageData(imageData,0,0);\n\n }", "function redraw_canvas()\n{\n\tif(!needsRedraw)\n\t{\n\t\treturn;\n\t}\n\tneedsRedraw = false;\n\tlet ctx = canvas.getContext('2d');\n\tlet image_data = draw_chunk(cv_viewport);\n\tif(image_data)\n\t{\n\t\tctx.putImageData(image_data, 0, 0);\n\t}\n}", "function resize() {\n let w = canvas.parentElement.offsetWidth\n let h = canvas.parentElement.offsetHeight\n\n \n if (sourceImage) {\n let r = Math.min(w / sourceImage.width, h / sourceImage.height)\n\n canvas.width = sourceImage.width * r\n canvas.height = sourceImage.height * r\n\n ctx.drawImage(sourceImage, 0, 0, canvas.width, canvas.height)\n }\n}", "function drawImage() {\n image(inputImg, 0, 0,SIZE, SIZE);\n}", "drawImage () {\n // Create image object\n var image = new Image()\n // Set image source\n image.src = this.imageSrc\n // Set canvas context as 2d\n var ctx = this.canvas.getContext('2d')\n // Set smooth content = true & hight\n ctx.imageSmoothingEnabled = true\n ctx.imageSmoothingQuality = \"high\"\n // Calculate new width and height, new width = 500px\n var newImgW = 500\n var newImgH = image.height / (image.width/500)\n // Set the new width and height and set to canvas\n this.canvas.width = newImgW\n this.canvas.height = newImgH\n // Draw image to canvas\n ctx.drawImage(image, 0, 0, newImgW, newImgH)\n }", "constructor(canvas) {\n this.ctx = canvas.getContext('2d');\n this.img = new Image(3000, 750);\n this.img.onload = () => { this.loaded = true; };\n this.img.src = backgroundPath;\n this.loaded = false;\n this.imageSize = {\n width: this.img.width,\n height: this.img.height\n };\n console.log(this.imageSize);\n this.canvasSize = {\n width: canvas.width,\n height: canvas.height\n };\n }", "function drawImage() {\n clear();\n ctx.save();\n ctx.scale(currentScale, currentScale);\n ctx.rotate(currentAngle * Math.PI / 180);\n ctx.drawImage(image, -image.width / 2, -image.height / 2);\n ctx.restore();\n }", "drawImageCanvas() {\n // Emulate background-size: cover\n if (this.imageCanvas) {\n var width = this.imageCanvas.width;\n var height = this.imageCanvas.width / this.image.naturalWidth * this.image.naturalHeight;\n \n if (height < this.imageCanvas.height) {\n width = this.imageCanvas.height / this.image.naturalHeight * this.image.naturalWidth;\n height = this.imageCanvas.height;\n }\n \n this.imageCanvasContext.clearRect(0, 0, this.imageCanvas.width, this.imageCanvas.height);\n this.imageCanvasContext.globalCompositeOperation = 'source-over';\n this.imageCanvasContext.drawImage(this.image, 0, 0, width, height);\n this.imageCanvasContext.globalCompositeOperation = 'destination-in';\n this.imageCanvasContext.drawImage(this.lineCanvas, 0, 0);\n }\n }", "function img_update () {\ncontexto.drawImage(canvas, 0, 0);\ncontext.clearRect(0, 0, canvas.width, canvas.height);\n}", "function initCanvas()/*:void*/ {var this$=this;\n var initCanvasRequestNumber/*:int*/ = ++this.initCanvasRequestedCounter$AoGC;\n if (this.canvasMgr$AoGC) {\n // Need to destroy the old manager instance first\n this.canvasMgr$AoGC.destroy();\n }\n\n var blobData/*:Blob*/ = AS3.getBindable(this,\"imageBlobValueExpression\").getValue();\n if (blobData) {\n this.imageDimensionsValueExpression$AoGC.loadValue(function (imageDimensions/*:Object*/)/*:void*/ {\n if (initCanvasRequestNumber === this$.initCanvasRequestedCounter$AoGC) {\n this$.imageWidth$AoGC = imageDimensions['width'];\n this$.imageHeight$AoGC = imageDimensions['height'];\n\n if (this$.imageHeight$AoGC > 0 && this$.imageWidth$AoGC > 0) {\n this$.initCanvasManager$AoGC();\n this$.initMapAreas$AoGC();\n\n // in case of \"revert\", restore the canvas with the same scale and zoom values\n var scale/*:Number*/ = this$.getZoomValueExpression().getValue();\n\n if (scale > 0) {\n this$.getZoomValueExpression().setValue(scale);\n this$.canvasMgr$AoGC.setScale(scale);\n }\n this$.fitToWidth();\n }\n }\n });\n }\n }", "function drawCanvas() {\n if( drawio.loadedIMG != ''){\n drawio.ctx.drawImage(drawio.loadedIMG, 0, 0);\n }\n for( var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n if(drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n }", "_resize() {\n this.width = this._context.canvas.width;\n this.height = this._context.canvas.height;\n this.dirty = true;\n }", "function x() {\n fakecontext.drawImage(canvas, 0, 0);\n $('#can').css('height', Number($('#can').css('height').replace('px', '')) + 20);\n canvas.height += 20;\n context.drawImage(fakecanvas, 0, 0);\n fakecanvas.height += 20;\n }", "function imageDraw(imgData){\r\n\t\r\n\tif(typeof imgData === \"undefined\") {\r\n\t\treturn;\r\n\t}\r\n\tcanvasWidth = imgData.width * zoom/100;\r\n\tcanvasHeight = imgData.height * zoom/100;\r\n\t\r\n\t// new Size of canvas\r\n\tctx.canvas.width = canvasWidth; \r\n\tctx.canvas.height = canvasHeight;\r\n\t\r\n\t// new Position of Canvas\r\n\tvar deltaX = canvasWidth - canvasOldWidth;\r\n\tvar deltaY = canvasHeight - canvasOldHeight;\r\n\tvar canvXString = $('.image_area').children().css('left');\r\n\tvar canvYString = $('.image_area').children().css('top');\r\n\tvar newCanvX = Number( canvXString.substring(0,canvXString.length-2) ) - deltaX/2;\r\n\tvar newCanvY = Number( canvYString.substring(0,canvYString.length-2) ) - deltaY/2;\r\n\t\r\n\t$('.image_area').children().css('left',newCanvX + 'px');\r\n\t$('.image_area').children().css('top',newCanvY + 'px');\r\n\tcanvasOldWidth = canvasWidth;\r\n\tcanvasOldHeight = canvasHeight;\r\n\t\r\n\t// zoom in or out as canvas operation\r\n\tctx.scale(zoom/100, zoom/100);\r\n\tvar newCanvas = $(\"<canvas>\")\r\n\t\t.attr(\"width\", imgData.width)\r\n\t\t.attr(\"height\", imgData.height)[0];\r\n\tnewCanvas.getContext(\"2d\").putImageData(imgData,0,0);\r\n\t\r\n\tctx.drawImage(newCanvas,0,0);\r\n}", "function updateCanvas() { //redraws the image data to fit whatever the current size is\r\n\t\t//////////////////////////////\r\n\t\t//non-white background color//\r\n\t\tthis.ctx.fillStyle = \"#CCE6D0\";\r\n\t\tthis.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\r\n\t\t\r\n\t\t//////////////////////////////////////////////\r\n\t\t//redraw the pixels from the top left corner//\r\n\t\tvar currImageData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);\r\n\t\tvar intendedHeight = this.pixels.length/(4*this.intendedWidth);\r\n\t\tfor (var y = 0; y < intendedHeight; y++) { //for all intended rows\r\n\t\t\tif (y >= this.canvas.height) break;\r\n\t\t\tfor (var x = 0; x < this.intendedWidth; x++) { //and for each intended column\r\n\t\t\t\tif (x >= this.canvas.width) break;\r\n\t\t\t\tvar idxInPixels = 4*(this.intendedWidth*y + x); //idx of this pixel in the pixels array\r\n\t\t\t\tvar idxInCanvas = 4*(this.canvas.width*y + x); //corresponding idx in the canvas, starting at corner (0,0)\r\n\t\t\t\tfor (var c = 0; c < 4; c++) { //and for all three colors, lol c++\r\n\t\t\t\t\tcurrImageData.data[idxInCanvas+c] = this.pixels[idxInPixels+c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.ctx.putImageData(currImageData, 0, 0);\r\n\t}", "refresh() {\n // Canvas width / height we want\n const cw = this._cfg.cw;\n const ch = this._cfg.ch;\n\n if (this._canvasNeedsToUpdate) {\n this._canvasNeedsToUpdate = false;\n\n this._canvas.width = cw;\n this._canvas.height = ch;\n \n // Is this OK?\n this._dw = cw;\n this._dh = ch;\n\n const ctx = this._canvas.getContext(\"2d\");\n\n assert(ctx !== null);\n\n this._ctx = ctx;\n\n for (let i = 0; i < this._imageData.data.length; i += 1) {\n this._imageDataBuffer.data[i] = this._imageData.data[i];\n }\n\n this._imageData = this._ctx.getImageData(0, 0, cw, ch);\n\n this._back_canvas.width = cw;\n this._back_canvas.height = ch;\n\n const back_ctx = this._back_canvas.getContext(\"2d\");\n assert(back_ctx !== null);\n this._back_ctx = back_ctx;\n }\n\n // Move and scale the previous image\n\n this._back_ctx.clearRect(0, 0, cw, ch);\n\n // Draw to back canvas\n this._back_ctx.drawImage(\n this._canvas, \n 0, 0, cw, ch, \n this._dx, this._dy, this._dw, this._dh\n );\n\n // Clear front canvas\n this._ctx.clearRect(0, 0, cw, ch);\n\n // Draw from back canvas to front canvas.\n this._ctx.drawImage(this._back_canvas, 0, 0);\n\n this._imageData = this._ctx.getImageData(0, 0, cw, ch);\n // this.ctx.putImageData(this.imageData, 0, 0);\n\n this._cfg.id = Date.now();\n this.stopCurrentWork();\n this._qtree.free();\n this.makeAllAvailableWorkersWork();\n }", "resizeCanvases() {\n if (this.imageCanvas) {\n this.imageCanvas.width = this.lineCanvas.width = document.body.clientWidth;\n this.imageCanvas.height = this.lineCanvas.height = window.innerHeight;\n }\n }", "function drawImg(img) {\r\n gCtx.drawImage(img, 0, 0, gCanvas.width, gCanvas.height)\r\n}", "draw(ctx) {\n if (!this.deleted) {\n ctx.drawImage(this.image, this.position.x, this.position.y, this.width, this.height);\n }\n }", "draw() {\n\n spiel.ctx.drawImage(this.img, this.posX, this.posY, this.breite, this.height);\n }", "draw() {\n\n spiel.ctx.drawImage(this.img, this.posX, this.posY, this.breite, this.height);\n }", "function onResize() {\r\n var oldCanvas = canvas.toDataURL(\"image\");\r\n var img = new Image();\r\n img.src = oldCanvas;\r\n canvas.width = window.innerWidth;\r\n canvas.height = window.innerHeight * .9;\r\n context.drawImage(img, 0, 0);\r\n}", "function onImage () {\n pieceWidth = Math.floor(img.width / puzzleDifficulty)\n pieceHeight = Math.floor(img.height / puzzleDifficulty)\n puzzleWidth = pieceWidth * puzzleDifficulty\n puzzleHeight = pieceHeight * puzzleDifficulty\n setCanvas()\n initPuzzle()\n}", "function setCanvas(w,h){\n canvas.width = imgHolder.width;\n canvas.height = imgHolder.height;\n\n loadImageToCanvas();\n }", "function fitImageToScreen(){\n \n fitted = !(fitted);\n $('#backgroundlayer').remove();\n \n // redraw\n drawCanvas(g_imgSrc);\n}", "draw() {\n\n const { scaleX, scaleY, ctx } = this.world;\n const w = Math.floor(this.img.width * this.scale);\n const h = Math.floor(this.img.height * this.scale);\n const px = this.position.x * scaleX.toPx;\n const py = this.position.y * scaleY.toPx;\n this.width = w * scaleX.toUnits;\n this.height = h * scaleY.toUnits;\n\n if (!this.loaded || !this.display) return;\n\n // Draw image.\n if (this.rotation !== 0) {\n ctx.save();\n ctx.translate(px, py);\n ctx.rotate(this.rotation);\n ctx.drawImage(this.img, -w * this.pivot.x, -h * this.pivot.y, w, h);\n ctx.restore();\n } else {\n ctx.drawImage(\n this.img,\n px - w * this.pivot.x,\n py - h * this.pivot.y,\n w,\n h\n );\n }\n \n }", "function drawImageActualSize() {\n // use the intrinsic size of image in CSS pixels for the canvas element\n console.log('naturalWidth '+this.naturalWidth+' '+this.width);\n console.log('naturalHeight '+this.naturalHeight+' '+this.height);\n \n canvas.width = this.naturalWidth;\n canvas.height = this.naturalHeight;\n \n \n // will draw the image as 300x227 ignoring the custom size of 60x45\n // given in the constructor\n ctx.drawImage(this, 0, 0);\n \n // To use the custom size we'll have to specify the scale parameters \n // using the element's width and height properties - lets draw one \n // on top in the corner:\n // ctx.drawImage(this, 0, 0, this.width, this.height);\n \n if(cropper){\n cropper.destroy();\n }\n \n cropper = new Cropper(canvas, {\n modal:true,\n background:true,\n zoomable:false,\n viewMode:2,\n crop: function(e) {\n disableButtons(false);\n // console.log(e.detail.x);\n // console.log(e.detail.y);\n // console.log(e.detail.width);\n // console.log(e.detail.height);\n // console.log(e.detail.rotate);\n // console.log(e.detail.scaleX);\n // console.log(e.detail.scaleY);\n }\n });\n }", "function resizeCanvas(canvas, src, _callback) {\r\n\r\n // Dimensions of reszed canvas\r\n var MAX_WIDTH = 20;\r\n var MAX_HEIGHT = 20;\r\n\r\n // Get image of canvas and wait till it loads\r\n var image = new Image();\r\n image.src = src;\r\n image.onload = function () {\r\n console.log(\"1st to execute\");\r\n\r\n // Get new image dimensions \r\n image.width = MAX_WIDTH;\r\n image.height = MAX_HEIGHT;\r\n\r\n // Resize canvas\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n canvas.width = image.width;\r\n canvas.height = image.height;\r\n ctx.drawImage(image, 0, 0, image.width, image.height);\r\n \r\n // Get url of image and return callback\r\n var dataurl = canvas.toDataURL(\"image/png\");\r\n _callback(dataurl);\r\n }\r\n\r\n}", "_drawImage() {\n if (!(this._width > 0 && this._height > 0 && !!this._image)) {\n return\n }\n\n let b = this._getBounds()\n\n this._context.drawImage(\n this._image,\n b.sx,\n b.sy,\n b.sw,\n b.sh,\n b.dx,\n b.dy,\n b.dw,\n b.dh,\n )\n\n this._averageColor = this._calculateAverageColor(this.getImageData())\n }", "function generateAndDrawImage()\n { \n // generate image data from DICOM\n view.generateImageData(imageData); \n // set the image data of the layer\n imageLayer.setImageData(imageData);\n // draw the image\n imageLayer.draw();\n }", "function draw_on_canvas(canvas, image) {\n // Giving canvas the image dimension\n\n var ctx = canvas.getContext('2d');\n // Drawing\n ctx.drawImage(image, 0 ,0,canvas.width,canvas.height);\n }", "draw()\r\n {\r\n this.ctx.save(); // saving the current canvas context\r\n this.ctx.translate(this.position.x, this.position.y); // translating the starting position of the image to the starting position of the line\r\n this.ctx.rotate(this.rotation); // rotating the image by 1 degree (clockwise or anticlockwise) with every key press\r\n this.ctx.drawImage(this.image, 0, 0, this.size.x, this.size.y); // drawing the image - x=0 and y=0 since the ctx.translate command deteremines the starting position\r\n this.ctx.restore(); // restoring the previous canvas context\r\n }", "function resetImage() {\n //load the image in canvas if the image is loaded successfully\n ctx = canvas.getContext(\"2d\");\n angleInDegrees = 0;\n currentScale = 1;\n currentAngle = 0;\n\n //for initial loading\n if (scope.flag) {\n scope.flag = 0;\n ctx.translate(canvas.width / 2, canvas.height / 2);\n drawImage();\n } else {\n ctx.translate(0, 0);\n drawImage();\n }\n }", "drawImage() {\n\tif (this.props.images.length) {\n\t this.props.images[this.state.nextImageIndex].drawImage(this.refs.canvas, this.props.level, this.props.window, this.props.maskColours)\n\t this.state.currImageIndex = this.state.nextImageIndex\n\t}\n }", "function hi_res_draw(img){\n \n\n for(let x = 0; x < 33; x++){\n var c1 = scaleIt(img,0.99999999999999999);\n };\n\n my_canvas.width = c1.width/2;\n my_canvas.height = c1.height/2;\n ctx.drawImage(c1, 0,0, c1.width, c1.height, 0, 0, my_canvas.width, my_canvas.height);\n\n}", "function drawImageScaled(img, canvas, ctx) {\n // get the scale\n let scale = Math.min(canvas.width / img.width, canvas.height / img.height);\n // get the top left position of the image\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n let x = (canvas.width / 2) - (img.width / 2) * scale;\n let y = (canvas.height / 2) - (img.height / 2) * scale;\n ctx.drawImage(img, x, y, img.width * scale, img.height * scale);\n\n\n}", "draw() {\n if (this.imageLoaded && this.coordinatesSet) {\n if (this.currentX != this.toX || this.currentY != this.toY) {\n engine.gfxController.drawSpriteAsset(\n this.img,\n this.currentX,\n this.currentY\n );\n if (!this.isStopped) {\n if (this.currentX != this.toX) {\n this.currentX += this.dx;\n }\n if (this.currentY != this.toY) {\n this.currentY += this.dy;\n }\n }\n } else {\n this.isDoneDrawing = true;\n if (!this.eraseOnDestination) {\n engine.gfxController.drawSpriteAsset(\n this.img,\n this.currentX,\n this.currentY\n );\n }\n }\n }\n }", "function imageLoad(self, e) {\n\tif (e.id > self.lastLoaded && self.config.showLoadedImages) { // to not have a back and forward hickup… but some images will be skipped\n\t\tself.drawImage(e.id);\n\t\tself.lastLoaded = e.id;\n\t}\n\n\tif (typeof self.config.imageLoad === 'function' ) {\n\t\te.sequencer = self;\n\t\tself.config.imageLoad(e);\n\t}\n\n\tif (typeof self.imageLoad === 'function' ) {\n\t\te.sequencer = self;\n\t\tself.imageLoad(e);\n\t}\n\n\t// The canvas size is determined and set from the first image loaded:\n\tif (e.id === 0) {\n\t\tif(self.config.fitFirstImage) {\n\t\t\tself.size(e.img.width, e.img.height);\n\t\t\tself.config.fitFirstImage = false;\n\t\t}\n\t\tself.drawImage(0);\n\t\tself.current = 0; // TODO: could be better\n\t}\n}", "function drawToCanvas( canvas, ctx, img ){\n return new Promise( ( resolve, reject ) => {\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage( img, 0, 0 );\n resolve();\n })\n}", "function redrawImage() {\r\n var frontCtx = frontCanvas[0].getContext(\"2d\"),\r\n w = container.width(),\r\n h = container.height(),\r\n iw = bgCanvas[0].width,\r\n ih = bgCanvas[0].height;\r\n\r\n if(iw === 0) {\r\n setTimeout(redrawImage, 100);\r\n } else {\r\n frontCanvas.attr(\"width\", w);\r\n frontCanvas.attr(\"height\", h);\r\n frontCtx.clearRect(0, 0, w, h);\r\n\r\n var tw = Math.floor(iw*zoomLevel),\r\n th = Math.floor(ih*zoomLevel),\r\n tx = drawingCenter[0] - (tw/2),\r\n ty = drawingCenter[1] - (th/2),\r\n dx = (tw > w) ? (tw - w) : (w - tw),\r\n dy = (th > h) ? (th - h) : (h - th),\r\n centerBounds = [ (w-dx)/2 , (h-dy)/2, (w+dx)/2, (h+dy)/2 ];\r\n\r\n if( drawingCenter[0] < centerBounds[0] || drawingCenter[0] > centerBounds[2]\r\n || drawingCenter[1] < centerBounds[1] || drawingCenter[1] > centerBounds[3] ) {\r\n drawingCenter[0] = Math.min( Math.max(drawingCenter[0], centerBounds[0]), centerBounds[2] );\r\n drawingCenter[1] = Math.min( Math.max(drawingCenter[1], centerBounds[1]), centerBounds[3] );\r\n tx = drawingCenter[0] - (tw/2);\r\n ty = drawingCenter[1] - (th/2);\r\n }\r\n\r\n frontCtx.drawImage(bgCanvas[0],\r\n 0, 0, iw, ih, // Source image [Location,Size]\r\n tx, ty, tw, th); // Traget drawing [Location,Size]\r\n }\r\n }", "drawImage() {\n\n }", "draw() {\n // Displaying the image\n image(experimentImage, 0, 0, width, height);\n }", "function resizeCanvases() {\n imageCanvas.width = lineCanvas.width = window.innerWidth;\n imageCanvas.height = lineCanvas.height = window.innerHeight;\n}", "drawImage(\n sx: number,\n sy: number,\n sWidth: number,\n sHeight: number,\n dx: number,\n dy: number,\n dWidth: number,\n dHeight: number,\n ) {\n drawImage(\n this.context,\n this.image,\n sx,\n sy,\n sWidth,\n sHeight,\n dx,\n dy,\n dWidth,\n dHeight,\n );\n }", "function drawCanvas(src){\n \n // redraw animation\n var redraw = false;\n if(filechanged)\n redraw = true;\n \n\t// check whether backgroundcanvas needs to be redrawn\n if(filechanged || vischanged){\n $('#backgroundlayer').remove();\n } \n\t\n\t// draw input image as background to canvas\n\timageObj = new Image();\n\timageObj.onload = function(){\n \n // get image dimensions\n var imgW = imageObj.width;\n var imgH = imageObj.height;\n \n // if fit to screen is selected\n if(fitted){\n // get scaled canvas size\n var arr = scaleDimensions(imgW, imgH);\t\n imgW = Math.round(arr[0]);\n imgH = Math.round(arr[1]);\n }\n \n $('#demo').height(imgH + 400);\n \n if($('#backgroundlayer').length == 0){\n // create canvas with correct dimensions\n $('#imageDiv').append('<canvas id=\"backgroundlayer\" width=\"' + imgW + '\" height=\"' + imgH + '\" style=\"border:3px solid #000000; z-index:1\"></canvas>');\n var backgroundlayer = document.getElementById(\"backgroundlayer\");\n var ctx1 = backgroundlayer.getContext(\"2d\");\n ctx1.clearRect(0,0, imgW, imgH);\n \n $('#backgroundlayer').css({position: 'absolute'});\n \n // draw image to canvas\n ctx1.drawImage(imageObj, 0, 0, imgW, imgH);\n } \n \n // configure animation\n prepareAnimation(redraw);\n prepareClick();\n \n // call specific draw functions\n var value = $('#visSelect').val();\n \n // handle different visualizations\n if(value == \"gazeplot\"){\n \n // register color picker for connecting lines\n registerColorpicker($('#lineColorpicker'), $('#lineColor'), '#000000');\n \n var e = $('#slider-range').slider(\"values\", 1);\n drawClick(e);\n \n // draw selected interval\n if(vischanged){\n var s = $('#slider-range').slider(\"values\", 0);\n var e = $('#slider-range').slider(\"values\", 1);\n drawGazeplotAnimation(e, s, e, true);\n }\n // draw complete gazepath\n else{ \n drawGazeplot();\n } \n }\n \n if(value == \"heatmap\"){\n \n // register color picker\n registerColorpicker($('#c1Colorpicker'), $('#c1Color'), '#0000ff');\n registerColorpicker($('#c2Colorpicker'), $('#c2Color'), '#00ff00');\n registerColorpicker($('#c3Colorpicker'), $('#c3Color'), '#ff0000');\n \n // place color pickers\n $('#c1Colorpicker').css('margin-top', '30px').css('margin-left', '10px');\n $('#c2Colorpicker').css('margin-top', '30px').css('margin-left', '73px');\n $('#c3Colorpicker').css('margin-top', '30px').css('margin-left', '136px');\n \n // draw selected interval\n if(vischanged){\n var s = $('#slider-range').slider(\"values\", 0);\n var e = $('#slider-range').slider(\"values\", 1);\n drawHeatmapAnimation(e, s, e, true);\n }\n // draw complete heatmap\n else{ \n drawHeatmap();\n }\n }\t\n \n if(value == \"attentionmap\"){\n\n // register cover color picker\n registerColorpicker($('#attColorpicker'), $('#attColor'), '#000000');\n \n // place color picker\n $('#attColorpicker').css('margin-top', '30px').css('margin-left', '10px');\n \n // draw selected interval\n if(vischanged){\n var s = $('#slider-range').slider(\"values\", 0);\n var e = $('#slider-range').slider(\"values\", 1);\n drawAttentionmapAnimation(e, s, e, true);\n }\n // draw complete gazepath\n else{ \n drawAttentionmap();\n }\n }\n \n if(filechanged || vischanged){\n filechanged = false;\n vischanged = false;\n }\n \n }; \n // set image source\n\timageObj.src = 'data/' + src; \n}", "function draw(ctx, img) {\n // Check that the image is loaded before writing. Keep\n // checking every 50 milliseconds.\n if (!img.complete) {\n setTimeout( function() {\n draw(ctx, img);\n }, 50);\n }\n\n // Clear the current image and draw the new.\n ctx.clearRect(0,0, 300,300);\n ctx.drawImage(img, 0,0, 300,300);\n}", "_resize() {\n this.aspect = this._context.canvas.width / this._context.canvas.height;\n this.dirty = true;\n }", "function _adjustCanvasFidelity() {\n\t\t\tcanvas.style.width = canvas.width + \"px\";\n\t\t\tcanvas.style.height = canvas.height + \"px\";\n\t\t\tcanvas.width *= pixelRatio;\n\t\t\tcanvas.height *= pixelRatio;\n\t\t}", "function doneDrawing() {\n canImage.context.drawImage(imgArray[imgNumber], 50, 50)\n canImage.changeOpacity(0.3);\n canDraw.overlay(canOverlay);\n canOverlay.changeOpacity(0.5);\n}", "function resize_canvas() {\n\t\t\tcanvas_elem.width = window.innerWidth / 2;\n\t\t\tcanvas_elem.height = window.innerWidth / 2;\n\n\t\t\tupdate_needed = true;\n\t\t}", "function img_update (canvasId) {\n\t\tvar canvas = tempCanvasList[canvasId];\n\t\tvar contexto = canvasContextList[canvasId];\n\t\tcontexto.drawImage(canvas, 0, 0);\n\t\tvar context = tempCanvasContextList[canvasId];\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n }", "function resetImage() {\n originalImage.drawTo(canvas);\n}", "render () {\n ctx.drawImage(Resources.get(this.image), this.x, this.y);\n }", "$_rescaleCanvas () {\n const { width, scrollWidth, height, scrollHeight } = this.canvas; \n if (Math.round(width) !== Math.round(scrollWidth) || Math.round(height) !== Math.round(scrollHeight)) {\n this.canvas.width = this.canvas.scrollWidth; // width = internal coordinate system 1:1, scrollWidth = external dimension\n this.canvas.height = this.canvas.scrollHeight;\n // Note: for the time being the scrollHeights and scrollWidths seem to be synced\n // TODO: find a way for CSS to naturally sync both canvas' scrollHeight and scrollWidth (this will currently be different)\n this.bgCanvas.height = this.bgCanvas.scrollHeight;\n this.bgCanvas.width = this.bgCanvas.scrollWidth;\n\n this.$_renderBackground(this.imageBlobUrl);\n return true\n }\n return false\n }", "function startLoadImage() {\n\n if ($(\"#image-zoom\").css(\"display\") == \"none\") {\n $(\"#image-zoom\").show();\n canvas.width = angular.element('#image-zoom').width();\n }\n //check the image load\n angular.element('#image').on('load', resetImage())\n\n //if the image is not loaded \n .on('error', function() {\n //hide the canvas\n angular.element('#canvas').hide();\n\n //disable the buttons\n scope.noImage = true;\n\n //display the image not loaded text\n angular.element('#error-message').show();\n console.log(\"error loading image\");\n });\n }", "function resize() {\n\t\t\tcanvas.width = container.offsetWidth;\n\t\t\tcanvas.height = container.offsetHeight;\n\t\t}", "function reloadImg() {\n img1 = new Image();\n img1.onload = function () {\n \n\n //draw background image\n ctx.drawImage(img1, 0, 0);\n //draw a box over the top\n imgH = img1.height;\n imgW = img1.width;\n console.log(\"image loaded\");\n drawSquare();\n }\n\n\n img1.src = 'imgs/carriage_toilet.png';\n \n }", "updateCanvasSize() {\n this.drawLines();\n }", "function draw(data)\n\t{\n\t let scale = 0.2\n\t let img = new Image;\n\t img.onload = function(){\n\t\tcontext.drawImage(img, data.posx - (this.width * scale/2)\n\t\t\t\t , data.posy - (this.height * scale/2),\n\t\t\t\t this.width * scale, this.height *\n\t\t\t\t scale);\n\t };\n\t img.src = data.img;\n\n\t}", "function onloadCallback(current_image) {\n\t\t//set the image as the background image of the canvas wrapper\n\t\t$('#canvas-wrapper').css('background', 'url(' + current_image.path +') no-repeat center center fixed').css('background-size', 'contain');\n\t}", "render() {\n ctx.drawImage(Resources.get(this.image), this.x, this.y);\n }", "onLayout() {\n super.onLayout()\n\n // Update canvas size\n var density = window.devicePixelRatio || 1\n var box = this.canvas.getBoundingClientRect()\n this.canvas.width = box.width * density\n this.canvas.height = box.height * density\n\n }", "function render_user_interface()\n{\n mycanvas_context.drawImage(m_canvas, 0, 0);\n}", "draw(ctx, xPos, yPos, scale) {\n ctx.drawImage(\n this.img,\n this.x,\n this.y,\n this.width,\n this.height,\n xPos,\n yPos, // x, y, width and height of img to draw\n this.width * scale,\n this.height * scale\n );\n }", "function draw(image, thecanvas) {\n\n var context = thecanvas.getContext('2d');\n\n context.drawImage(image, 0, 0, thecanvas.width, thecanvas.height);\n }", "function drawToCanvas(pic_src) {\n isVideo = false;\n image.onload = function() {\n if(image.width > image.height) {\n Draw.horizontalPicture(context, canvas, image)\n }\n else {\n Draw.verticalPicture(context, canvas, image);\n }\n };\n image.src = \"data:image/jpeg;base64,\" + pic_src;\n }", "function updateCanvas() {\n c.putImageData(canvasData, 0, 0);\n}", "draw()\n {\n Renderer.drawImage(this.tex.texture, this.tex.width, this.tex.height, 0, 0, this.tex.width, this.tex.height, this.x, this.y, this.width, this.height);\n }", "function drawToCanvas(pic_src) {\n isVideo = false;\n image.onload = function () {\n if (image.width > image.height) {\n Draw.horizontalPicture(context, canvas, image)\n }\n else {\n Draw.verticalPicture(context, canvas, image);\n }\n };\n image.src = \"data:image/jpeg;base64,\" + pic_src;\n }", "function drawToCanvas(pic_src) {\n isVideo = false;\n image.onload = function () {\n if (image.width > image.height) {\n Draw.horizontalPicture(context, canvas, image)\n }\n else {\n Draw.verticalPicture(context, canvas, image);\n }\n };\n image.src = \"data:image/jpeg;base64,\" + pic_src;\n }", "function initCanvas() {\n let posX = 0\n\n // Flip image\n ctx.save()\n if (Math.random() >= 0.5) {\n ctx.scale(-1, 1)\n posX = -img.width\n }\n\n ctx.drawImage(img, posX, 0, img.width, img.height); //clears the canvas\n ctx.restore()\n\n ctx.font = fontSize + 'px ' + fontName;\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"top\";\n }", "function renderCanvas() {\n\n // Handle curr meme img\n const currMeme = getCurrMemeInfo('img');\n const memeImg = new Image();\n memeImg.src = currMeme.url;\n const memeImgWidth = memeImg.width * resizer;\n const memeImgHeight = memeImg.height * resizer;\n\n // Draw curr meme img to canvas (than handle lines)\n memeImg.addEventListener('load', () => {\n gCtx.drawImage(memeImg, 0, 0, memeImgWidth, memeImgHeight);\n\n // Handle curr meme lines\n let memeLines = getMemeLinesById(gCurrMeme);\n\n if (memeLines.length) {\n memeLines = memeLines[0].lines\n memeLines.forEach((line) => {\n drawLine(line.txt, line.font, line.stroke, line.pos);\n })\n }\n\n }, false);\n\n}", "drawCanvas() {\n\n\t}", "render() {\n ctx.drawImage(Resources.get(this.image), this.x, this.y)\n }", "draw() {\n let anchorWidth = -this.width * this.anchor.x;\n let anchorHeight = -this.height * this.anchor.y;\n\n this.context.save();\n this.context.translate(this.x, this.y);\n\n if (this.rotation) {\n this.context.rotate(this.rotation);\n }\n\n if (this.image) {\n this.context.drawImage(\n this.image,\n 0, 0, this.image.width, this.image.height,\n anchorWidth, anchorHeight, this.width, this.height\n );\n }\n else if (this.currentAnimation) {\n this.currentAnimation.render({\n x: anchorWidth,\n y: anchorHeight,\n width: this.width,\n height: this.height,\n context: this.context\n });\n }\n else {\n this.context.fillStyle = this.color;\n this.context.fillRect(anchorWidth, anchorHeight, this.width, this.height);\n }\n\n this.context.restore();\n }", "resizeCanvas () {\n if (this._type === Sandpit.CANVAS && window.devicePixelRatio !== 1 && this._retina) {\n this._handleRetina()\n } else {\n this._canvas.width = this._canvas.clientWidth\n this._canvas.height = this._canvas.clientHeight\n }\n if (this._type === Sandpit.WEBGL || this._type === Sandpit.EXPERIMENTAL_WEBGL) {\n this._context.viewport(0, 0, this._context.drawingBufferWidth, this._context.drawingBufferHeight)\n }\n if (this.change) this.change()\n }" ]
[ "0.73235726", "0.7072685", "0.7072685", "0.70359516", "0.6964817", "0.69553554", "0.68891704", "0.6887662", "0.68747216", "0.68745345", "0.6860673", "0.68423545", "0.6841353", "0.68366957", "0.6824188", "0.6823579", "0.68141407", "0.6803383", "0.6793603", "0.6778748", "0.6775261", "0.67292887", "0.670966", "0.667221", "0.66398233", "0.6638162", "0.6606683", "0.65885687", "0.65768886", "0.65728205", "0.6569731", "0.65647256", "0.65581316", "0.6545906", "0.6542955", "0.6518302", "0.65178585", "0.6506893", "0.6506763", "0.650531", "0.6497263", "0.64951724", "0.648648", "0.6418739", "0.6418739", "0.6391252", "0.6382989", "0.63740194", "0.63651615", "0.6362983", "0.63410467", "0.63387996", "0.6338697", "0.6299828", "0.6293604", "0.6269678", "0.6251253", "0.6246875", "0.62439674", "0.6241876", "0.6225698", "0.62248254", "0.6219095", "0.6205527", "0.6197291", "0.61926097", "0.6178603", "0.61635005", "0.61576325", "0.61458015", "0.6140911", "0.61396915", "0.6124907", "0.61223763", "0.612106", "0.61151683", "0.6098886", "0.6097071", "0.6069677", "0.6069179", "0.60657614", "0.60628736", "0.606171", "0.6061681", "0.6060929", "0.60598373", "0.60587674", "0.6034155", "0.60334206", "0.6031049", "0.60294896", "0.6029482", "0.60254335", "0.60254335", "0.60235876", "0.6005127", "0.60041416", "0.60024434", "0.60008705", "0.6000273" ]
0.61690885
67
this is called when we want to display what we (or any other connected via socket.io) draws on the canvas note that as the remote provider can have a different canvas size (e.g. their browser window is larger) we have to know what their canvas size is so to map the coordinates
async function drawOnCanvas(image, ctx, canvasWidth, canvasHeight, prevX, prevY, currX, currY, color, thickness, dashed=false) { //get the ration between the current canvas and the one it has been used to draw on the other computer let ratioX= cvx.width/canvasWidth; let ratioY= cvx.height/canvasHeight; // update the value of the points to draw prevX*=ratioX; prevY*=ratioY; currX*=ratioX; currY*=ratioY; if (dashed) { ctx.setLineDash([10,5]); } //draws path ctx.beginPath(); ctx.moveTo(prevX, prevY); ctx.lineTo(currX, currY); ctx.strokeStyle = color; ctx.lineWidth = thickness; ctx.stroke(); ctx.closePath(); //Stores annotation data in idb let data = [canvasWidth, canvasHeight, prevX, prevY, currX, currY, color, thickness]; await storeOther('annotations', data, image, roomNo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas()\n {\n if (drawing)\n {\n context.moveTo(lastPos.x, lastPos.y);\n context.lineTo(mousePos.x, mousePos.y);\n context.stroke();\n lastPos = mousePos;\n }\n }", "function drawCanvas() {\n\t\tdrawer.drawWallGrid(context, solver.gridWall, solver.xLength, solver.yLength, selectedSpacesGrid); \n\t\tdrawInsideSpaces(context, drawer, colourSet, solver, purificator, selectedSpacesGrid);\n\t\tdrawer.drawSudokuFrames(context, solver, mouseCoorsItem); \n\t\tsolver.callStateForItem(spanState);\n\t}", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function resizeCanvas() { // always keep canvas full size (for now)\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n var message = canvasSize + canvas.width + ',' + canvas.height;\n socket.emit('canvasEvent', message); \n if (debug(1)) { console.log(\"[INFO] Canvas size: \" + canvas.width + \" x \" + canvas.height); }\n message = null;\n}", "updateCanvasSize() {\n this.drawLines();\n }", "function ev_canvas (ev) {\n if (ev.layerX || ev.layerX == 0) { // Firefox\n ev._x = ev.layerX;\n ev._y = ev.layerY;\n } else if (ev.offsetX || ev.offsetX == 0) { // Opera\n ev._x = ev.offsetX;\n ev._y = ev.offsetY;\n }\n\n\tvar data = [ev.type, ev._x, ev._y];\n\tvar dataStr = JSON.stringify(data);\n\tws.send(dataStr);\n }", "fitCanvasToScreen() {\n this.canvas.width = window.innerWidth;\n this.canvas.height = window.innerHeight;\n this._rect = this.canvas.getBoundingClientRect(); // Update\n }", "drawCanvas() {\n\n\t}", "function initCanvas(sckt, imageUrl) {\n room=roomNo;\n socket = sckt;\n let flag = false,\n prevX, prevY, currX, currY = 0;\n let canvas = $('#canvas');\n let cvx = document.getElementById('canvas');\n let img = document.getElementById('image');\n let ctx = cvx.getContext('2d');\n img.src = imageUrl;\n\n // event on the canvas when the mouse is on it\n canvas.on('mousemove mousedown mouseup mouseout', function (e) {\n prevX = currX;\n prevY = currY;\n currX = e.clientX - canvas.position().left;\n currY = e.clientY - canvas.position().top;\n if (e.type === 'mousedown') {\n flag = true;\n }\n if (e.type === 'mouseup' || e.type === 'mouseout') {\n flag = false;\n }\n // if the flag is up, the movement of the mouse draws on the canvas\n if (e.type === 'mousemove') {\n if (flag) {\n drawOnCanvas(ctx, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness);\n chat.emit('drawCanvas', room, userId, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness)\n // @todo if you draw on the canvas, you may want to let everyone know via socket.io (socket.emit...) by sending them\n // room, userId, canvas.width, canvas.height, prevX, prevY, currX, currY, color, thickness\n }\n }\n });\n\n // this is code left in case you need to provide a button clearing the canvas (it is suggested that you implement it)\n $(\"#canvas-clear\").on(\"click\", function (e) {\n let c_width = canvas.width;\n let c_height = canvas.height;\n ctx.clearRect(0, 0, c_width, c_height);\n chat.emit('Clear',room,userId,c_width,c_height);\n // @todo if you clear the canvas, you want to let everyone know via socket.io (socket.emit...)\n\n });\n\n\n chat.on('Canvas',function (userId, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness) {\n let ctx = canvas[0].getContext('2d');\n drawOnCanvas(ctx, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness)\n\n });\n\n\n chat.on('clear',function (userId,cw,ch) {\n\n ctx.clearRect(0, 0, cw,ch);\n\n });\n // @todo here you want to capture the event on the socket when someone else is drawing on their canvas (socket.on...)\n\n // I suggest that you receive userId, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness\n // and then you call\n // let ctx = canvas[0].getContext('2d');\n // drawOnCanvas(ctx, canvasWidth, canvasHeight, x1, y21, x2, y2, color, thickness)\n\n // this is called when the src of the image is loaded\n // this is an async operation as it may take time\n img.addEventListener('load', () => {\n\n // it takes time before the image size is computed and made available\n // here we wait until the height is set, then we resize the canvas based on the size of the image\n let poll = setInterval(function () {\n if (img.naturalHeight) {\n clearInterval(poll);\n // resize the canvas\n let ratioX=1;\n let ratioY=1;\n // if the screen is smaller than the img size we have to reduce the image to fit\n if (img.clientWidth>window.innerWidth)\n ratioX=window.innerWidth/img.clientWidth;\n if (img.clientHeight> window.innerHeight)\n ratioY= img.clientHeight/window.innerHeight;\n let ratio= Math.min(ratioX, ratioY);\n // resize the canvas to fit the screen and the image\n cvx.width = canvas.width = img.clientWidth*ratio;\n cvx.height = canvas.height = img.clientHeight*ratio;\n // draw the image onto the canvas\n drawImageScaled(img, cvx, ctx);\n // hide the image element as it is not needed\n img.style.display = 'none';\n }\n }, 10);\n });\n}", "function drawCanvas() {\n if( drawio.loadedIMG != ''){\n drawio.ctx.drawImage(drawio.loadedIMG, 0, 0);\n }\n for( var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n if(drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n }", "paintCanvas() {\n // Draw the tile map\n this.game.map.drawMap();\n\n // Draw dropped items\n this.game.map.drawItems();\n\n // Draw the NPCs\n this.game.map.drawNPCs();\n\n // Draw the player\n this.game.map.drawPlayer();\n\n // Draw the mouse selection\n this.game.map.drawMouse();\n }", "draw(ctx){\n saveMatrix();\n ctx.save();\n translate(0,0);\n\n if (this.extended) {\n this.dockPointsReq.forEach((value) => {\n value.draw(ctx);\n });\n this.dockPointsDev.forEach((value) => {\n value.draw(ctx);\n });\n }\n\n ctx.strokeRect(this.x,this.y+this.margin_top,this.width,this.height);\n restoreMatrix();\n ctx.restore();\n }", "function renderCanvas() {\n\n // Handle curr meme img\n const currMeme = getCurrMemeInfo('img');\n const memeImg = new Image();\n memeImg.src = currMeme.url;\n const memeImgWidth = memeImg.width * resizer;\n const memeImgHeight = memeImg.height * resizer;\n\n // Draw curr meme img to canvas (than handle lines)\n memeImg.addEventListener('load', () => {\n gCtx.drawImage(memeImg, 0, 0, memeImgWidth, memeImgHeight);\n\n // Handle curr meme lines\n let memeLines = getMemeLinesById(gCurrMeme);\n\n if (memeLines.length) {\n memeLines = memeLines[0].lines\n memeLines.forEach((line) => {\n drawLine(line.txt, line.font, line.stroke, line.pos);\n })\n }\n\n }, false);\n\n}", "function drawCanvas() {\n var canvas = $('#MapCanvas');\n var ctx = canvas.get(0).getContext('2d');\n\n // Draw the map image on canvas\n ctx.drawImage(mMapImage, 0, 0);\n\n // Draw multi-colored circle overlays.\n for (var i in mSensors) {\n var sensor = mSensors[i];\n var color = getSensorColor(sensor);\n var arrowColor = getArrowColor(sensor);\n drawCircle(ctx, sensor.x, sensor.y, mSensorCircleSize, color);\n drawArrow(ctx, sensor.x, sensor.y, arrowColor)\n }\n }", "onConnect() {\n if (this.startCoord)\n this.handler.coord.copy(this.startCoord);\n else {\n let ssCoord = Handler.ScreenSizeCoord;\n let width = (this.sizer.width) ? this.sizer.width : Math.round(ssCoord.width / 3);\n let height = (this.sizer.height) ? this.sizer.height : Math.round(ssCoord.height / 3);\n let x = Math.round((ssCoord.width - width) / 2);\n let y = Math.round((ssCoord.height - height) / 2);\n this.coord.assign(x, y, width, height, 0, 0, ssCoord.width, ssCoord.height);\n }\n }", "render() {\n this.canvas.height = this.canvas.clientHeight;\n this.canvas.width = this.canvas.clientWidth;\n\n window.addEventListener('resize', this.render)\n }", "function renderCanvas() {\n if (drawing) {\n ctx.beginPath();\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.closePath();\n ctx.stroke();\n\n lastPos = mousePos;\n }\n}", "function draw(newx, newy, oldx, oldy) {\n ctx.strokeStyle = color;\n ctx.lineWidth = drawsize;\n ctx.beginPath();\n ctx.moveTo(oldx, oldy);\n ctx.lineTo(newx, newy);\n ctx.stroke();\n ctx.closePath();\n\n socket.emit('store canvas', canvas.toDataURL());\n}", "renderCanvas() {\n /**\n * @type {p5.Vector} mouse\n */\n let mouse = this.p.createVector(this.p.mouseX - this.position.x, this.p.mouseY - this.position.y);\n mouse.x = Math.floor(mouse.x / this.cellSize) * this.cellSize;\n mouse.y = Math.floor(mouse.y / this.cellSize) * this.cellSize;\n\n this.canvas.image(this.gridCanvas, 0, 0);\n this.canvas.fill(255, 120, 0, 120);\n this.canvas.rect(mouse.x, mouse.y, this.cellSize, this.cellSize);\n\n this.canvasUpdateRequired = false;\n }", "function setUpCanvas() {\n /* clearing up the screen */\n clear();\n /* Set display size (vw/vh). */\n var sizeWidth = (80 * window.innerWidth) / 100,\n sizeHeight = window.innerHeight;\n //Setting the canvas site and width to be responsive\n upperLayer.width = sizeWidth;\n upperLayer.height = sizeHeight;\n upperLayer.style.width = sizeWidth;\n upperLayer.style.height = sizeHeight;\n lowerLayer.width = sizeWidth;\n lowerLayer.height = sizeHeight;\n lowerLayer.style.width = sizeWidth;\n lowerLayer.style.height = sizeHeight;\n rect = upperLayer.getBoundingClientRect();\n}", "drawCanvas() {\n //TODO find better version of how to structure so that the margin can be programmatically set\n this.ctx.clearRect(0, 0, this.can.width, this.can.height)\n this.invisictx.clearRect(0, 0, this.can.width, this.can.height)\n // remove previous tooltips\n while (this.infoHolder.firstChild) {\n this.infoHolder.removeChild(this.infoHolder.firstChild)\n }\n let red = {\n r: 227, g: 74, b: 51\n }\n let gray = {\n r: 254, g: 232, b: 200\n }\n let blue = {\n r: 67, g: 162, b: 202\n }\n // iterate over the boundary data\n for (let region of this.paneOb.sliceData.features) {\n // this is the object that has features, and properties\n for (let coords of region.geometry.coordinates) {\n this.ctx.lineWidth = 2\n this.ctx.beginPath()\n this.invisictx.beginPath()\n // create simplified variable with points and region name\n let linedata = { points: coords, region: region.properties.regionName }\n\n // begin actual drawing to the canvas\n let first = linedata.points[0]\n let x = this.xinterp.calc(first[0])\n let y = this.yinterp.calc(first[1])\n this.ctx.moveTo(x, y)\n this.invisictx.moveTo(x, y)\n for (let i = 1; i < linedata.points.length; i++) {\n let pt = linedata.points[i]\n let x = this.xinterp.calc(pt[0])\n let y = this.yinterp.calc(pt[1])\n this.ctx.lineTo(x, y)\n this.invisictx.lineTo(x, y)\n }\n this.ctx.closePath()\n this.invisictx.closePath()\n // check if its a roilisted\n if (this.paneOb.rois[linedata.region]) {\n if (this.paneOb.rois[linedata.region]) {\n this.ctx.strokeStyle = \"black\"\n this.ctx.lineWidth = 5\n this.ctx.stroke()\n }\n // add tooltips that are visible\n let regId = linedata.region.replace(/[-_]/g, \"\")\n // if we don't find the element must make the tooltip, make search specific to pane\n if (!this.paneOb.paneDiv.querySelector(`#tooltip${regId}`)) {\n this.tooltipMaker(linedata.region, this.paneOb.rois[linedata.region])\n }\n }\n\n // default stroke gray, update if nec\n this.ctx.strokeStyle = \"gray\"\n this.ctx.stroke()\n // these aren't defined yet\n if (this.regNameToValueMap != undefined) {\n if (this.regNameToValueMap[linedata.region]) {\n let scanData = this.regNameToValueMap[linedata.region].value\n let lerpc\n if (scanData < 0) {\n // use the blue to gray instead of gray to red\n let t = this.colInterpolator.calc(scanData)\n lerpc = LerpCol( t)\n } else {\n let t = this.colInterpolator.calc(scanData)\n lerpc = LerpCol( t)\n }\n this.ctx.fillStyle = lerpc\n this.ctx.fill()\n // query the region to color map\n }\n }\n this.invisictx.fillStyle = `rgb(${this.regToColMap[linedata.region][0]},${this.regToColMap[linedata.region][1]},${this.regToColMap[linedata.region][2]})`\n this.invisictx.fill()\n }\n }\n if (this.scanDatamin != undefined && this.scanDatamax != undefined) {\n // setup a legend in the corner\n let gradient = this.ctx.createLinearGradient(0, 0, 0, this.can.height / 4)\n // color stop for rgb\n if (this.scanDatamin < 0 && this.scanDatamax > 0) {\n gradient.addColorStop(1, `rgb(${blue.r},${blue.g},${blue.b})`)\n gradient.addColorStop(.5, `rgb(${gray.r},${gray.g},${gray.b})`)\n gradient.addColorStop(0, `rgb(${red.r},${red.g},${red.b})`)\n } else if (this.scanDatamax > 0) {\n gradient.addColorStop(1.0, `rgb(255,255,178)`)\n gradient.addColorStop(0.75, `rgb(254,204,92)`)\n gradient.addColorStop(0.5, `rgb(253,141,60)`)\n gradient.addColorStop(0.25, `rgb(240,59,32)`)\n gradient.addColorStop(.0, `rgb(189,0,38)`)\n } else {\n // this is the case of blue only\n console.log(this.scanDatamax, \"max\", this.scanDatamin, \"min\")\n gradient.addColorStop(0, `rgb(${gray.r},${gray.g},${gray.b})`)\n gradient.addColorStop(1, `rgb(${blue.r},${blue.g},${blue.b})`)\n }\n let gradientWidth = 10\n this.ctx.fillStyle = gradient\n let startx = this.can.width - this.margin - gradientWidth\n let endx = this.can.width - this.margin * 2\n this.ctx.fillRect(startx, 0, endx, this.can.height / 4)\n // add numeric values to the gradient\n // measure the text so it sits right next to the gradient\n this.ctx.font = \"15px Arial\"\n let minmeasure = this.ctx.measureText(this.scanDatamin).width\n let maxmeasure = this.ctx.measureText(this.scanDatamax).width\n this.ctx.fillStyle = \"black\"\n // the -5 is a spacer for the text next to the gradient bar\n this.ctx.fillText(this.scanDatamin, startx - minmeasure - 5, this.can.height / 4)\n this.ctx.fillText(this.scanDatamax, startx - maxmeasure - 5, 15)\n }\n }", "draw() {\n\t\tlet width = 30;\n\n\t\tinfo.context.beginPath();\n\t\tinfo.context.rect(this.position.x - width/2, this.position.y - width/2, width, width);\n\t\tinfo.context.fillStyle = this.color;\n\t\tinfo.context.fill();\n\t}", "onLayout() {\n super.onLayout()\n\n // Update canvas size\n var density = window.devicePixelRatio || 1\n var box = this.canvas.getBoundingClientRect()\n this.canvas.width = box.width * density\n this.canvas.height = box.height * density\n\n }", "updateGeometry() {\n this.cols = this.engine.getCols();\n this.rows = this.engine.getRows();\n let maxWidth = displayContainer.clientWidth;\n let maxHeight = displayContainer.clientHeight;\n console.log(\"maxWidth: \" + maxWidth + \"maxHeight\" + maxHeight);\n let displayAspectRatio = this.cols / this.rows;\n let containerAspectRatio = maxWidth / maxHeight;\n if (displayAspectRatio > containerAspectRatio) { \n this.canvas.width = maxWidth;\n this.canvas.height = (this.rows / this.cols)* maxWidth;\n this.cellSize = this.canvas.width / this.cols;\n } else {\n this.canvas.height = maxHeight;\n this.canvas.width = (this.cols / this.rows) * maxHeight;\n this.cellSize = this.canvas.height / this.rows;\n }\n this.top = this.canvas.offsetTop;\n this.left = this.canvas.offsetLeft;\n }", "function drawCanvas() {\n\t\tdrawing(context, drawer, colours, solver, selectedSpacesGrid);\n\t\tsolver.callStateForItem(spanState);\n\t}", "draw() {\n\t\tlet width = 30;\n\n\t\tinfo.context.beginPath();\n\t\tinfo.context.moveTo(this.position.x - width/2, this.position.y + width/2);\n\t\tinfo.context.lineTo(this.position.x + width/2, this.position.y + width/2);\n\t\tinfo.context.lineTo(this.position.x, this.position.y - width/2);\n\t\tinfo.context.closePath();\n\t\tinfo.context.fillStyle = this.color;\n\t\tinfo.context.fill();\n\t}", "render() {\n render(offscreenCanvas);\n }", "draw() {\n // We use the south-west and north-east\n // coordinates of the overlay to peg it to the correct position and size.\n // To do this, we need to retrieve the projection from the overlay.\n const overlayProjection = this.getProjection();\n // Retrieve the south-west and north-east coordinates of this overlay\n // in LatLngs and convert them to pixel coordinates.\n // We'll use these coordinates to resize the div.\n const sw = overlayProjection.fromLatLngToDivPixel(\n this.bounds_.getSouthWest(),\n );\n const ne = overlayProjection.fromLatLngToDivPixel(\n this.bounds_.getNorthEast(),\n );\n\n // Resize the image's div to fit the indicated dimensions.\n if (this.div_) {\n this.div_.style.left = sw.x + \"px\";\n this.div_.style.top = ne.y + \"px\";\n this.div_.style.width = ne.x - sw.x + \"px\";\n this.div_.style.height = sw.y - ne.y + \"px\";\n }\n }", "function draw() {\n var data={\n pX :prevX, \n pY :prevY , \n cX :currX , \n cY :currY , \n xi :x , \n yi :y\n }\nctx.beginPath();\nctx.moveTo(prevX, prevY);\nctx.lineTo(currX, currY);\nctx.strokeStyle = x;\nctx.lineWidth = y;\nctx.stroke();\nctx.closePath();\nsocket.emit(\"drawn\", data); //Send everyone in room the data and tell them to draw what who drew\n}", "drawCanvas(imgData) {\n\t\t// abstract\n\t}", "function drawAll() {\n\tdrawBackground();\n\tdrawMarkers();\n\tpanForTranslation();\n\tblob.show();\n\n\tfor (var i = 0; i < playerData.length; i++) {\n\t\tif (playerData[i].id !== socket.id) {\n\t\t\tcanvasContext.fillStyle = 'white';\n\t\t\tcanvasContext.beginPath();\n\t\t\tcanvasContext.arc(playerData[i].xPos, playerData[i].yPos, 10, 0,Math.PI*2, true);\n\t\t\tcanvasContext.fill();\n\t\t}\n\t}\n}", "function drawCanvas() {\n\t\tdraw(context, drawer, colours, solver);\n\t\tsolver.callStateForItem(spanState);\n\t}", "render() {\n //draw the board\n this.ctx.fillStyle = '#FD8844';\n this.ctx.fillRect(0, 0, this.ctx.canvas.clientWidth, this.ctx.canvas.clientHeight);\n\n //draw the line\n this.ctx.beginPath();\n this.ctx.moveTo(this.ctx.canvas.clientWidth/2, 0);\n this.ctx.lineTo(this.ctx.canvas.clientWidth/2, this.ctx.canvas.clientHeight);\n this.ctx.strokeStyle = 'white';\n this.ctx.stroke();\n }", "_render() {\n\t\tif (this.ctx) {\n\t\t\tthis.ctx.fillStyle = this._settings.append_to.css('color');\n\t\t\tthis.ctx.beginPath();\n\t\t\tthis.ctx.arc(this.coordinates.x, this.coordinates.y, this.size, 0, 2 * Math.PI);\n\t\t\tthis.ctx.closePath();\n\t\t\tthis.ctx.fill()\n\t\t} else if (this.$element) {\n\t\t\t// TODO: look into rendering to a canvas\n\t\t\tthis.$element.css({\n\t\t\t\t'top': 0,\n\t\t\t\t'left': 0,\n\t\t\t\t'transform': 'translate(' + (this.coordinates.x - (this.height / 2)) + 'px, ' + (this.coordinates.y - (this.width / 2)) + 'px)',\n\t\t\t\t'width': this.width + 'px',\n\t\t\t\t'height': this.height + 'px'\n\t\t\t});\n\t\t\t\n\t\t}\n\t}", "function formatDisplay() {\n\t\t\theight_ratio = client_height / game.stage_height;\n\t\t\twidth_ratio = client_width / game.stage_width;\n\n\t\t\tif (height_ratio < width_ratio) {\n\t\t\t\tsize_ratio = height_ratio;\n\t\t\t\tdisplay.canvas.height = game.stage_height * size_ratio;\n\t\t\t\tdisplay.canvas.width = game.stage_width * size_ratio;\n\t\t\t\tdisplay.canvas.style.left = Math.floor((client_width - display.canvas.width) * 0.5) + \"px\";\n\t\t\t\tdisplay.canvas.style.top = \"0px\";\n\t\t\t} else {\n\t\t\t\tsize_ratio = width_ratio;\n\t\t\t\tdisplay.canvas.height = game.stage_height * size_ratio;\n\t\t\t\tdisplay.canvas.width = game.stage_width * size_ratio;\n\t\t\t\tdisplay.canvas.style.left = \"0px\";\n\t\t\t\tdisplay.canvas.style.top = Math.floor((client_height - display.canvas.height) * 0.5) + \"px\";\n\t\t\t}\n\n\t\t\tdisplay_left = parseInt(display.canvas.style.left);\n\t\t\tdisplay_top = parseInt(display.canvas.style.top);\n\n\t\t\tbuffer.canvas.height = game.stage_height;\n\t\t\tbuffer.canvas.width = game.stage_width;\n\t\t}", "function webSocketMessageHandler(data) {\n switch (data.type) {\n case \"COORDINATE\":\n clX = data.x * canvasWidth;\n clY = data.y * canvasHeight;\n console.log(\"X:\", clX, \", Y:\", clY);\n break;\n case \"GESTURE\":\n break;\n }\n}", "draw() {\n this.setSize();\n this.setSizeBounds();\n this.move();\n this.coordinates = getPlaneCoordinates(this);\n this.gridCoordinates = getGridCoordinates(this);\n }", "function drawCanvas() {\n\tif (imageId != null) {\n\t\tdrawJointJS(imageId);\n\t\timageId = null;\n\t}\n}", "show(){\r\n let x = this.col * this.size / this.cols\r\n let y = this.row * this.size / this.rows\r\n\r\n ctx.strokeStyle = \"black\"\r\n ctx.fillStyle = \"white\"\r\n ctx.lineWidth = 2\r\n\r\n if(this.walls.top) this.drawTopWall(x,y)\r\n if(this.walls.bottom) this.drawBtmWall(x,y)\r\n if(this.walls.right) this.drawRightWall(x,y)\r\n if(this.walls.left) this.drawLeftWall(x,y)\r\n\r\n if(this.has_visited){\r\n ctx.fillRect(x+1,y+1,this.size/this.cols - 2, this.size/this.rows - 2)\r\n }\r\n }", "renderedCallback() {\n if(this.testDriveType==='C')\n {\n this.canvas = this.template.querySelector('[data-id=\"can\"]');\n this.ratio = Math.max(window.devicePixelRatio || 1, 1);\n this.w = this.canvas.width * this.ratio;\n this.h = this.canvas.height * this.ratio;\n \n //For desktop mouse move events\n this.canvas.addEventListener('mousemove', this.handlemouseMove.bind(this));\n this.canvas.addEventListener('mousedown', this.handlemousedown.bind(this));\n this.canvas.addEventListener('mouseup', this.handlemouseup.bind(this));\n this.canvas.addEventListener('mouseout', this.handlemouseout.bind(this));\n \n // Set up touch events for mobile, etc\n this.canvas.addEventListener('touchstart', this.handletouchstart.bind(this));\n this.canvas.addEventListener('touchend', this.handletouchend.bind(this));\n this.canvas.addEventListener('touchmove', this.handletouchmove.bind(this));\n }\n \n }", "function render_user_interface()\n{\n mycanvas_context.drawImage(m_canvas, 0, 0);\n}", "draw () {\n const ctx = this.ctx;\n\n ctx.fillStyle = '#ffffff';\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n\n matrix.mat2d.multiply(this._drawProjection, this._scaleMatrix, this._projection);\n\n this._drawThese(this._drawList, this._drawProjection, {\n framebufferWidth: ctx.canvas.width,\n framebufferHeight: ctx.canvas.height\n });\n\n if (this._snapshotCallbacks.length > 0) {\n const snapshot = this.canvas.toDataURL();\n this._snapshotCallbacks.forEach(cb => cb(snapshot));\n this._snapshotCallbacks = [];\n }\n }", "findxy(res, e) \n {\n let offLeft = 0, offTop = 0, el = this.canvas.current;\n while(el)\n {\n offLeft += el.offsetLeft;\n offTop += el.offsetTop;\n el = el.offsetParent;\n }\n let scaleWidth = this.canvas.current.clientWidth, scaleHeight = this.canvas.current.clientHeight;\n let actualWidth = this.canvas.current.width, actualHeight = this.canvas.current.height;\n if (res === 'down') {\n this.setState({prevX: this.state.currX,\n prevY: this.state.currY, \n currX: (e.clientX - offLeft + document.documentElement.scrollLeft)*actualWidth/scaleWidth, //Scaling the co-ordinates \n currY: (e.clientY - offTop + document.documentElement.scrollTop)*actualHeight/scaleHeight, // of mouse pointer.\n flag: true\n });\n this.state.ctx.beginPath(); \n this.state.ctx.strokeStyle = this.state.x;\n this.state.ctx.lineWidth = this.state.y-1;\n this.state.ctx.rect(this.state.currX, this.state.currY, this.state.y-1, this.state.y-1);\n this.state.ctx.stroke();\n }\n if (res === 'up' || res === \"out\"){\n this.setState({flag: false});\n }\n if (res === 'move') {\n if (this.state.flag) {\n this.setState({prevX: this.state.currX, \n prevY: this.state.currY, \n currX: (e.clientX - offLeft + document.documentElement.scrollLeft)*actualWidth/scaleWidth,\n currY: (e.clientY - offTop + document.documentElement.scrollTop)*actualHeight/scaleHeight,\n });\n this.draw();\n }\n }\n }", "renderRoute() {\n\n // Save route to shorter var.\n const route = this.props.route;\n\n const xCoordRange = route.bounds.upper[0] - route.bounds.lower[0]; // The range of x values\n const yCoordRange = route.bounds.upper[1] - route.bounds.lower[1]; // The range of y values\n\n let canvasRatio = xCoordRange / yCoordRange;\n canvasRatio = canvasRatio < 10 ? canvasRatio : 10; // Limit ratio to 10:1\n\n // Use multiple canvas layers so that they can be rendered separately\n const layers = {\n startPoint : {\n canvas : this.refs.startPoint,\n ctx : this.refs.startPoint.getContext('2d')\n },\n path : {\n canvas : this.refs.path,\n ctx : this.refs.path.getContext('2d')\n },\n billboards : {\n canvas : this.refs.billboards,\n ctx : this.refs.billboards.getContext('2d')\n },\n pathOptimized : {\n canvas : this.refs.pathOptimized,\n ctx : this.refs.pathOptimized.getContext('2d')\n },\n billboardsOptimized : {\n canvas : this.refs.billboardsOptimized,\n ctx : this.refs.billboardsOptimized.getContext('2d')\n }\n };\n\n // Calculate width/height based on canvas ratio\n const canvasWidth = 960;\n const canvasHeight = 960 / canvasRatio;\n\n // Set heights and widths of layers and contexts\n // Also clears canvases\n layers.path.canvas.width = canvasWidth;\n layers.path.canvas.height = canvasHeight;\n layers.billboards.canvas.width = canvasWidth;\n layers.billboards.canvas.height = canvasHeight;\n layers.pathOptimized.canvas.width = canvasWidth;\n layers.pathOptimized.canvas.height = canvasHeight;\n layers.billboardsOptimized.canvas.width = canvasWidth;\n layers.billboardsOptimized.canvas.height = canvasHeight;\n layers.startPoint.canvas.width = canvasWidth;\n layers.startPoint.canvas.height = canvasHeight;\n\n\n // Save x and y bounds separately for utility\n const xbounds = [route.bounds.lower[0], route.bounds.upper[0]];\n const ybounds = [route.bounds.lower[1], route.bounds.upper[1]];\n\n if(!this.state.showingOptimized) {\n this.renderPath(layers.path.ctx, route.path, 0.2, xbounds, ybounds, canvasHeight, canvasWidth);\n this.renderBillboards(layers.billboards.ctx, route.billboards, xbounds, ybounds, canvasHeight, canvasWidth);\n } else {\n if(route.optimizedPath) {\n this.renderPath(layers.pathOptimized.ctx, route.optimizedPath, 0.6, xbounds, ybounds, canvasHeight, canvasWidth);\n this.renderBillboards(layers.billboardsOptimized.ctx, route.optimizedPath.map(\n point => ({coord : point, photoCount : 1})\n ), xbounds, ybounds, canvasHeight, canvasWidth);\n }\n }\n\n\n\n\n // render the starting point\n const startX = this.normaliseCoordinates(0, xbounds, canvasWidth);\n const startY = this.normaliseCoordinates(0, ybounds, canvasHeight);\n\n layers.startPoint.ctx.beginPath();\n layers.startPoint.ctx.arc(startX, startY, 4, 0, Math.PI * 2, false);\n layers.startPoint.ctx.fillStyle = 'rgb(0, 167, 255)';\n layers.startPoint.ctx.fill();\n layers.startPoint.ctx.closePath();\n\n }", "function draw()\n {\n var ctx = $(\"map-overview\").getContext('2d');\n \n var halfWidthMap = overviewImage.width/2;\n var halfHeightMap = overviewImage.height/2;\n\n // mapping between 1 px and 1 'world unit'\n // the following values come from \"cl_leveloverview\"\n var posX = -overviewInfo[\"pos_x\"];\n var posY = overviewInfo[\"pos_y\"];\n \n var x_unit_to_pixel = (halfWidthMap/posX);\n var y_unit_to_pixel = (halfHeightMap/posY);\n \n ctx.clearRect(0,0, overviewImage.width, overviewImage.height);\n ctx.drawImage(overviewImage, 0, 0);\n \n ctx.save();\n \n // move the drawing cursor to the center of the image\n ctx.translate(halfWidthMap, halfHeightMap);\n \n for (var i = 0, len = interpolatedPlayers.length; i < len; i++)\n {\n var iplayer = interpolatedPlayers[i];\n \n ctx.save();\n \n // Position\n ctx.translate(iplayer[\"iposx\"]*x_unit_to_pixel, -iplayer[\"iposy\"]*y_unit_to_pixel);\n\n // Team\n switch (iplayer[\"player\"][\"teamNumber\"])\n {\n case 0:\n ctx.strokeStyle = ctx.fillStyle = \"red\";\n break;\n case 1:\n ctx.strokeStyle = ctx.fillStyle = \"blue\";\n break;\n default:\n ctx.strokeStyle = ctx.fillStyle = \"yellow\";\n break;\n }\n \n // Name\n ctx.font = \"7pt Arial\";\n var str = iplayer[\"player\"][\"name\"];\n var strSize = ctx.measureText(str);\n ctx.fillText(str, -Math.round(strSize.width)/2, -10);\n \n // Rotation\n ctx.rotate(-iplayer[\"iyaw\"] * (Math.PI/180));\n \n // Circle + direction drawing\n ctx.beginPath();\n var wCursor = 3;\n ctx.lineTo(-wCursor, 0);\n ctx.lineTo(wCursor*2, 0);\n ctx.arc(0, 0, wCursor, 0, Math.PI*2);\n ctx.stroke(); // or fill();\n ctx.closePath();\n \n // \"Look at\" drawing\n //ctx.translate(-sight.width/2, -sight.height/2);\n //ctx.drawImage(sight, 0, 0);\n //ctx.drawImage(cursor, 0, 0);\n \n ctx.restore();\n }\n ctx.restore();\n }", "draw() {\n const divPosition =\n this.getProjection().fromLatLngToDivPixel(this.position);\n if (isMarker(this.mapFeature)) {\n // Give the Marker room to be visible.\n divPosition.y -= 40;\n }\n checkPresent(this.containerDiv, 'not present when drawing');\n this.containerDiv.style.left = divPosition.x + 'px';\n this.containerDiv.style.top = divPosition.y + 'px';\n }", "draw(display, ratio) {\n //check if we are already resized (prevents infinite growth/shrinkage)\n if(this.selected && !display || !this.selected && display) {\n this.resize();\n } \n\n ctx.beginPath();\n ctx.fillStyle = this.colour;\n ctx.fillRect(this.x, this.y, this.width, this.height); //draw the background of the graph\n // ctx.fillStyle = \"white\";\n // ctx.fillRect(this.x + this.padding, this.y + this.padding, this.width - this.padding * 2, this.height - this.padding * 2);\n\n this.drawPoints(this.width);\n\n //if the display flag is set - we should draw the selection\n if(display)\n this.drawSelection(ratio);\n }", "function drawScreen() {\n try {\n var rect = canvas.getBoundingClientRect();\n var err = Math.abs(canvas.width - rect.width);\n if (err > 2) {\n canvas.width = rect.width;\n canvas.height = rect.height;\n var sc = canvas.width / idealWidth;\n var sc2 = canvas.height / idealHeight;\n canvasScale = Math.min(sc, sc2);\n }\n\n checkInput();\n updateAnims();\n\n var ctx = canvas.getContext('2d');\n ctx.save();\n canvasXoff = canvas.width - idealWidth * canvasScale;\n //ctx.translate(canvasXoff/2-10,0);\n ctx.scale(canvasScale, canvasScale);\n clearScreen(ctx);\n drawGrid(grid, ctx);\n drawOverlayText(ctx);\n ctx.restore();\n } catch(ex) {\n console.log(ex);\n }\n requestAnimationFrame(drawScreen);\n}", "resizeCanvas () {\n if (this._type === Sandpit.CANVAS && window.devicePixelRatio !== 1 && this._retina) {\n this._handleRetina()\n } else {\n this._canvas.width = this._canvas.clientWidth\n this._canvas.height = this._canvas.clientHeight\n }\n if (this._type === Sandpit.WEBGL || this._type === Sandpit.EXPERIMENTAL_WEBGL) {\n this._context.viewport(0, 0, this._context.drawingBufferWidth, this._context.drawingBufferHeight)\n }\n if (this.change) this.change()\n }", "drawOnscreen(ctx) {\n this.drawOffscreen();\n ctx.drawImage(this.offCanvas, this.adjustedX, this.adjustedY);\n }", "resizeCanvas() {\n this.canvas.width = window.innerWidth;\n this.canvas.height = window.innerHeight;\n this.cx = this.ctx.canvas.width / 2;\n this.cy = this.ctx.canvas.height / 2;\n }", "initializeCanvas(){\n\t\tconsole.log(`======] Init Canvas [======`, this.state);\n\n\t\tif(this.state.device.width && this.state.device.height){\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.canvas.id = 'screen-canvas';\n\t\t\tthis.canvas.width = this.state.device.width/2;\n\t\t\tthis.canvas.height = this.state.device.height/2;\n\t\t\tthis.canvas.style = 'margin: 50px; border: 1px solid black; cursor: pointer;';\n\t\t\tthis.canvas.onmouseover = this.cursorOver.bind(this);\n\t\t\tthis.canvas.onmouseout = this.cursorOut.bind(this);\n\t\t\tthis.canvas.onmousedown = this.interactStart.bind(this);\n\t\t\tthis.canvas.onmousemove = this.interactMove.bind(this);\n\t\t\tthis.canvas.onmouseup = this.interactEnd.bind(this);\n\t\t\tthis.canvas.onmousewheel = this.mouseWheel.bind(this);\n\t\t\tdocument.body.onkeydown = this.keyDown.bind(this);\n\t\t\tdocument.body.onkeyup = this.keyUp.bind(this);\n\n\t\t\tdocument.getElementById('screen-container').appendChild(this.canvas)\n\t\t\tthis.ctx = this.canvas.getContext('2d');\n\t\t}else{\n\t\t\talert(`Device resolution failed to be detected`);\n\t\t}\n\t}", "draw() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // display problem\n this.drawProblem()\n // display input field\n if (this.input) {\n this.input._value = ''\n }\n \n this.drawInputField()\n\n // draw attacks\n this.attacks.draw(this.ctx, this.attackIndex)\n\n // draw player data\n this.player.drawPlayerData(this.ctx)\n // draw computer data\n this.computer.drawComputerData(this.ctx)\n \n }", "renderPoints(wL,wH,hL,hH,kPoints) {\n\t\t// abstract\n\t}", "function respondCanvas() { \n var container = $($canvas).parent();\n\n $canvas.attr('width', $(container).width() ); //max width\n $canvas.attr('height', $(container).height() ); //max height\n\n $tmpCanvas.attr('width', $(container).width() ); //max width\n $tmpCanvas.attr('height', $(container).height() ); //max height\n }", "onResize() {\n this._canvas.width = window.innerWidth;\n this._canvas.height = window.innerHeight;\n this._ps.screenSize(this._canvas.width, this._canvas.height)\n }", "function drawViewWindow(currentPlayer) {\n if(typeof currentPlayer !== 'undefined') {\n var topLeftX = zoom(currentPlayer.x) - (CANVAS_WIDTH/8);\n var topLeftY = zoom(currentPlayer.y) - (CANVAS_HEIGHT/8);\n if (topLeftX < 0) { topLeftX = 0; }\n if (topLeftY < 0) { topLeftY = 0; }\n if (topLeftX + 600 > zoom(CANVAS_WIDTH)) { topLeftX = zoom(CANVAS_WIDTH) - 600; }\n if (topLeftY + 600 > zoom(CANVAS_HEIGHT)) { topLeftY = zoom(CANVAS_HEIGHT) - 600; }\n ctx.drawImage(renderingCanvas, topLeftX, topLeftY, 600, 600, 0, 0, 600, 600);\n }\n}", "function sizeCanvas() {\n var ratio = mMapHeight / mMapWidth;\n var width = window.innerWidth;\n var height = width * ratio;\n var canvas = $('#MapCanvas');\n canvas.css('width', width + 'px');\n canvas.css('height', height + 'px');\n\n document.getElementById(\"Instructions\").style.top = height + titleHeight - 8 + \"px\";\n\n // Save scale value for use with touch events.\n mCanvasScale = mMapWidth / width\n }", "function setCanvasSize() {\n\t\t// Get the screen height and width\n\t\tscreenHeight = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;\n\t\tscreenWidth = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;\n\t\t// Figure out which one is smaller\n\t\tminScreenSide = ( screenWidth < screenHeight ) ? screenWidth : screenHeight;\n\t\t// Figure out if the timer is at its max size\n\t\tif ( (minScreenSide + 2*timerPadding ) > maxTimerSide ) {\n\t\t\tcanvasSide = maxTimerSide - 2*timerPadding;\n\t\t} else {\n\t\t\tcanvasSide = minScreenSide;\n\t\t}\n\t\tcanvas.height = canvasSide;\n\t\tcanvas.width = canvasSide;\n\t\t//logDimensions();\n\t}", "function setCanvasSize() {\n\t\t// Get the screen height and width\n\t\tscreenHeight = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;\n\t\tscreenWidth = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;\n\t\t// Figure out which one is smaller\n\t\tminScreenSide = ( screenWidth < screenHeight ) ? screenWidth : screenHeight;\n\t\t// Figure out if the timer is at its max size\n\t\tif ( (minScreenSide + 2*timerPadding ) > maxTimerSide ) {\n\t\t\tcanvasSide = maxTimerSide - 2*timerPadding;\n\t\t} else {\n\t\t\tcanvasSide = minScreenSide;\n\t\t}\n\t\tcanvas.height = canvasSide;\n\t\tcanvas.width = canvasSide;\n\t\t//logDimensions();\n\t}", "function setCanvasSize() {\n var width = $('#coloring').width();\n var height = $('#coloring').height();\n\n $('#coloring_canvas').attr('width', width);\n $('#coloring_canvas').attr('height', height);\n context.lineWidth = radius * 2;\n }", "function updateWinCanvasDivs() {\n\tcanvasDivWidth.innerHTML = canvasObj.canvasWidth\n\tcanvasDivHeight.innerHTML = canvasObj.canvasHeight\n\twindowDivWidth.innerHTML = winObj.windowWidth\n\twindowDivHeight.innerHTML = winObj.windowHeight\n}", "RenderInit() {\n this.canvas.width = this.size;\n this.canvas.height = this.size;\n this.context = this.canvas.getContext(\"2d\");\n this.buffer = this.size / this.gamestate.layout.length;\n this.draw();\n this.drawKey();\n this.drawExit();\n this.drawPlayers();\n this.drawAdversaries();\n }", "show(canvas, callback) {\n iSend.onclick = callback;\n iImg.src = canvas.toDataURL();\n orderFrame.style.zIndex = 1000;\n orderFrame.style.width = '100%';\n orderFrame.style.height = '100%';\n }", "render() {\n this.context.drawImage(this.buffer.canvas,\n 0, 0,\n this.buffer.canvas.width,\n this.buffer.canvas.height,\n 0, 0,\n this.context.canvas.width,\n this.context.canvas.height);\n }", "createCanvas(){\n this.myCanvasHolder = document.querySelector(\".myPaint\");\n this.width = this.myCanvasHolder.width = document.querySelector(\".content\").offsetWidth;\n this.height = this.myCanvasHolder.height = window.innerHeight*0.9;\n this.ctx = this.myCanvasHolder.getContext(\"2d\");\n this.ctx.width = this.width;\n this.ctx.height = this.height;\n this.isDrawing = false;\n }", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "draw()\r\n {\r\n this.ctx.drawImage(this.image, this.position.x, this.position.y, this.size, this.size);\r\n }", "function update_map_canvas(canvas_x, canvas_y, width, height)\n{\n var gui_x0, gui_y0;\n var full = true;\n\n gui_x0 = mapview['gui_x0'] + canvas_x;\n gui_y0 = mapview['gui_y0'] + canvas_y;\n\n /* Clear the area, if the mapview extends beyond map borders. \n *\n * This is necessary since some parts of the rectangle\n * may not actually have any tiles drawn on them. This will happen when\n * the mapview is large enough so that the tile is visible in multiple\n * locations. In this case it will only be drawn in one place.\n *\n * Of course it's necessary to draw to the whole area to cover up any old\n * drawing that was done there. */\n r = base_canvas_to_map_pos(0, 0);\n s = base_canvas_to_map_pos(mapview['width'], 0);\n t = base_canvas_to_map_pos(0, mapview['height']);\n u = base_canvas_to_map_pos(mapview['width'], mapview['height']);\n if ( r['map_x'] < 0 || r['map_x'] > map['xsize'] || r['map_y'] < 0 || r['map_y'] > map['ysize']\n\t || s['map_x'] < 0 || s['map_x'] > map['xsize'] || s['map_y'] < 0 || s['map_y'] > map['ysize']\n\t || t['map_x'] < 0 || t['map_x'] > map['xsize'] || t['map_y'] < 0 || t['map_y'] > map['ysize']\n\t || u['map_x'] < 0 || u['map_x'] > map['xsize'] || u['map_y'] < 0 || u['map_y'] > map['ysize']) {\n canvas_put_rectangle(mapview_canvas_ctx, \"rgb(0,0,0)\", canvas_x, canvas_y, width, height);\n }\n \n // mapview_layer_iterate\n for (var layer = 0; layer < LAYER_COUNT; layer++) {\n \n //gui_rect_iterate begin \n var gui_x_0 = (gui_x0);\n var gui_y_0 = (gui_y0); \n var gui_x_w = width + (tileset_tile_width >> 1);\n var gui_y_h = height + (tileset_tile_height >> 1);\n if (gui_x_w < 0) { \n gui_x_0 += gui_x_w; \n gui_x_w = -gui_x_w; \n } \n \n if (gui_y_h < 0) { \n gui_y_0 += gui_y_h; \n gui_y_h = -gui_y_h; \n } \n \n if (gui_x_w > 0 && gui_y_h > 0) { \n var ptilepedge = {}; \n var ptilepcorner = {}; \n var ptile_xi, ptile_yi, ptile_si, ptile_di; \n var gui_x, gui_y; \n var ptile_r1 = 2;\n var ptile_r2 = ptile_r1 * 2; \n var ptile_w = tileset_tile_width; \n var ptile_h = tileset_tile_height; \n var ptile_x0 = Math.floor(( (gui_x_0 * ptile_r2) / (ptile_w) - (( (gui_x_0 * ptile_r2) < 0 && (gui_x_0 * ptile_r2) % (ptile_w) < 0 ) ? 1 : 0) ) - ptile_r1 / 2);\n var ptile_y0 = Math.floor(( (gui_y_0 * ptile_r2) / (ptile_h) - (( (gui_y_0 * ptile_r2) < 0 && (gui_y_0 * ptile_r2) % (ptile_h) < 0 ) ? 1 : 0) ) - ptile_r1 / 2); \n var ptile_x1 = Math.floor(( ((gui_x_0 + gui_x_w) * ptile_r2 + ptile_w - 1) / (ptile_w) - (( ((gui_x_0 + gui_x_w) * ptile_r2 + ptile_w - 1) < 0 \n && ((gui_x_0 + gui_x_w) * ptile_r2 + ptile_w - 1) % (ptile_w) < 0 ) ? 1 : 0) ) + ptile_r1);\n var ptile_y1 = Math.floor(( ((gui_y_0 + gui_y_h) * ptile_r2 + ptile_h - 1) / (ptile_h) - (( ((gui_y_0 + gui_y_h) * ptile_r2 + ptile_h - 1) < 0 \n && ((gui_y_0 + gui_y_h) * ptile_r2 + ptile_h - 1) % (ptile_h) < 0 ) ? 1 : 0) ) + ptile_r1); \n var ptile_count = (ptile_x1 - ptile_x0) * (ptile_y1 - ptile_y0);\n \n for (var ptile_index = 0; ptile_index < ptile_count; ptile_index++) { \n var ptile = null; \n var pedge = null; \n var pcorner = null; \n ptile_xi = ptile_x0 + (ptile_index % (ptile_x1 - ptile_x0)); \n ptile_yi = Math.floor(ptile_y0 + (ptile_index / (ptile_x1 - ptile_x0)));\n ptile_si = ptile_xi + ptile_yi; \n ptile_di = ptile_yi - ptile_xi;\n if (2 == ptile_r1 ) { \n if ((ptile_xi + ptile_yi) % 2 != 0) { \n continue; \n } \n if (ptile_xi % 2 == 0 && ptile_yi % 2 == 0) { \n if ((ptile_xi + ptile_yi) % 4 == 0) { \n /* Tile */\n ptile = map_pos_to_tile((ptile_si >> 2) - 1, (ptile_di >> 2));\n } else { \n /* Corner */\n pcorner = ptilepcorner;\n pcorner['tile'] = []; \n pcorner['tile'][0] = map_pos_to_tile(((ptile_si - 6) >> 2), ((ptile_di - 2) >> 2)); \n pcorner['tile'][1] = map_pos_to_tile(((ptile_si - 2) >> 2), ((ptile_di - 2) >> 2)); \n pcorner['tile'][2] = map_pos_to_tile(((ptile_si - 2) >> 2), ((ptile_di + 2) >> 2)); \n pcorner['tile'][3] = map_pos_to_tile(((ptile_si - 6) >> 2), ((ptile_di + 2) >> 2)); \n } \n } else { \n /* Edge. */\n pedge = ptilepedge; \n if (ptile_si % 4 == 0) { \n pedge['type'] = EDGE_NS;\n pedge['tile'] = [];\n pedge['tile'][0] = map_pos_to_tile(((ptile_si - 4) >> 2), ((ptile_di - 2) >> 2)); \n pedge['tile'][1] = map_pos_to_tile(((ptile_si - 4) >> 2), ((ptile_di + 2) >> 2));\n } else { \n pedge['type'] = EDGE_WE;\n pedge['tile'] = [];\n pedge['tile'][0] = map_pos_to_tile(((ptile_si - 6) >> 2), (ptile_di >> 2)); \n pedge['tile'][1] = map_pos_to_tile(((ptile_si - 2) >> 2), (ptile_di >> 2));\n } \n } \n } else { \n if (ptile_si % 2 == 0) { \n if (ptile_xi % 2 == 0) { \n /* Corner */\n pcorner = ptilepcorner;\n pcorner['tile'] = []; \n pcorner['tile'][0] = map_pos_to_tile((ptile_xi >> 1) - 1, (ptile_yi >> 1) - 1); \n pcorner['tile'][1] = map_pos_to_tile((ptile_xi >> 1), (ptile_yi >> 1) - 1); \n pcorner['tile'][2] = map_pos_to_tile((ptile_xi >> 1), (ptile_yi >> 1));\n pcorner['tile'][3] = map_pos_to_tile((ptile_xi >> 1) - 1, (ptile_yi >> 1));\n } else { \n /* Tile */\n ptile = map_pos_to_tile(((ptile_xi - 1) >> 1), ((ptile_yi - 1) >> 1)); \n } \n } else {\n /* Edge */ \n pedge = ptilepedge; \n if (ptile_yi % 2 == 0) { \n pedge['type'] = EDGE_NS;\n pedge['tile'] = [];\n pedge['tile'][0] = map_pos_to_tile(((ptile_xi - 1) >> 1), ((ptile_yi >> 1) - 1));\n pedge['tile'][1] = map_pos_to_tile(((ptile_xi - 1) >> 1), (ptile_yi >> 1));\n } else { \n pedge['type'] = EDGE_WE; \n pedge['tile'] = [];\n pedge['tile'][0] = map_pos_to_tile(((ptile_xi >> 1) - 1), ((ptile_yi - 1) >> 1)); \n pedge['tile'][1] = map_pos_to_tile((ptile_xi >> 1), ((ptile_yi - 1) >> 1));\n } \n } \n } \n\n gui_x = Math.floor(ptile_xi * ptile_w / ptile_r2 - ptile_w / 2); \n gui_y = Math.floor(ptile_yi * ptile_h / ptile_r2 - ptile_h / 2);\n \n { // gui_rect_iterate begin_end\n\n var cx = gui_x - mapview['gui_x0'];\n var cy = gui_y - mapview['gui_y0'];\n\n\n if (ptile != null) {\n put_one_tile(mapview_canvas_ctx, layer, ptile, cx, cy, null);\n \n } else if (pedge != null) {\n put_one_element(mapview_canvas_ctx, layer, null, pedge, null,\n null, null, cx, cy, null);\n } else if (pcorner != null) {\n put_one_element(mapview_canvas_ctx, layer, null, null, pcorner,\n null, null, cx, cy, null);\n } else {\n /* This can happen, for instance for unreal tiles. */\n }\n }\n } \n } \n }\n \n}", "function cw_drawScreen() {\n ctx.clearRect(0,0,canvas.width,canvas.height);\n ctx.save();\n ctx.translate(400, 200);\n ctx.scale(1.5*zoom, -zoom);\n cw_drawFloor(floorBody);\n //cw_drawFloor(boxBody);\n cw_drawCar(carBody);\n ctx.restore();\n}", "draw(canvas, rect, viewId, elementId, elementType, widgetTime, stateTime, mode, attributes) {\n\n canvas.imageSmoothingEnabled=true;\n\n if (elementType == \"background\") {\n\n this.drawBackground(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n\n } else if (elementType == \"button\") {\n\n this.drawButton(canvas, rect, viewId, elementId);\n\n } else if (elementType == \"buttonImage\") {\n\n this.drawButtonImage(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n\n } else if (elementType == \"image\") {\n \n this.drawImage(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n \n } else if (elementType == \"imageError\") {\n\n this.drawImageError(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n\n } else if (elementType == \"text\") {\n\n this.drawText(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n\n } else if (elementType == \"faceSearcher\") {\n \n this.drawFaceSearcher(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes);\n \n } else if (elementType == \"video\") {\n\n if (viewId == \"Extractor\") {\n if (this.extractionMode == FPhi.Selphi.Mode.Register)\n this.drawImageWithClippingCircle(canvas, rect, attributes.player, rect.x + rect.width / 2.0, rect.y + rect.height / 2.0, rect.width / 2.0);\n } else {\n this.drawImageWithClippingCircle(canvas, rect, attributes.player, rect.x + rect.width / 2.0, rect.y + rect.height / 2.0, rect.width / 2.0);\n }\n //this.drawImage(canvas,rect,attributes.player);\n\n } else if (elementType == \"camera\") {\n\n var progress = attributes.progress;\n var borderWidth = this.rm.getSetupFloat(\"facephi-widget-conf\", \"\", this.landscape, \"width_progress_bar\");\n var colorProgress = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_progress_bar\");\n var colorWarning = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_warning_message\");\n var colorExcellent = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_quality_excellent\");\n var colorLow = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_quality_low\");\n\n /*\n canvas.save();\n canvas.translate(this.width, 0);\n canvas.scale(-1, 1);\n\n\n this.cameraWidth = attributes.width;\n this.cameraHeight = attributes.height;\n this.cameraRotation = attributes.cameraRotation;\n this.faceDataRect = attributes.faceDataRect;\n this.faceTracking = attributes.faceTracking;\n\n // draw camera image to visible canvas\n if ((this.faceDataRect != 'undefined') && (this.faceDataRect != null) && (this.faceTracking)) {\n this.faceCenterOffsetTarget = { x: (this.faceDataRect.x + this.faceDataRect.width / 2.0) - this.circleX, y: (this.faceDataRect.y + this.faceDataRect.height / 2.0) - this.circleY }\n }\n this.faceCenterOffset.x += (this.faceCenterOffsetTarget.x - this.faceCenterOffset.x) * 0.1;\n this.faceCenterOffset.y += (this.faceCenterOffsetTarget.y - this.faceCenterOffset.y) * 0.1;\n var tRect = this.scaleRect({ width: this.cameraWidth, height: this.cameraHeight }, { x: 0, y: 0, width: this.width, height: this.height });\n\n // limit camera offset to circle bounds.\n var localCameraX = tRect.x + this.faceCenterOffset.x;\n if (localCameraX >= this.circleX - this.circleRadius) localCameraX = this.circleX - this.circleRadius;\n if (localCameraX + tRect.width <= this.circleX + this.circleRadius) localCameraX = this.circleX + this.circleRadius - tRect.width;\n var localCameraY = tRect.y - this.faceCenterOffset.y;\n if (localCameraY >= this.circleY - this.circleRadius) localCameraY = this.circleY - this.circleRadius;\n if (localCameraY + tRect.height <= this.circleY + this.circleRadius) localCameraY = this.circleY + this.circleRadius - tRect.height;\n\n*/\n canvas.save();\n canvas.beginPath();\n canvas.arc(this.circleX, this.circleY, this.circleRadius, 0, 2 * Math.PI, false);\n canvas.clip();\n //canvas.drawImage(attributes.camera, localCameraX, localCameraY, tRect.width, tRect.height);\n \n if ((attributes.state == \"UCLivenessMoveStabilizing\") || (attributes.state==\"UCLivenessMoveStabilized\") || (attributes.state==\"UCLivenessMoveDetecting\") || (attributes.state==\"UCLivenessMoveProcessing\")) {\n // Capa translucida negra para resaltar las letras\n canvas.fillStyle = \"#00000033\";\n canvas.fillRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n //canvas.drawImage(attributes.camera, tRect.x, tRect.y, tRect.width, tRect.height);\n canvas.restore();\n\n //canvas.drawImage(attributes.camera, 0,0, tRect.width, tRect.height);\n\n var circleColor = colorProgress; // this.rm.getSetupColor(\"facephi-widget-conf\", \"\", \"color_progress_bar\");\n if (mode == \"Warning\")\n circleColor = colorWarning; // this.rm.getSetupColor(\"facephi-widget-conf\", \"\", \"color_warning_message\");\n\n if (progress == 0.0 && mode == \"Warning\") {\n // Arco completo\n canvas.beginPath();\n canvas.strokeStyle = colorLow; // this.rm.getSetupColor(\"facephi-widget-conf\",\"\",\"color_quality_low\");\n canvas.lineWidth = borderWidth; // this.rm.getSetupFloat(\"facephi-widget-conf\", \"\", \"width_progress_bar\");\n canvas.lineCap = \"round\";\n canvas.arc(this.circleX, this.circleY, this.circleRadius - (canvas.lineWidth / 2) + 0.5, -Math.PI / 2, 2 * Math.PI - Math.PI / 2);\n canvas.stroke();\n }\n\n if ((attributes.state == \"UCLivenessMoveStabilizing\") || (attributes.state==\"UCLivenessMoveStabilized\") || (attributes.state==\"UCLivenessMoveDetecting\") || (attributes.state==\"UCLivenessMoveProcessing\")) {\n progress = 1.0;\n if (attributes.liveness_move_last_result) circleColor = colorExcellent; // this.rm.getSetupColor(\"facephi-widget-conf\",\"\",\"color_quality_excellent\");\n else circleColor = colorLow; // this.rm.getSetupColor(\"facephi-widget-conf\",\"\",\"color_quality_low\");\n \n if (attributes.state==\"UCLivenessMoveDetecting\" || attributes.state==\"UCLivenessMoveProcessing\") {\n // Arco completo\n canvas.beginPath();\n canvas.strokeStyle = colorProgress; // this.rm.getSetupColor(\"facephi-widget-conf\",\"\",\"color_progress_bar\");;\n canvas.lineWidth = borderWidth; // this.rm.getSetupFloat(\"facephi-widget-conf\", \"\", \"width_progress_bar\");\n canvas.lineCap = \"round\";\n canvas.arc(this.circleX, this.circleY, this.circleRadius - (canvas.lineWidth / 2) + 0.5, -Math.PI / 2, 2 * Math.PI - Math.PI / 2);\n canvas.stroke(); \n }\n\n } else {\n \n if (progress > 1.0) progress=1.0;\n if (this.extractionMode == FPhi.Selphi.Mode.Authenticate)\n progress = progress*progress*(3.0 - 2.0*progress); //smoothstep\n\n canvas.beginPath();\n canvas.strokeStyle = circleColor;\n canvas.lineWidth = borderWidth; // this.rm.getSetupFloat(\"facephi-widget-conf\", \"\", \"width_progress_bar\");\n canvas.lineCap = \"round\";\n canvas.arc(this.circleX, this.circleY, this.circleRadius - (canvas.lineWidth / 2) + 0.5, -Math.PI / 2, 2 * Math.PI * progress - Math.PI / 2);\n canvas.stroke();\n\n var colorShutter = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_shutter\");\n this.drawBlind(canvas, this.circleX, this.circleY, this.circleRadius, attributes.eyesYLevel, attributes.blind, colorShutter, attributes.blindText); \n }\n\n\n\n } else if (elementType == \"results\") {\n\n var totalTransitionTime = 1.000 + 1.500 * attributes.progress;\n var progressTime = stateTime / totalTransitionTime;\n if (progressTime > 1.0) {\n progressTime = 1.0;\n }\n\n // Calculamos la interpolacion de la barra de progreso (OutQuad -> InOutQuad)\n progressTime = progressTime * (2.0 - progressTime);\n progressTime = progressTime < 0.5 ? 2 * progressTime * progressTime : -1 + (4 - 2 * progressTime) * progressTime;\n\n canvas.beginPath();\n canvas.fillStyle = this.rm.getSetupColor(viewId, elementId, this.landscape, \"background_color\");\n canvas.arc(this.circleX, this.circleY, this.circleRadius, -Math.PI / 2, 2 * Math.PI - Math.PI / 2);\n canvas.fill();\n\n var scoreColor = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_quality_excellent\");\n if (attributes.progress <= 0.33)\n scoreColor = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_quality_low\");\n else if (attributes.progress <= 0.66)\n scoreColor = this.rm.getSetupColor(\"facephi-widget-conf\", \"\", this.landscape, \"color_quality_good\");\n\n canvas.beginPath();\n canvas.strokeStyle = scoreColor;\n canvas.lineWidth = this.rm.getSetupFloat(\"facephi-widget-conf\", \"\", this.landscape, \"width_progress_bar\");\n canvas.lineCap = \"round\";\n canvas.arc(this.circleX, this.circleY, this.circleRadius - (canvas.lineWidth / 2) * 0.5, -Math.PI / 2, 2 * Math.PI * attributes.progress * progressTime - Math.PI / 2);\n canvas.stroke();\n\n // score text\n var message = \"\";\n var tipMessage = \"\";\n if (attributes.progress >= 1.0) {\n message = this.rm.translate(\"results_quality_excellent\");\n tipMessage = this.rm.translate(\"results_quality_message\");\n } else if (attributes.progress >= 0.333) {\n message = this.rm.translate(\"results_quality_good\");\n tipMessage = this.rm.translate(\"results_quality_message\");\n } else {\n message = this.rm.translate(\"results_quality_low\");\n tipMessage = this.rm.translate(\"results_quality_message\");\n }\n\n var textSize = this.rm.getSetupFloat(viewId, elementId, this.landscape, \"fontResult_size\");\n var lineHeight = textSize+1;\n var textFont = this.rm.getSetupResourceId(viewId, elementId, this.landscape, \"fontResult\");\n var align = \"CENTER\";\n var valign = \"TOP\";\n this.drawStringMultiline(canvas, message, { x: 0, y: this.circleY - 5, width: this.width, height: this.height }, scoreColor, textFont, textSize,lineHeight,align,valign);\n\n textSize = this.rm.getSetupFloat(viewId, elementId, this.landscape, \"fontQuality_size\");\n var lineHeight = textSize+1;\n textFont = this.rm.getSetupResourceId(viewId, elementId, this.landscape, \"fontQuality\");\n var align = \"CENTER\";\n var valign = \"TOP\";\n this.drawStringMultiline(canvas, tipMessage, { x: 0, y: this.circleY + 5 + textSize, width: this.width, height: this.height }, scoreColor, textFont, textSize,lineHeight,align,valign);\n\n } else if (elementType == \"animation\") {\n var direction=0;\n //if (attributes.state == \"UCLivenessMoveDetecting\") {\n if (\"livenessMoveDirection\" in attributes)\n direction = attributes.livenessMoveDirection;\n if (elementId!=\"liveness_move\") direction=0;\n //}\n this.drawAnimation(canvas, rect, viewId, elementId, widgetTime, stateTime, mode, attributes,direction);\n } else if (elementId == \"progress\") {\n canvas.fillStyle = this.rm.getSetupColor(viewId, elementId, this.landscape, \"background_color\");\n canvas.fillRect(rect.x, rect.y, rect.width, rect.height);\n\n canvas.fillStyle = this.rm.getSetupColor(viewId, elementId, this.landscape, \"progress_color\");\n canvas.fillRect(rect.x, rect.y, rect.width*attributes.progress, rect.height);\n }\n }", "draw() {\n if (!this.getMap() || !this._html) {\n return;\n }\n if (!this._marker && !this._position) {\n return;\n }\n\n const divPixel = this.getProjection().fromLatLngToDivPixel(\n this._position || this._marker.getPosition()\n );\n\n if (divPixel) {\n const widthInfo = this._html.floatWrapper.clientWidth;\n const heightInfo = this._html.floatWrapper.clientHeight;\n\n this._html.floatWrapper.style.top = `${Math.floor(divPixel.y)}px`;\n this._html.floatWrapper.style.left = `${Math.floor(divPixel.x)}px`;\n }\n if (!this._isOpen) {\n this._isOpen = true;\n this.resize();\n this.reposition();\n this.activateCallback('afterOpen');\n GOOGLE_MAP_API.event.trigger(\n this.getMap(),\n `${this._eventPrefix}opened`,\n this\n );\n }\n }", "function onUpdateDrawingProperties(){\r\n let newH = document.getElementById(\"property_height\").value;\r\n let newW = document.getElementById(\"property_width\").value;\r\n let newS= document.getElementById(\"property_scale\").value;\r\n let newR= document.getElementById(\"property_resolution\").value;\r\n var flag = false;\r\n if (!canvas_frame){\r\n canvas_frame = document.getElementById('myCanvas');\r\n }\r\n if (newH != mHeight){\r\n flag = true;\r\n mHeight = newH;\r\n }\r\n if (newW != mWidth){\r\n flag = true;\r\n mWidth = newW;\r\n }\r\n if (newS !=mScaleX){\r\n flag = true;\r\n mScaleX = newS;\r\n mScaleY = newS;\r\n }\r\n if (newR != mResolution)\r\n {\r\n flag = true;\r\n mResolution = newR;\r\n }\r\n if (!flag) return;\r\n clearCurrentView();\r\n canvas_frame.width = newW;\r\n canvas_frame.height = newH;\r\n updateDrawingFrame();\r\n document.getElementById(\"view_title\").textContent = \"View \"+ canvas_frame.width +\"px x \"+ canvas_frame.height+\"px\";\r\n\r\n drawAll();\r\n //print results:\r\n // console.log(\"Framw width = \" + canvas_frame.width);\r\n // console.log(\"Framw height = \" + canvas_frame.height);\r\n // console.log(\"Scale X = \" + mScaleX);\r\n // console.log(\"Scale Y = \" + mScaleY);\r\n}", "function drawFrame() {\n // Draw background and a border\n\n mycanvas.drawRect({\n fillStyle: '#d0d0d0',\n x: 0, y: 0,\n fromCenter: false,\n width: $(mycanvas)[0].width,\n height: $(mycanvas)[0].height\n });\n \n mycanvas.drawRect({\n fillStyle: '#e8eaec',\n x: 1, y: 1,\n fromCenter: false,\n width: $(mycanvas)[0].width-2,\n height: $(mycanvas)[0].height-2\n \n \n });\n// Draw header\n// mycanvas.drawRect({\n// fillStyle: '#303030',\n// x: 0, y: 0,\n// fromCenter: false,\n// width: $(mycanvas)[0].width,\n// height: 65,\n// \n// \n// });\n// \n // Draw title\n// mycanvas.drawText({\n// fillStyle: \"#ffffff\",\n// fontFamily: 'Verdana',\n// text: \"Match3 Example - Rembound.com\", \n// fontSize: 24,\n// x:220,y:15, \n// });\n \n \n // Display fps\n \n// mycanvas.drawText({\n// fillStyle: \"#ffffff\",\n// fontFamily: 'Verdana',\n// text: \"Fps \" + fps, \n// fontSize: 18,\n// x:45,y:50, \n// });\n\n \n }", "function paint(e) {\n\t\n\n\tctx.lineTo(x_pos(e),y_pos(e));\n\tctx.stroke();\n\tsocket.emit('paint',{x: x_pos(e), y: y_pos(e), name:nickName.val()});\n}", "resizeCanvases() {\n if (this.imageCanvas) {\n this.imageCanvas.width = this.lineCanvas.width = document.body.clientWidth;\n this.imageCanvas.height = this.lineCanvas.height = window.innerHeight;\n }\n }", "init() {\n // setup the canvas\n this.canvasHolder.append(this.can)\n this.canvasHolder.append(this.paneOb.ta)\n this.canvasHolder.append(this.infoHolder)\n this.paneDiv.append(this.canvasHolder)\n this.can.height = this.size\n this.can.width = this.size\n this.invisican.height = this.size\n this.invisican.width = this.size\n //create interpolators for drawing\n //map xmin - xmax to 0 to 5000 or whatever width is do the same for y\n // create the regnametoValueMap\n /** This is the html canvas element context used for drawing lines and filling shapes on the canvas */\n this.ctx = this.can.getContext(\"2d\")\n /** This is the drawing context for the invisible canvas */\n this.invisictx = this.invisican.getContext(\"2d\")\n // calculate the regionSize min and max for all the slices, and allow us to scale the canvas content depending on that in the future\n this.calcRegionSizeGlobal()\n // take care of binding various functions to the events that get emitted\n // events to track valcolchange,radiobuttonchanged,sliderchange, filterChange\n // valcolchange we need to wait until something happens with the sliders?\n\n this.can.addEventListener(\"click\", this.getPos.bind(this))\n //radiobutton and slider change have implications for the slice we are looking at\n this.can.addEventListener(\"radiobuttonchanged\", () => {\n // must also trigger a slider update because otherwise slices get counted wrong\n this.setupCanvas()\n this.drawCanvas()\n })\n this.can.addEventListener(\"sliderchange\", () => {\n this.setupCanvas()\n this.drawCanvas()\n })\n\n //activity filter change, and valcolchange mean we must update our version of the ctrlInstance coldat, requires updating the regNameToValMap also\n this.can.addEventListener(\"filterChange\", () => {\n this.setupCanvas()\n this.drawCanvas()\n })\n\n }", "handleEvent({ target: { innerHeight, innerWidth }}) {\n // the canvas element needs it's `attributes` set,\n // instead part of his `style` attribute, as the canvas otherwise\n // crops\n this.domNode.setAttribute('height', innerHeight);\n this.domNode.setAttribute('width', innerWidth);\n\n // also set as properties to this class\n this.height = innerHeight;\n this.width = innerWidth;\n this.columns = Math.ceil(innerHeight / this.sprites.spriteSize);\n this.rows = Math.ceil(innerWidth / this.sprites.spriteSize);\n\n if(!this.world) {\n this.world = new World(this.columns, this.rows, this.sprites);\n this.view = Object.assign(new View(this.columns, this.rows, this.world), { canvas: this });\n }\n }", "function updateSize() {\n\t\t// $log.log(preDebugMsg + \"updateSize\");\n\t\tfontSize = parseInt($scope.gimme(\"FontSize\"));\n\t\tif(fontSize < 5) {\n\t\t\tfontSize = 5;\n\t\t}\n\n\t\tvar rw = $scope.gimme(\"DrawingArea:width\");\n\t\tif(typeof rw === 'string') {\n\t\t\trw = parseFloat(rw);\n\t\t}\n\t\tif(rw < 1) {\n\t\t\trw = 1;\n\t\t}\n\n\t\tvar rh = $scope.gimme(\"DrawingArea:height\");\n\t\tif(typeof rh === 'string') {\n\t\t\trh = parseFloat(rh);\n\t\t}\n\t\tif(rh < 1) {\n\t\t\trh = 1;\n\t\t}\n\n\t\tif(myCanvas === null) {\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tmyCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyCanvas.width = rw;\n\t\tmyCanvas.height = rh;\n\t\tvar W = myCanvas.width;\n\t\tvar H = myCanvas.height;\n\n\t\tif((dataBase.length + 1) * (spacing + fontSize) + 3*marg > H) {\n\t\t\t$scope.set(\"DrawingArea:height\", Math.ceil((dataBase.length + 1) * (spacing + fontSize) + 3*marg));\n\t\t\tH = Math.ceil((dataBase.length + 1) * (spacing + fontSize) + 3*marg);\n\t\t}\n\n\t\tdrawW = W;\n\t\tdrawH = H;\n\n\t\tdrawBackground(W,H);\n\n\t\tvar iv = $scope.gimme(\"InputVector\");\n\t\tvar t = \"\";\n\t\tif(iv.length <= 0 && dataBase.length <= 0) {\n\t\t\tt = \"No data\";\n\t\t}\n\t\telse {\n\t\t\tt = dataBase.length.toString() + \" vectors. \" + iv.length.toString() + \" data items in selected vector.\";\n\t\t}\n\n\t\tvar maxTW = 0;\n\t\tctx.font = fontSize + \"px Arial\";\n\t\tctx.fillStyle = \"black\";\n\t\tvar tw = legacyDDSupLib.getTextWidthCurrentFont(ctx, t);\n\t\tif(tw > maxTW) {\n\t\t\tmaxTW = tw;\n\t\t}\n\n\t\tvar x = 0;\n\t\tif(tw < drawW) {\n\t\t\tMath.floor(x = (drawW - tw) / 2);\n\t\t}\n\t\tvar y = marg;\n\t\tctx.fillText(t, x, y + fontSize);\n\n\t\tfor(var i = 0; i < dataBase.length; i++) {\n\t\t\tt = dataBase[i][0];\n\n\t\t\tif(i == selectedIdx) {\n\t\t\t\tctx.font = \"bold \" + fontSize + \"px Arial\";\n\t\t\t\tctx.fillStyle = \"red\";\n\t\t\t}\n\n\t\t\tvar tw = legacyDDSupLib.getTextWidthCurrentFont(ctx, t);\n\t\t\tif(tw > maxTW) {\n\t\t\t\tmaxTW = tw;\n\t\t\t}\n\n\t\t\tvar x = marg;\n\t\t\tvar y = marg*2 + (i + 1) * (spacing + fontSize);\n\n\t\t\tctx.fillText(t, x, y + fontSize);\n\n\t\t\tif(i == selectedIdx) {\n\t\t\t\tctx.font = fontSize + \"px Arial\";\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t}\n\t\t}\n\n\t\tif(maxTW + 2*marg > W) {\n\t\t\t$scope.set(\"DrawingArea:width\", Math.ceil(maxTW + 2*marg));\n\t\t}\n\t}", "function draw() {\n\t\t\tif (pointCloudData == null) {\n\t\t\t\tCREEDO.core.requestData(dataViewContainerId, \"pointData\",\n\t\t\t\t\t\tfunction(data) {\n\t\t\t\t\t\t\tpointCloudData = data;\n\t\t\t\t\t\t\tprocessPointCloudData();\n\t\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tprocessPointCloudData();\n\t\t\t}\n\t\t}", "resizeCanvas() {\n const containerWidth = this.worldContainer.offsetWidth;\n this.canvasWidth = containerWidth;\n this.canvasHeight = containerWidth;\n\n this.canvas.width = this.canvasWidth;\n this.canvas.height = this.canvasHeight;\n\n this.cellSize = this.canvasWidth / this.colNumber;\n this.renderWorld();\n }", "drawCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.ctx.fillStyle = '#18121e';\n this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\n this.moveDots();\n }", "function viewPositionMetrics(){\n\t\t\t\t$(\"canvas\").mousedown(function(event){\n\t\t\t\t\tvar canvasOffsetX = $(this).position().left;\n\t\t\t\t\tvar canvasOffsetY = $(this).position().top;\n\n\t\t\t\t\tvar clickedX = Math.floor(event.pageX - canvasOffsetX);\n\t\t\t\t\tvar clickedY = Math.floor(event.pageY - canvasOffsetY);\n\t\t\t\t\tconsole.log(clickedX, clickedY);\n\t\t\t\t\tswitch (event.which){\n\t\t\t\t\t\tcase 1: \n\t\t\t\t\t\t\t//co-ords from click listener are able to progress the game\n\t\t\t\t\t\t\tif(!isGameOver){\n\t\t\t\t\t\t\t\tstartRound(clickedX, clickedY); \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\tcase 3: \n\t\t\t\t\t\t\tif(!isGameOver){\n\t\t\t\t\t\t\t\tplaceFlag(clickedX, clickedY);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\talert(\"error, something seems to be wrong..\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}", "function updateCanvas() {\n clearGraph();\n\n updatePoints();\n}", "function draw() {\n\t\t\t// Adjust render settings if we switched to multiple viewports or vice versa\n\t\t\tif (medeactx.frame_flags & medeactx.FRAME_VIEWPORT_UPDATED) {\n\t\t\t\tif (medeactx.GetEnabledViewportCount()>1) {\n\t\t\t\t\tmedeactx.gl.enable(medeactx.gl.SCISSOR_TEST);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmedeactx.gl.disable(medeactx.gl.SCISSOR_TEST);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform rendering\n\t\t\tvar viewports = medeactx.GetViewports();\n\t\t\tfor(var vn = 0; vn < viewports.length; ++vn) {\n\t\t\t\tviewports[vn].Render(medeactx,dtime);\n\t\t\t}\n\t\t}", "function updateCanvas() {\n switch(STATE) {\n case states.MENU:\n drawMenu();\n break;\n case states.GAME:\n drawGame();\n break;\n //case states.LOBBY: -- Not USED - can be added later for a game select lobby\n //drawLobby();\n //break;\n case states.WAITING:\n drawWaiting();\n break;\n case states.GAME_END:\n drawGameOver();\n break;\n }\n}", "draw(context) {\n //TO-DO\n }", "displayBoard(tileSize) {\n ctx.strokeStyle = this.boardColor;\n ctx.lineWidth = 10;\n ctx.strokeRect(this.boardBorderLeft, this.boardBorderTop, this.boardBorderSize, this.boardBorderSize);\n\n ctx.lineWidth = 4;\n }", "function updateCanvas() { //redraws the image data to fit whatever the current size is\r\n\t\t//////////////////////////////\r\n\t\t//non-white background color//\r\n\t\tthis.ctx.fillStyle = \"#CCE6D0\";\r\n\t\tthis.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\r\n\t\t\r\n\t\t//////////////////////////////////////////////\r\n\t\t//redraw the pixels from the top left corner//\r\n\t\tvar currImageData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);\r\n\t\tvar intendedHeight = this.pixels.length/(4*this.intendedWidth);\r\n\t\tfor (var y = 0; y < intendedHeight; y++) { //for all intended rows\r\n\t\t\tif (y >= this.canvas.height) break;\r\n\t\t\tfor (var x = 0; x < this.intendedWidth; x++) { //and for each intended column\r\n\t\t\t\tif (x >= this.canvas.width) break;\r\n\t\t\t\tvar idxInPixels = 4*(this.intendedWidth*y + x); //idx of this pixel in the pixels array\r\n\t\t\t\tvar idxInCanvas = 4*(this.canvas.width*y + x); //corresponding idx in the canvas, starting at corner (0,0)\r\n\t\t\t\tfor (var c = 0; c < 4; c++) { //and for all three colors, lol c++\r\n\t\t\t\t\tcurrImageData.data[idxInCanvas+c] = this.pixels[idxInPixels+c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.ctx.putImageData(currImageData, 0, 0);\r\n\t}", "render() {\n this.context.drawImage(this.buffer.canvas, 0, 0, this.buffer.canvas.width, this.buffer.canvas.height, 0, 0, this.context.canvas.width, this.context.canvas.height);\n }", "function addCanvas() {\r\n\t\tvar canvas = document.createElement('canvas');\r\n\t\tcanvas.id = 'canvas';\r\n\t\t\r\n\t\t// For use with EXCanvas with internet explorer\r\n\t\tif(typeof(G_vmlCanvasManager) != 'undefined') {\r\n\t\t\tcanvas = G_vmlCanvasManager.initElement(canvas);\r\n\t\t}\r\n\t\t\r\n\t\t$['mapsettings'].ctx = canvas.getContext(\"2d\");\r\n\r\n\t\t$('#tiles').append(canvas);\r\n\t\t\r\n\t\t$['mapsettings'].scale = new Point(1,1); \r\n\t\tscaleCanvas();\r\n\t\t$['mapsettings'].translatex = 0;\r\n\t\t$['mapsettings'].translatey = 0;\r\n\t\t\r\n\t\t$['mapsettings'].ctx.save();\r\n\t\t\r\n\t\t$['mapsettings'].annotations = new Annotations($['mapsettings'].ctx);\r\n\t\t$['mapsettings'].selectedAnnotation = -1;\r\n\t\t\r\n\t\t// The following code positions the canvas ontop of the current viewport\r\n\t\t// TODO: replace this code when annotations are each presented in their own canvas element\r\n\t\tvar left = parseInt($('#inner').css('left'));\r\n\t\tvar top = parseInt($('#inner').css('top'));\r\n\t\tvar offsetLeft = 0;\r\n\t\tvar offsetTop = 0;\r\n\t\tif(left < 0) offsetLeft = -left;\r\n\t\tif(top < 0) offsetTop = -top;\r\n\t\t\r\n\t\t$(\"#canvas\").attr('width', $['mapsettings'].element.width() - left).attr('height', $['mapsettings'].element.height() - top);\r\n\t\t$('#canvas').css('left', offsetLeft).css('top', offsetTop);\r\n\t\t\t\t\r\n\t\t$(window).resize(function(e) {\r\n resizeCanvas();\r\n });\r\n\r\n\t\t$('#zoom_in').click(function(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tscaleCanvas();\r\n\t\t\t\tresizeCanvas();\r\n\t\t});\r\n\t\t\r\n\t\t$('#zoom_out').click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tscaleCanvas();\r\n\t\t\tresizeCanvas();\r\n\t\t});\r\n\t\t\r\n\t\t// Code used to ensure that the zoom slider is undated to the current position\r\n\t\tvar zoomMouseUp = function(e) {\r\n\t\t\tif(typeof($['mapsettings'].beforeZoom) == 'undefined') return true;\r\n\t\t\tvar zoom = parseInt(parseInt($('#zoomSlide').css('left'))/$('#zoomSlide').width())+1;\r\n\t\t\tscaleCanvas();\r\n\t\t\tresizeCanvas();\r\n\t\t}\r\n\t\t$('#zoomSlide').mouseup(zoomMouseUp);\r\n\t\t\r\n\t\t$('#zoomSlider').mouseleave(zoomMouseUp);\r\n\t\t\r\n\t\t$('#zoomSlider').click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tvar x = e.pageX - parseInt($($(this).parent().get(0)).css('left'));\r\n\t\t\t$['mapsettings'].beforeZoom = $['mapsettings'].zoom;\r\n\t\t\tvar zoom = parseInt(x/$('#zoomSlide').width());\r\n\t\t\tscaleCanvas();\r\n\t\t\tresizeCanvas();\r\n\t\t});\r\n\t\t\r\n\t\t// If the map was moved, move the canvas... will become unnecessary when elements have own canvas.\r\n\t\t$['mapsettings'].element.bind('mapMoved', function(e){\r\n resizeCanvas();\r\n\t\t});\r\n\t\t\r\n\t\t// Onmousmove move point action function\r\n\t\tvar movePoint = function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\tvar point = new Point((e.pageX - parseInt($('#inner').css('left')))/$['mapsettings'].scale.x, (e.pageY - parseInt($('#inner').css('top')))/$['mapsettings'].scale.y);\r\n\t\t\tdocument.body.focus();\r\n\r\n // prevent text selection in IE\r\n document.onselectstart = function () { return false; };\r\n // prevent IE from trying to drag an image\r\n\t\t\tif(e.srcElement)\r\n \te.srcElement.ondragstart = function() { return false; };\r\n\t\t\t\r\n\t\t\tsets.annotations.getSelected().moveSelected(point);\r\n\t\t\tsets.annotations.draw();\r\n\t\t}\r\n\t\t\r\n\t\t// Onmousmove + shift add point in between action function\r\n\t\tvar moveCtrlPoint = function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\tvar point = new Point((e.pageX - parseInt($('#inner').css('left')))/$['mapsettings'].scale.x, (e.pageY - parseInt($('#inner').css('top')))/$['mapsettings'].scale.y);\r\n\t\t\tdocument.body.focus();\r\n\r\n // prevent text selection in IE\r\n document.onselectstart = function () { return false; };\r\n // prevent IE from trying to drag an image\r\n\t\t\tif(e.srcElement)\r\n \te.srcElement.ondragstart = function() { return false; };\r\n\t\t\tif($['mapsettings'].annotations.getSelected().selectedDistanceTo(point) > (10/$['mapsettings'].scale.x)) {\r\n\t\t\t\tvar towards = $['mapsettings'].annotations.getSelected().movingClosestToNeighbor(point);\r\n\t\t\t\t$['mapsettings'].annotations.getSelected().addNextTo(point, towards);\r\n\t\t\t\t$(\"#tiles\").unbind('mousemove', moveCtrlPoint);\r\n\t\t\t\t$(\"#tiles\").mousemove(movePoint);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar selectDown = function(e){\r\n\t\t\tvar point = new Point((e.pageX - parseInt($('#inner').css('left')))/$['mapsettings'].scale.x, (e.pageY - parseInt($('#inner').css('top')))/$['mapsettings'].scale.y);\r\n\t\t\tif(sets.annotations.length() < 1) var id = -1;\r\n\t\t\telse var id = sets.annotations.getSelected().isPoint(point);\r\n\t\t\tif(id != -1) {\r\n\t\t\t\tsets.annotations.getSelected().selectPoint(id);\r\n\t\t\t\t$(\"#tiles\").mousemove(movePoint);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\tvar selectUp = function(e){\r\n\t\t\t\t$(\"#tiles\").unbind('mousemove', movePoint);\r\n\t\t};\r\n\t\t\r\n\t\t$(\"#tiles\").mousedown(selectDown).mouseup(selectUp);\r\n\t\t\r\n\t\t// Delete point action\r\n\t\t$(document).keydown(function(e){\r\n\t\t\tvar sets = $['mapsettings'];\r\n\t\t\tif((e.which == 8 || e.which == 46) && (sets.action == 'Polygons' || sets.action == 'Polyline') && !$['mapsettings'].modal) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tif(sets.annotations.getSelected().length() > 1) {\r\n\t\t\t\t\tsets.annotations.getSelected().removeSelectedPoint();\r\n\t\t\t\t\tsets.annotations.draw();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tvar ctrlDown = function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\tvar point = new Point((e.pageX - parseInt($('#inner').css('left')))/$['mapsettings'].scale.x, (e.pageY - parseInt($('#inner').css('top')))/$['mapsettings'].scale.y);\r\n\t\t\tif(sets.annotations.length() < 1) var id = -1;\r\n\t\t\telse var id = sets.annotations.getSelected().isPoint(point);\r\n\t\t\tif(id != -1) {\r\n\t\t\t\tsets.annotations.getSelected().selectPoint(id);\r\n\t\t\t\t$['mapsettings'].annotations.getSelected().storeDistancesTo(point);\r\n\t\t\t\t$(\"#tiles\").mousemove(moveCtrlPoint);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar ctrlUp = function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\t$(\"#tiles\").unbind('mousemove',moveCtrlPoint);\r\n\t\t}\r\n\t\t\r\n\t\t// Depending on whether shift button is held down, determines if user is adding in-between point or moving it. \r\n\t\t$(document).keydown(function(e){\r\n\t\t\tif(e.which == 16 && (sets.action == 'Polygons' || sets.action == 'Polyline')) {\r\n\t\t\t\t$(\"#tiles\").mousedown(ctrlDown).mouseup(ctrlUp);\r\n\t\t\t\t$(\"#tiles\").unbind('mousedown',selectDown)\r\n\t\t\t\t$(\"#tiles\").unbind('mouseup', selectUp);\r\n\t\t\t}\r\n\t\t}).keyup(function(e){\r\n\t\t\tif(e.which == 16 && (sets.action == 'Polygons' || sets.action == 'Polyline')) {\r\n\t\t\t\t$(\"#tiles\").unbind('mousedown',ctrlDown).unbind('mouseup',ctrlUp);\r\n\t\t\t\t$(\"#tiles\").mousedown(selectDown).mouseup(selectUp);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// Add Point action function\r\n\t\tvar canvasAction = function(e) {\r\n\t\t\t// Gets the point the user clicked on\r\n\t\t\tvar point = new Point((e.pageX - parseInt($('#inner').css('left')))/$['mapsettings'].scale.x, (e.pageY - parseInt($('#inner').css('top')))/$['mapsettings'].scale.y);\r\n\t\t\tif(sets.annotations.length() < 1) var id = -1;\r\n\t\t\telse var id = sets.annotations.getSelected().isPoint(point);\r\n\t\t\tif(id != -1) { // If there is a point where the user clicked, select the point\r\n\t\t\t\tsets.annotations.getSelected().selectPoint(id);\r\n\t\t\t\t$['mapsettings'].point_move = true;\r\n\t\t\t} else {\r\n\t\t\t\t$['mapsettings'].point_move = false;\r\n\t\t\t\t// If there are no selected annotations of the type of action currently selected add new annotation\r\n\t\t\t\tif(sets.annotations.length() < 1 || sets.annotations.selectedType() != $['mapsettings'].action) {\r\n\t\t\t\t\t$['mapsettings'].afterModal.push(function() {\r\n\t\t\t\t\t\tvar value = $['mapsettings'].value;\r\n\t\t\t\t\t\tif(value) createNewAnnotation($['mapsettings'].action);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tmapConfirm('You need to create an annotation before adding points.', \"Do you want to create new \" + $['mapsettings'].action + '?');\r\n \t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tsets.annotations.getSelected().addPoint(point);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsets.annotations.draw();\r\n\t\t}\r\n\t\t\r\n\t\tvar move = $['mapsettings'].move;\r\n\t\tresizeCanvas();\r\n\t\t\r\n\t\tvar infoWindowControl = function(e) {\r\n\t\t\te.preventDefault(); openInfoWindow(e, this);\r\n\t\t}\r\n\t\t\r\n\t\tvar deselectAll = function() {\r\n\t\t\tvar actions = $('#actions li.selected').removeClass('selected');\r\n\t\t\t$(\"#tiles\").unbind('click', canvasAction);\r\n\t\t\t$(\"#tiles\").unbind('mousedown',selectDown)\r\n\t\t\t$(\"#tiles\").unbind('mouseup', selectUp);\r\n\t\t\t$(\"#tiles\").unbind('mousedown', $['mapsettings'].mousedown);\r\n\t\t\t$(\"#tiles\").unbind('mouseup', $['mapsettings'].mouseup);\r\n\t\t\t$(\"#canvas\").unbind('click', infoWindowControl);\r\n\t\t}\r\n\t\t\r\n\t\t$(\"#controls\").append('<ul id = \"actions\"><li class = \"selected\"><a href = \"#\" id = \"hand\" title = \"Move\">Move</a></li><li><a href = \"#\" id = \"polygons\" title = \"Create and Edit polygons\">Create and Edit Polygons</a></li><li><a href = \"#\" id = \"polylines\" title = \"Create and Edit Polylines\">Polylines</a></li><li><a href = \"#\" id = \"points\" title = \"Create and Edit Annotation Points\">Points</a></li></ul>');\r\n\t\t// Select moving action \r\n\t\t$(\"#hand\").click(function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\t$['mapsettings'].action = 'hand';\r\n\t\t\tdeselectAll();\r\n\t\t\tvar move = $['mapsettings'].move;\r\n\t\t\t$(\"#tiles\").mouseup($['mapsettings'].mouseup).mousedown($['mapsettings'].mousedown);\r\n\t\t\t$($(this).parent().get(0)).addClass('selected');\r\n\t\t\t$(\"#tiles\").css('cursor', 'move');\r\n\t\t\t$(\"#tiles\").css('cursor', '-webkit-grab');\r\n\t\t\t$(\"#tiles\").css('cursor', '-moz-grab');\r\n\t\t});\r\n\t\t// Select polygons action\r\n\t\t$('#polygons').click(function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\t$['mapsettings'].action = 'Polygons';\r\n\t\t\tdeselectAll();\r\n\t\t\t$('#tiles').click(canvasAction);\r\n\t\t\t$(\"#tiles\").mousedown(selectDown).mouseup(selectUp);\r\n\t\t\t$($(this).parent().get(0)).addClass('selected');\r\n\t\t\t$(\"#tiles\").css('cursor', 'default');\r\n\t\t});\r\n\t\t// Select Polylines action\r\n\t\t$('#polylines').click(function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\t$['mapsettings'].action = 'Polyline';\r\n\t\t\tdeselectAll();\r\n\t\t\t$('#tiles').click(canvasAction);\r\n\t\t\t$(\"#tiles\").mousedown(selectDown).mouseup(selectUp);\r\n\t\t\t$($(this).parent().get(0)).addClass('selected');\r\n\t\t\t$(\"#tiles\").css('cursor', 'default');\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t// Select points action\r\n\t\t$('#points').click(function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t\t$['mapsettings'].action = 'annotations';\t\t\t\r\n\t\t\tdeselectAll();\r\n\t\t\t$('#canvas').click(infoWindowControl);\r\n\t\t\t\r\n\t\t\t$($(this).parent().get(0)).addClass('selected');\r\n\t\t\t$(\"#tiles\").css('cursor', 'default');\r\n\t\t});\r\n\t}", "setUpCanvas(){\n var w = window.innerWidth;\n var h = window.innerHeight;\n this.$canvas = $(`<canvas id='${this.id}' width='${w}' height='${h}'></canvas`);\n this.canvas = this.$canvas[0];\n this.ctx = this.canvas.getContext('2d');\n this.$canvas = this.$canvas.css({\n position: 'absolute',\n top: 0,\n left: 0,\n });\n //console.log(document.body.clientWidth, window.innerHeight);\n }", "draw(){\n\t\t\n\t\tlet height = this.height; //100\n\t\tlet width = this.width; //100\n\t\t\n\t\tlet ctx = this.ctx;\n\t\t//save last frame\n\t\tlet lastFrame = ctx.getImageData(0, 0, width, height);\n\t\t//clear canvas\n\t\tctx.clearRect(0, 0, width, height);\n\t\t//now, move frame 1 pixel to the left\n\t\tctx.putImageData(lastFrame, -1, 0);\n\t\t\n\t\t//then, draw the lines\n\t\tfor(var line of this.lines){\n\t\t\t\n\t\t\t\n\t\t\tlet range = line.maxValue - line.minValue;\n\t\t\tlet value = line.value;\n\t\t\t\n\t\t\t//Multiply line's value by the ratio between height and range, to get effective range the same but zero at the top\n\t\t\tvalue *= 1 * height / range;\n\t\t\t\n\t\t\t//Now, zero the value by adding the difference between minValue and 0\n\t\t\tvalue -= line.minValue * height / range;\n\t\t\t\n\t\t\t//Now, invert by subtracting from height\n\t\t\tvalue = height - value;\n\t\t\t\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle = line.color;\n\t\t\tctx.moveTo(width - 2, value);\n\t\t\tctx.lineTo(width, value);\n\t\t\tctx.stroke();\n\t\t}\n\t}", "function update(){\r\n\tcanvas = document.getElementById('canvas');\r\n\tcanvas.focus();\r\n\tif (canvas.getContext) {\r\n\t\tc = canvas.getContext('2d');\r\n\t\tc.clearRect(0, 0, screen.width, screen.height);\r\n\t\tdrawMap();\r\n\t\tdrawObjects();\r\n\t\tif(mouse.draggedObject!=null){\r\n\t\t\tdrawDraggedObject();\r\n\t\t}\r\n\t\tif(mouse.select){\r\n\t\t\tc.strokeStyle = \"#ffffff\";\r\n\t\t\tc.strokeRect(mouse.clickedPosition.x, mouse.clickedPosition.y, mouse.coord.x - mouse.clickedPosition.x, mouse.coord.y - mouse.clickedPosition.y);\r\n\t\t}\r\n\t\tdrawSelectedUnitsHealth();\r\n\t\tdrawUi();\r\n\t\t//...\r\n\t\tdebug();\r\n\t}\r\n}", "display(){\n //Sets the fill color to this.color\n ctx.fillStyle = this.color;\n //Starts drawing the border with a line width of 5\n ctx.beginPath();\n ctx.lineWidth = 5;\n //Draws a blue line from the first corner to the last\n ctx.moveTo(this.borders[0],this.borders[1]);\n\n for (var i = 2; i < (this.borders.length); i += 2){\n ctx.lineTo(this.borders[i],this.borders[i+1]);\n }\n //Closes the room by drawing from the last corner to the first\n ctx.lineTo(this.borders[0],this.borders[1]);\n //Sets the line color to blue\n ctx.strokeStyle = \"blue\";\n ctx.stroke();\n //fills in the borders with this.color\n ctx.fill();\n\n }" ]
[ "0.6723663", "0.6723663", "0.6723663", "0.6723663", "0.6689109", "0.66520095", "0.66318166", "0.661741", "0.65736616", "0.6551152", "0.6542767", "0.6450827", "0.64051735", "0.6402234", "0.63843316", "0.63594186", "0.6357922", "0.63155", "0.6298244", "0.62909216", "0.62813073", "0.62751603", "0.62569803", "0.62236404", "0.6202835", "0.61923605", "0.61901504", "0.61866045", "0.61835325", "0.6181829", "0.61792856", "0.616085", "0.6152909", "0.6151229", "0.61295974", "0.611944", "0.61074543", "0.610129", "0.60928035", "0.60769117", "0.6076193", "0.6053482", "0.6041821", "0.60366106", "0.6029367", "0.6025769", "0.60125315", "0.60019135", "0.59966993", "0.5991435", "0.59682554", "0.59626156", "0.5940586", "0.59383893", "0.5922506", "0.5922261", "0.5920939", "0.5916143", "0.5897174", "0.58967626", "0.5880991", "0.5877714", "0.586187", "0.586186", "0.58614564", "0.58614564", "0.58577025", "0.58567876", "0.5846355", "0.58457536", "0.583653", "0.58352447", "0.58346367", "0.58346367", "0.5830283", "0.5827322", "0.58148503", "0.58134496", "0.5810771", "0.58098155", "0.5806328", "0.5804714", "0.58008033", "0.57966274", "0.5794657", "0.5793626", "0.5791679", "0.5789027", "0.57869303", "0.5784222", "0.5779723", "0.57783127", "0.57757336", "0.5772521", "0.57721615", "0.5766949", "0.5766419", "0.5765895", "0.5762208", "0.57589453", "0.5758314" ]
0.0
-1
TODO: Create a function that returns a license badge based on which license is passed in If there is no license, return an empty string
function renderLicenseBadge(licenses) { if (licenses === "APM[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)") { return "[APM][![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)"; } else if (licenses === "AUR") { return "AUR[![License: AUR](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)"; } else if (licenses === "BSD 3-Clause") { return "BSD 3-Clause[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)"; } else if (licenses === "BSD 2-Clause") { return "BSD 2-Clause[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)"; } else if (licenses === "Eclipse Marketplace License") { return "ECLIPSE[![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)"; } else if (licenses === "GNU GPL v2") { return "GNU GPL v2[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)"; } else if (licenses === "GNU GPL v3") { return "GNU GPL v3[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)"; } else if (licenses === "IBM Public License") { return "IBM[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensource.org/licenses/IPL-1.0)"; } else if (licenses === "Mozilla") { return "Mozilla[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)"; } else if (licenses === "Unlicense") { return "Unlicense[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)"; } else { return " "; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function badge(licenseChoice) {\n// badge information\n// TODO: Create a function that returns the license link\nlet licenseString = \" \"\nif (licenseChoice === 'MIT'){\n licenseString = `![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)`\n}\nelse if (licenseChoice === 'Apache 2.0'){\n licenseString = `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`\n}\nelse if (licenseChoice === 'GPL 3.0'){\n licenseString = `![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)`\n}\n// // If there is no license, return an empty string\nelse if (licenseChoice === 'None'){\n licenseString = `![License: 'None'}](http://img.shields.io/badge/License-None)`\n};\nreturn licenseString\n}", "function licenseBadge(license){\n if (license !== \"none\"){\n return `![badgeImage](https://img.shields.io/badge/license-${license}-blue)`\n }\n else {\n return \"\"\n }\n}", "function renderLicenseBadge(license) {\n\tvar badge = '';\n\tconsole.log(license);\n\tif (license === 'MIT') { \n\t\tbadge = '![badmath](https://img.shields.io/badge/License-MIT-blue)';\n\t} else if (license === 'Apache') { \n\t\tbadge = '![badmath](https://img.shields.io/badge/License-Apache-green)';\n\t} else if (license === 'GPL') { \n\t\tbadge = '![badmath](https://img.shields.io/badge/License-GPL-red)';\n\t} else if (license === 'Mozilla') { \n\t\tbadge = '![badmath](https://img.shields.io/badge/License-Mozilla-yellow)';\n\t}\n\t\n\treturn badge;\n}", "function renderLicenseBadge(license) {\n if (license === \"MIT\"){\n return \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\"\n \n\n }\n else if (license === \"IBM\"){\n return \"[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensource.org/licenses/IPL-1.0)\"\n }\n else if (license === \"SIL\"){\n return \"[![License: Open Font-1.1](https://img.shields.io/badge/License-OFL%201.1-lightgreen.svg)](https://opensource.org/licenses/OFL-1.1)\"\n }\n else {\n return \"\"\n }\n}", "function renderLicenseBadge(license) {\nif (license === \"N/A\") {\n return \"\";\n }\n if (license === \"MIT\") {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`;;\n} else if (license === \"Apache 2.0\") {\n return `[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`;\n} else if (license === \"GNU\") {\n return `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`;\n} else if (license === \"ISC\") {\n return `[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)`;\n} else if (license === \"IBM\") {\n return `[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensource.org/licenses/IPL-1.0)`;\n }\n}", "function renderLicenseBadge(license) {\n if (license !== [1]) {\n return `![MIT](https://img.shields.io/badge/license-MIT-blue.svg)`;\n console.log(license);\n } else {\n return '';\n }\n \n}", "function renderLicenseBadge(license) {\n let badge\n switch(license){\n case \"None\":\n badge=\"\";\n break;\n case \"MIT License\":\n badge=\"![License Badge](https://img.shields.io/badge/License-MIT-green)\";\n break; \n case \"Apache License 2.0\":\n badge=\"![License Badge](https://img.shields.io/badge/License-Apache2.0-green)\";\n break;\n case \"Mozilla Public License 2.0\":\n badge=\"![License Badge](https://img.shields.io/badge/License-Mozilla2.0-green)\";\n break; \n }\n return badge;\n}", "function renderLicenseBadge(license) {\n let licType = license; \n let myLicense = '';\n if(licType === 'MIT') {\n myLicense = `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`\n } else if (licType === 'GPLv3') {\n myLicense = `![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)`\n } else if (licType === 'GPL') {\n myLicense = `![GPL license](https://img.shields.io/badge/License-GPL-blue.svg)`\n }else if(licType === 'CC-0'){\n myLicense = `[![CC-0 license](https://img.shields.io/badge/License-CC--0-blue.svg)](https://creativecommons.org/licenses/by-nd/4.0)`\n } else {\n //license.license = \"None\"\n }\n return myLicense;\n\n}", "function renderLicenseBadge(license) {\n switch(license) {\n case \"Mozilla Public License 2.0\" :\n return \"https://img.shields.io/badge/license-Mozilla-blue.svg\";\n \n case \"MIT License\" :\n return \"https://img.shields.io/badge/license-MIT-blue.svg\";\n \n case \"Eclipse Public License version 2.0\" :\n return \"https://img.shields.io/badge/license-Eclipse%202.0-blue.svg\";\n \n case \"Apache License 2.0\" : \n return \"https://img.shields.io/badge/license-Apache%202.0-blue.svg\";\n \n case \"No License Used\" :\n return \"\";\n } \n }", "function renderLicenseBadge(license) {\n if (license === \"none\" || license === \"\") {\n return \"This application does not have a license.\"\n }\n else {\n var badge;\n switch (license) {\n case 'Apache 2.0 License':\n badge = `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`;\n break;\n case 'Boost Software License 1.0':\n badge = `[![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)`;\n break;\n case 'BSD 3-Clause License':\n badge = `[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)`;\n break;\n case 'BSD 2-Clause License':\n badge = `[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)`;\n break;\n case 'GNU GPL v3':\n badge = `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`;\n break;\n case 'MIT':\n badge = `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`;\n break;\n case 'Mozilla Public License 2.0':\n badge = `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`;\n break;\n case 'The Unlicense':\n badge = `[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)`;\n break;\n case 'Eclipse Public License 1.0':\n badge = `[![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)`;\n \n }\n return badge\n }\n}", "function renderLicenseBadge(license) {\n if(license == \"MIT\") {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)`\n }else if(license == \"IBM\") {\n return `[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensource.org/licenses/IPL-1.0)`\n }else if (license == \"Mozilla\"){\n return `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`\n }\n else {\n return `No License Provided`\n }\n \n}", "function renderLicenseBadge(license) {\n if (!license) {\n return \"\";\n } else if (license == \"GNU AGPLv3\") {\n return `[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)`;\n } else if (license == \"GNU GPLv3\") {\n return `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`;\n } else if (license == \"GNU LGPLv3\") {\n return `[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)`;\n } else if (license == \"Mozilla Public 2.0\") {\n return `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`;\n } else if (license == \"Apache 2.0\") {\n return `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`;\n } else if (license == \"MIT\") {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`;\n } else if (license == \"Boost Software 1.0\") {\n return `[![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)`;\n } else if (license == \"The Unlicense\") {\n return `[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)`;\n }\n return license;\n}", "function renderLicenseBadge(license) {\n // const licenseName = answers.license\n // let licenseResp = '';\n \n if (license === 'MIT') {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`\n };\n if (license === 'Apache') {\n return `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`\n } else if (license === 'GNU') {\n return `![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)`\n } else if (license === 'IBM') {\n return `![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)`\n } else if (license === 'Mozilla') {\n return `![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)`\n } else if (license === 'Perl') {\n return `![License: Artistic-2.0](https://img.shields.io/badge/License-Perl-0298c3.svg)` \n } else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"MIT\") {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`;\n } else if (license === \"GNU GPL\") {\n return `![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)`;\n } else if (license === \"Apache 2.0\") {\n return `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`;\n } else if (license === \"Boost Software License 1.0\") {\n return `![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)`;\n } else if (license === \"Mozilla\") {\n return `![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)`;\n } else if (license === \"Open Software License 3.0\") {\n return `[![License: ODbL](https://img.shields.io/badge/License-ODbL-brightgreen.svg)]`;\n } else if (license === \"None\") {\n license = \"\";\n return license;\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"MIT\"){\n return \"![MIT License](https://shields.io/badge/license-MIT-green)\"\n } else if (license === \"GPL\"){\n return \"![GPL License](https://shields.io/badge/license-GPL-blue)\"\n } else if (license === \"BSD\"){\n return \"![BSD License](https://shields.io/badge/license-BSD-green)\"\n } else if (license === \"APACHE\"){\n return \"![APACHE License](https://shields.io/badge/license-Apache-blue)\"\n } else if (license === \"NONE\"){\n return \"\"\n }\n}", "function renderLicenseBadge(license) {\n let badge = \"\";\n if (license === \"MIT License\") {\n badge =\n \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n } else if (license === \"CC0 1.0 Universal\") {\n badge =\n \"[![License: CC0-1.0](https://licensebuttons.net/l/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/)\";\n } else {\n badge = \"\";\n }\n\n return badge;\n}", "function renderLicenseBadge(license) {\n console.log(\"license: \" + license);\n if (!license) {\n return '';\n }\n if (license == 'ISC') {\n return `[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)`;\n } else if (license == 'WTFPL') {\n return `[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)`;\n } else if (license == 'MIT') {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`;\n }\n return ``;\n}", "function renderLicenseBadge(license) {return !license ? '' : `[![license](https://img.shields.io/badge/license-${license}-blue)](https://shields.io)`}", "function renderLicenseBadge(license) {\n if (!license) return '';\n else if (license === 'MIT License') {\n return '[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)';\n } else if (license === 'GNU GPLv3') {\n return '[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)';\n }\n}", "function renderLicenseBadge(license) {\n if(license === \"none\" ) {\n return \"\";\n }\n else if (license === \"MIT\") {\n return ` \n [\"![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\"]\n `}\n\n else if (license === \"Apache\") {\n return `\n [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)] \n `\n }\n}", "function renderLicenseBadge(license) {\n if (license) {\n switch (license) {\n case 'MIT License':\n return '[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)';\n case 'GPLv3 License':\n return '[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)';\n case 'Apache 2.0 License':\n return '[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)';\n case 'Mozilla Public License 2.0':\n return '[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)';\n default:\n \"\";\n break;\n }\n }\n}", "function renderLicenseBadge(license) {\n if(license == none)\n {\n return \" \";\n }\n else if(licesnse == MIT) {\n `[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)`\n `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`\n }\n else if(licesnse == Apache) {\n `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`\n }\n else if(licesnse == GPL3) {\n `[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)`\n }\n else{\n return \" \";\n }\n}", "function renderLicenseBadge(license) {\n if (!license.licenseSelect) {\n return '';\n };\n \n const badgeReturn = (license.licenseSelect).toString();\n \n if (badgeReturn === 'MIT') {\n return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)'; \n } else if (badgeReturn === 'APACHE') {\n return '[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)';\n } else if (badgeReturn === 'GPL V3') {\n return '[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)';\n } else if (badgeReturn === 'AGPL V3') {\n return '[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)';\n } else if (badgeReturn === 'BSD 3') {\n return '[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)';\n } else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n if(license===\"apache\")return \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\";\nif(license===\"gnu\") return \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\";\nif(license===\"mit\")return \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n}", "function renderLicenseBadge(license) {\n let x = \"\";\n switch(license){\n case \"Apache\":\n x = 'https://img.shields.io/badge/License-Apache%202.0-blue.svg';\n break;\n case \"MIT\":\n x = 'https://img.shields.io/badge/License-MIT-yellow.svg';\n break;\n case \"IBM\": \n x = 'https://img.shields.io/badge/License-IPL%201.0-blue.svg';\n break;\n case \"BSD\": \n x = 'https://img.shields.io/badge/License-IPL%201.0-blue.svg';\n break;\n case \"None\": \n x = '';\n break;\n default: \n x = \"\";\n }\n return x;\n \n}", "function renderLicenseBadge(license) {\n if (license === 'Creative Commons') {\n return '[![License: CC0-1.0](https://licensebuttons.net/l/zero/1.0/80x15.png)]'\n } else if (license === 'MIT') {\n return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)]'\n } else if (license === 'None') {\n return 'License: N/A'\n }\n }", "function renderLicenseBadge(license) {\n if (license =='Apache 2.0' ){\n return ` ![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`\n } else if (license == 'GNU General Public V3.0') {\n return `![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)`\n } else if (license == 'MIT') {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`\n } else if (license =='BSD 3-Clause') {\n return `![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)`\n } else if (license =='Creative Commons Zero') {\n return `![License: CC0-1.0](https://licensebuttons.net/l/zero/1.0/80x15.png)`\n } else if (license =='Eclipse Public License') {\n return `![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)`\n } else if (license =='GNU Lesser General Public License') {\n return `![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)`\n } else if (license =='Mozilla Public License') {\n return `![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)`\n }else if (license =='The Unlicense') {\n return `![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)`;\n } else {\n return \"\";\n }\n\n}", "function renderLicenseBadge(license) {\n if (`${license}` == \"MIT License\") {\n return \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\"\n } else if (`${license}` == \"GNU General Public License V3.0\") {\n return \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\"\n } else if (`${license}` == \"apache License 2.0\") {\n return \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\"\n } else if (`${license}` == \"BSD 3-Clause\") {\n return \"[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\"\n }\n}", "function renderLicenseBadge(license) {\n if(license === 'none') {\n return ''\n } else {\n return `[![${license} license](https://img.shields.io/badge/License-${license}-blue.svg)`\n }\n}", "function renderLicenseBadge(license) {\n let retString = ``;\n switch (license) {\n case 'MIT':\n retString = `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)]`;\n break;\n case 'APACHE 2.0':\n retString = `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)]`;\n break;\n case 'GPL 3.0':\n retString = `[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)]`;\n break;\n case 'BDS 3':\n retString = `[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)]`;\n break;\n default:\n retString = ``;\n }\n return retString;\n}", "function renderLicenseBadge(license) {\n switch(license) {\n case 'Apache': return '[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)';\n case 'BSD': return '[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)';\n case 'GNU': return '[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)';\n case 'IBM': return '[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensource.org/licenses/IPL-1.0)';\n case 'MIT': return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)';\n case 'Mozilla': return '[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)';\n default: return '';\n }\n}", "function renderLicenseBadge(license) {\n if (license !=='none' ) {\n\n return `[![Generic badge](https://img.shields.io/badge/License-${license}-blue.svg?style=flat&logo=appveyor)](https://shields.io/)`\n } else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n var badge = \"\";\n availableLicenses.forEach(licenseInfo => {\n if (licenseInfo.license === license) {\n badge = `[![License](${licenseInfo.badge})](${licenseInfo.link})\\n`;\n } else { return; };\n });\n\n return badge;\n}", "function renderLicenseBadge(license) {\n if(!license) {\n return '';\n };\n return `\n ![License](https://img.shields.io/badge/licenseName-${license}-blue.svg)`\n}", "function renderLicenseBadge(license) { \n const licenseBadge = 'https://img.shields.io/badge/license-' + license.license + '-important.svg'\n if (license.license !== \"\") {\n return `![badge](<${licenseBadge}>)`;\n } else {\n return \"\";\n }\n}", "function LicenseBadge(license) {\n let badge = ' ';\n\n switch (license) {\n case 'GNU AGPLv3':\n badge = '[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)';\n break;\n case 'GNU GPLv3':\n badge = '[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)';\n break;\n case 'GNU LGPLv3':\n badge = '[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)';\n break;\n case 'Mozilla Public License 2.0':\n badge = '[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)';\n break;\n case 'Apache License 2.0':\n badge = '[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)';\n break;\n case 'MIT License':\n badge = '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)';\n break;\n case 'Boost Software License 1.0':\n badge = '[![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)';\n break;\n case 'The Unlicense':\n badge = '[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)';\n break;\n default:\n break;\n\n }\n return badge;\n}", "function renderLicenseBadge(license) {\n if (license !== 'None') {\n return `![License Icon](https://img.shields.io/badge/License-${license}-blue)`;\n }\n else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"MIT\"){\n return `![MIT](https://img.shields.io/badge/license-MIT-brightgreen)`\n }\n else if (license === \"Apache 2.0\"){\n return `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`\n }\n else if (license === \"GNU\") {\n return `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`\n }\n else if (license === \"None\") {\n return `No Licenses`\n }\n}", "function renderLicenseBadge(license) {\n return license.badge ? `${license.badge}\\n` : \"\";\n}", "function renderLicenseBadge(license) {\n if (license === null) {\n return '';\n }\n return `![badge](https://img.shields.io/badge/license-${license}-blue)<br />`;\n}", "function renderLicenseBadge(license) {\n // returns the badge for the corresponding type of license\n switch (license) {\n case \"Apache-2.0\":\n return \"https://img.shields.io/badge/License-Apache%202.0-blue.svg\";\n case \"BSD-3-Clause\":\n return \"https://img.shields.io/badge/License-BSD%203--Clause-blue.svg\";\n case \"GPL-3.0\":\n return \"https://img.shields.io/badge/License-GPL%20v3-blue.svg\";\n case \"LGPL-3.0\":\n return \"https://img.shields.io/badge/License-LGPL%20v3-blue.svg\";\n case \"MIT\":\n return \"https://img.shields.io/badge/License-MIT-yellow.svg\";\n case \"MPL-2.0\":\n return \"https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg7\";\n case \"CC BY 4.0\":\n return \"https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg\";\n case \"EPL-2.0\":\n return \"https://img.shields.io/badge/License-EPL%202.0-red.svg\";\n }\n}", "function renderLicenseBadge(license) {\n if (license === 'none') {\n return ''\n } else {\n return `![license badge](https://img.shields.io/badge/license-${license}-green)`\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"None\") {\n return \"\";\n } else if (license === \"BSD\") {\n return (\n \"![GitHub License](https://img.shields.io/badge/License-\" +\n license +\n \"-green)\"\n );\n } else {\n return (\n \"![GitHub License](https://img.shields.io/badge/License-\" +\n license +\n \"-blue)\"\n );\n }\n}", "function renderLicenseBadge(license) {\n if (license !== \"None\") {\n return `![License](https://img.shields.io/badge/license-${license}-yellowgreen.svg)`;\n }\n return \"\";\n}", "function renderLicenseBadge(license) {\n if (license !== 'None'){\n return `![GitHub license](https://img.shields.io/badge/license-${license}-blue.svg)`\n }\n return '';\n}", "function renderLicenseBadge(license) {\n if (license === \"None\") {\n return \"\";\n }\n return `![badge](https://img.shields.io/badge/license-${license}-brightgreen)`;\n}", "function renderLicenseBadge(license) {\n if (license === `MIT`) {\n return `![License Badge](https://img.shields.io/badge/License-MIT-purple.svg)`;\n } else if (license === `Apache 2.0`) {\n return `![License Badge](https://img.shields.io/badge/License-Apache2.0-purple.svg)`;\n } else if (license === `GNU GPL 3.0`) {\n return `![License Badge](https://img.shields.io/badge/License-GPL3.0-purple.svg)`;\n } else if (license === `Unlicense`) {\n return `![License Badge](https://img.shields.io/badge/License-Unlicense.0-purple.svg)`;\n } else {\n return \"\";\n }\n}", "function renderLicenseBadge(license) {\n\tif (license === \"MIT\") {\n\t\treturn \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n\t}\n\tif (license === \"APACHE 2.0\") {\n\t\treturn \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\";\n\t}\n\tif (license === \"Mozilla\") {\n\t\treturn \"[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\";\n\t}\n\tif (license === \"GNU\") {\n\t\treturn \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\";\n\t}\n\n\treturn \"\";\n}", "function renderLicenseBadge(license) {\n if (license === \"\") {\n return \"\";\n } else {\n return `![${license}](${renderLicenseLink(license)})`\n }\n}", "function renderLicenseBadge(license) {\n if (license === 'GNU General Public License v3.0') {\n\n return '[![License: GNU v3](https://img.shields.io/badge/license-GNU%20v3.0-orange)](https://www.gnu.org/licenses/gpl-3.0.en.html)';\n\n } else if (license === 'Apache-2.0') {\n return '[![License: Apache](https://img.shields.io/badge/license-Apache%2.0-blue)](https://http://www.apache.org/licenses/LICENSE-2.0)';\n\n } else if (license === 'MIT') {\n return '[![License: MIT] (https://img.shields.io/badge/license-MIT-green)](https://opensource.org/licenses/MIT)';\n\n } else {\n return \"\";\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"Apache-2.0\") {\n return `[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`\n }\n else if (license === \"MPL-2.0\") {\n return `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licences/MPL-2.0)`\n }\n else if (license === \"MIT\") {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licences/MIT)`\n }\n else {\n return \"\";\n }\n\n}", "function renderLicenseBadge(license) {\n if(license == 'MIT') {\n return `![Github License](https://img.shields.io/badge/license-${license}-brightgreen)`\n } else if (license == 'AUR') {\n return `![GPLv3 License](https://img.shields.io/badge/license-${license}-blue)`\n } else if (license == 'GPL') {\n return `![AGPL License](https://img.shields.io/badge/license-${license}-brightgreen)`\n } else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n if (license === 'Apache') {\n return '[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)]';\n } else if (license === 'SIL') {\n return '[![License: Open Font-1.1](https://img.shields.io/badge/License-OFL%201.1-lightgreen.svg)]';\n } else if (license === 'GNUAGPLV3') {\n return '[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)]';\n } else if (license === 'ISC') {\n return '[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)]';\n } else if (license === 'MIT') {\n return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)]';\n } else {\n return ''\n }\n}", "function renderLicenseBadge(license) {\n if (license !== \"None\") {\n return `![GitHub license](https://img.shields.io/badge/license-${license}-blue.svg)`\n }\n return ''\n }", "function renderLicenseBadge(license) {\n if (license === 'Apache 2.0') {\n return \"## License \" + \"<br />\" + \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\"\n }\n if (license === 'MIT') {\n return \"## License \" + \"<br />\" + \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\"\n }\n if (license === 'GPL V3') {\n return \"## License \" + \"<br />\" + \"[![License: GPL V3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)\"\n }\n if (license === 'MPL 2.0') {\n return \"## License \" + \"<br />\" + \"[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\"\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"MIT\") {\n return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)'\n }\n else if (license === \"GNU\")\n return '![gpl](https://img.shields.io/badge/license-GPL%203.0-green)';\n else {\n return \"\";\n }\n}", "function renderLicenseBadge(license) {\n if (license === 'Mozilla') {\n return `![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)`;\n } else if (license === 'Apache') {\n return `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`;\n } else if (license === 'MIT') {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`;\n } else {\n return`('Please enter a valid license.')`;\n }\n}", "function renderLicenseBadge(license) {\n\tconst licenses = [\n\t\t{\n\t\t\tlicense: 'MIT',\n\t\t\tbadge: 'https://img.shields.io/github/license/Naereen/StrapDown.js.svg',\n\t\t},\n\t\t{\n\t\t\tlicense: 'APACHE 2.0',\n\t\t\tbadge: 'https://img.shields.io/badge/License-Apache%202.0-blue.svg',\n\t\t},\n\t\t{\n\t\t\tlicense: 'GPL 3.0',\n\t\t\tbadge: 'https://img.shields.io/github/license/Naereen/StrapDown.js.svg',\n\t\t},\n\t\t{\n\t\t\tlicense: 'BSD 3',\n\t\t\tbadge: 'https://img.shields.io/badge/License-GPLv3-blue.svg',\n\t\t},\n\t\t{\n\t\t\tlicense: 'None',\n\t\t\tbadge: 'https://img.shields.io/badge/License-BSD%203--Clause-blue.svg',\n\t\t},\n\t]\n\tif (license) {\n\t\tif (license) {\n\t\t\tvar badge\n\t\t\tlicenses.map((v, _) => {\n\t\t\t\tlicense == v.license ? (badge = `![License](${v.badge})`) : null\n\t\t\t})\n\t\t\treturn badge\n\t\t} else {\n\t\t\treturn ``\n\t\t}\n\t} else {\n\t\treturn ``\n\t}\n}", "function renderLicenseBadge(license) {\n if (license === \"none\") {\n return \"\";\n } else {\n return `![github license](https://img.shields.io/badge/license-${license}-blueviolet.png)`;\n }\n}", "function renderLicenseBadge(license) {\n if (license === \"Apache\") {\n return `[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`\n } else if (license === \"Mozilla\") {\n return `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`\n } else if (license === \"MIT\") {\n return `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`\n } else if (license === \"GNU\") {\n return `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`\n } else if (license === \"Boost\") {\n return `[![License](https://img.shields.io/badge/License-Boost_1.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)`\n } else if (license === \"None\") {\n return ``\n }\n}", "function renderLicenseBadge(license) {\n licenseObj = {\n MIT:\"![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\",\n Apache:\"![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)\",\n }\n return licenseObj[license];\n}", "function renderLicenseBadge(license) {\n\n return ` ${license}`\n }", "function renderLicenseBadge(license) {\n if (license !== '') {\n return `![](https://img.shields.io/badge/license-${license.replace(/ /g, \"%20\")}-blue?style=flat-square)`;\n } else {\n return ''\n }\n}", "function renderLicenseBadge(license) {\n \n if (license != 'None') {\n return `![image](https://img.shields.io/badge/license-${license}-blue.svg)`\n } else {\n return `` \n }\n}", "function renderLicenseBadge(license) {\n switch (license) {\n case \"None\":\n url = \"\"\n break;\n case \"Apache License 2.0\":\n url = apache\n break;\n case \"GNU General Public License v3.0\":\n url = gnu\n break;\n case \"MIT\":\n url = mit\n break;\n case \"BSD 2-Clause Simplified License\":\n url = bsd2\n break;\n case \"BSD 3-Clause New or Revised\":\n url = bsd3\n break;\n case \"Boost Software License 1.0\":\n url = bsl1\n break;\n case \"Creative Commons Zero v1.0 Universal\":\n url = ccz1\n break;\n case \"Eclipse Public License 2.0\":\n url = epl\n break;\n case \"GNU Affero General Public License v3.0\":\n url = gnu3\n break;\n case \"GNU General Public License v2.0\":\n url = gnu2\n break;\n case \"GNU Lesser General Public License v2.1\":\n url = gnulesser\n break;\n case \"Mozilla Public License 2.0\":\n url = mozilla\n break;\n case \"The Unlicense\":\n url = theunlicense\n break;\n }\n return url\n}", "function renderLicenseBadge(data) {\n const licenseType = data.license[0];\n let licenseString = \" \"\n if (licenseType === \"MIT\") {\n licenseString = `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`\n };\n if (licenseType === \"Apache License 2.0\") {\n licenseString = `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`\n };\n if (licenseType === \"GNU General Public License 3.0\") {\n licenseString = `![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)`\n };\n return licenseString\n}", "function renderLicenseBadge(license) { }", "function renderLicenseBadge(data) {\n console.log(data.license);\n if(data.license == \"MIT\") {\n return \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\"\n } else if (data.license == \"Apache 2.0\") {\n return \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\"\n } else if (data.license == \"GNU GPL v3.0\") {\n return \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\"\n } else {\n return \"\"\n };\n}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function renderLicenseBadge(license) {}", "function determineBadge (licenseChoices) {\n let badge = \"\";\n switch (licenseChoices) {\n case \"MIT\":\n badge = \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n break;\n case \"APACHE 2.0\":\n badge = \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)]\";\n break;\n case \"GPL 3.0\":\n badge = \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\";\n break;\n case \"BSD3\":\n badge = \"[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\";\n break;\n default:\n badge = \"\";\n }\n return badge;\n}", "function renderLicenseBadge(license) {\n if (license === 'Apache 2.0') {\n return `![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)`;\n } else if (license === 'BSD 2-Clause') {\n return `![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)`;\n } else if (license === 'BSD 3-Clause') {\n return `![License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)`;\n } else if (license === 'GLP 3.0') {\n return `![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)`;\n } else if (license === 'MIT') {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`;\n } else {\n return '';\n }\n}", "function renderLicenseBadge(license) {\n if(!license) {\n return '';\n } \n const newLis = license[0];\n const lis = newLis.split(\" \");\n const finalLis = lis.join('%20')\n\n return `\n ![badge](https://img.shields.io/badge/license-${finalLis}-brightgreen)\n `;\n}", "function renderLicenseBadge(license) {\n if (license === \"Apache\") {\n return '![Badge](https://img.shields.io/badge/License-Apache%202.0-blue.svg)'\n } else if (license === \"MIT\") {\n return '![Badge](https://img.shields.io/badge/License-MIT-yellow.svg)'\n }; \n}", "function renderLicenseBadge(license) {\n switch (license) {\n case \"Apache\":\n return `![Apache Badge](https://img.shields.io/badge/License-Apache-blue)`;\n case \"GNU\":\n return `![GNU Badge](https://img.shields.io/badge/License-GNU-red)`;\n case \"MIT\":\n return `![MIT Badge](https://img.shields.io/badge/License-MIT-green)`;\n default:\n return \"\";\n }\n}", "function renderLicenseBadge(license) {\n if (license === 'MIT') {\n return `![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)`;\n }else if (license === 'ISC') {\n return `![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)`;\n }else if (license === 'BSD 2-Clause') {\n return `![License: BSD 2-Clause](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)`;\n }else {\n return ` `; \n }\n}", "function renderLicenseBadge(license) {\n if (!license) {\n return '';\n }\n\n return `\n [![License: ${license}](https://img.shields.io/badge/License-${license}-blue.svg)](https://opensource.org/licenses/${license})\n `\n}", "function renderLicenseBadge(license) {\n const splitLicense = license.split(\"-\");\n return `![${splitLicense[0]} Badge](https://img.shields.io/badge/license-${splitLicense[0]}-blue.svg)`\n}", "function renderLicenseBadge(license) {\n var images;\n\n switch(license) {\n case 'MIT License':\n images = 'https://img.shields.io/badge/License-MIT-yellow.svg';\n break;\n case 'GNU Lesser General Public License v3.0':\n images = 'https://img.shields.io/badge/License-LGPL%20v3-blue.svg';\n break;\n case 'Mozilla Public License 2.0':\n images = 'https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg';\n break;\n case 'GNU Affero General Public License v3.0':\n images = 'https://img.shields.io/badge/License-AGPL%20v3-blue.svg';\n break;\n case 'The Unlicense':\n images = 'https://img.shields.io/badge/license-Unlicense-blue.svg';\n break;\n case 'Apache License 2.0':\n images = 'https://img.shields.io/badge/License-Apache%202.0-blue.svg';\n break;\n case 'GNU General Public License v3.0':\n images = 'https://img.shields.io/badge/License-GPLv3-blue.svg';\n break;\n default:\n images = '';\n }\n return images;\n}", "function licenseBadge(value) {\n if (value === \"GNU GPLv3\") {\n return \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\";\n } else if (value === \"GNU LGPLv3\") {\n return \"[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)\";\n } else if (value === \"Mozilla\") {\n return \"[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\";\n } else if (value === \"MIT\") {\n return \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n } else if (value === \"Apache\") {\n return \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\";\n } else {\n return \"[![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)\";\n }\n}", "function renderLicenseBadge(license) {\n if(LICENSE_DATA[license])\n return `[![License](${LICENSE_DATA[license].badge.img})](${LICENSE_DATA[license].badge.url})`;\n }", "function renderLicenseBadge(license) {\n let badgeLabel = license.replace(\" \", \"&ensp;\");\n return `\n [![Generic badge](https://img.shields.io/badge/License-${badgeLabel}-green.svg)](${renderLicenseLink(license)})\n `\n}", "function getLicenceBadge(licence) {\n\n switch (licence) {\n case \"Eclipse Public License 1.0\":\n return '[![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)';\n case \"GNU GPL v3\":\n return '[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)';\n case \"MIT License\":\n return '[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)';\n case \"Mozilla Public License 2.0\":\n return '[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)';\n }\n\n}", "function renderLicenseBadge(licenses) {\n if (licenses === \"none\") {\n return \"\";\n } else {\n return `![Github License](https://img.shields.io/badge/license-${licenses}-green)`;\n }\n}", "function renderLicenseBadge(data) {\n let licenseBadge;\n switch (data.license) {\n case \"Apache 2.0\":\n licenseBadge =\n \"![badge](https://img.shields.io/badge/License-Apache_2.0-blue?style=plastic)\";\n break;\n case \"GNU 3.0\":\n licenseBadge =\n \"![badge](https://img.shields.io/badge/License-GNU_3.0-blue?style=plastic)\";\n break;\n case \"MIT\":\n licenseBadge =\n \"![badge](https://img.shields.io/badge/License-MIT-blue?style=plastic)\";\n break;\n case \"Mozilla\":\n licenseBadge =\n \"![badge](https://img.shields.io/badge/License-Mozilla-blue?style=plastic)\";\n break;\n case \"None\":\n licenseBadge = \"\";\n break;\n }\n return licenseBadge;\n}", "function renderLicenseBadger(license) {\r\n if (license !== \"none\") {\r\n return `![GitHub license](https://img.shields.io/badge/license-${license}-blue.svg)`\r\n } else {\r\n console.log(\"a license was not selected\")\r\n return ''\r\n }\r\n}", "function renderLicenseBadge(license) {\n return `\n ![github License](https://img.shields.io/badge/license-${license}-blue.svg)\n `\n}", "function renderLicenseSection(license) {\n\n let licenseBadge = \"\";\n\n if(license != \"\")\n {\n licenseBadge = renderLicense(license);\n }\n\n return licenseBadge;\n\n}", "function renderLicenseBadge() {\n if (!id || id == \"None\") {\n return '';\n } else {\n return `![Badge](https://img.shields.io/badge/License-${id.replace(/-/g, '%20')}-orange)`;\n }\n}", "function renderLicenseBadge(license) {\n return '#LicenseBadge\\n\\nhttps://img.shields.io/github/issues/soobin-lim/homework9.git';\n}", "function renderLicenseBadge(license, licenseObj) {\n if (!license) {\n return \"\";\n } else if (license) {\n const licenseBadgeUrl = licenseObj[license].badge;\n const licenseLinkUrl = licenseObj[license].link;\n return `${licenseBadgeUrl}(${licenseLinkUrl})`;\n } \n}", "function renderLicense(license) {\n switch(license[0]) {\n case `GNU AGPLv3`:\n badge = \"[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\";\n link = \"https://www.gnu.org/licenses/agpl-3.0\";\n break;\n case `GNU GPLv3`:\n badge = \"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\";\n link = \"https://www.gnu.org/licenses/gpl-3.0\";\n break;\n case `GNU LGPLv3`:\n link = \"https://www.gnu.org/licenses/lgpl-3.0\";\n badge = \"[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)\";\n break;\n case `Mozilla Public License 2.0`:\n link = \"https://opensource.org/licenses/MPL-2.0\";\n badge = \"[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\";\n break;\n case `Apache License 2.0`:\n link = \"https://opensource.org/licenses/Apache-2.0\";\n badge = \"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\";\n break;\n case `MIT License`:\n link = \"https://opensource.org/licenses/MIT\";\n badge = \"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\";\n break;\n case `Boost Software License 1.0`:\n link = \"https://www.boost.org/LICENSE_1_0.txt\";\n badge = \"[![License](https://img.shields.io/badge/License-Boost%201.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)\";\n break;\n case `The Unlicense`:\n link = \"https://unlicense.org/\";\n badge = \"[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)\";\n break;\n default:\n badge = \"\";\n link = \"\";\n }\n // Return the respective values for badge and link\n return {\n badge,\n link,\n };\n}" ]
[ "0.8846047", "0.87373054", "0.8734679", "0.8721812", "0.87123156", "0.8703444", "0.8692887", "0.8675393", "0.8668157", "0.8668149", "0.86367834", "0.8634979", "0.860582", "0.8603878", "0.86032885", "0.86013776", "0.8588732", "0.8587691", "0.8566995", "0.85597104", "0.8559633", "0.85556954", "0.85542524", "0.8541697", "0.8537642", "0.8531557", "0.85313886", "0.8520771", "0.8507006", "0.84911907", "0.84823036", "0.8478015", "0.84766346", "0.84763104", "0.8475394", "0.847155", "0.84650487", "0.8461157", "0.8455405", "0.8448508", "0.8446883", "0.8446846", "0.84454185", "0.84403557", "0.8439158", "0.8438705", "0.84339404", "0.8427738", "0.84186476", "0.8414669", "0.84070796", "0.8406456", "0.8404414", "0.84024537", "0.84024465", "0.839216", "0.8389982", "0.838431", "0.83837765", "0.8382206", "0.83800715", "0.8374195", "0.83737016", "0.8365562", "0.8355246", "0.8354658", "0.83507", "0.83476025", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.83440137", "0.8342144", "0.8334768", "0.83243537", "0.83240867", "0.83134377", "0.83081764", "0.8290282", "0.82377577", "0.8214397", "0.81862676", "0.816685", "0.81660897", "0.81642085", "0.813478", "0.8130613", "0.8128796", "0.81040305", "0.81008357", "0.8097388", "0.8091072", "0.8077654", "0.7988303" ]
0.8452248
39
Function to setup the response markDown skeleton and answer placeholders TODO: Create a function to initialize app
function returnMarkDown(responses) { //Create a destructuring the object for the responses for each user entry const {project, description, installation, usage, licenses, tests, contributing, gitHub, email } = responses; const licenseString = renderLicenseBadge(licenses); return ` # Professional README: ${project} ## Description of Project: * ${description} ## Table of Contents * [Installation](#installation) * [Usage](#usage) * [License](#license) * [Contributing](#contributing) * [Tests](#tests) * [Questions](#questions) ## Installation * The application will be invoked in your designated command-line by using the following command: node index.js * ${installation} ## Usage * ${usage} ## License * ${licenseString} * If you need further help indeciding a license to choose for your application, please checkout the following website: [https://choosealicense.com/](https://choosealicense.com/). ## Contributing * ${contributing} ## Tests * ${tests} * During testing, I went through the series if questions and received a generated README.md file with the results from my input. ## Questions * For any questions about this repo, please contact me at: [GitHub Username:](https://${gitHub}) * For any addition qestions, you can also reach out to me by email at: ${email}` }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n inquirer\n .prompt(questions)\n .then(appData => {\n console.log(appData);\n generateMarkdown(appData);\n });\n}", "function init() {\n // Pass in questions to inquirer.prompt and then grabbing the user answers\n inquirer.prompt(questions).then(response => {\n console.log(response)\n // Takes blueprint of writeToFile and passes in values of 'readmeGenerator' and generateMarkdown(response)\n writeToFile(\"readmeGenerator.md\", generateMarkdown(response));\n })\n}", "function init() {\n const response = inquirer\n .prompt(questions)\n .then(function(response) { \n // created an object to save all user responses\n const data ={}\n data.title = response.projectName;\n data.description = response.description;\n data.installation = response.installation;\n data.usage = response.usage;\n data.credits = response.credits;\n data.license = response.license;\n data.badges = response.badges;\n data.contributors = response.contributors;\n data.tests = response.tests;\n const readMeString = generateMarkdown(data);\n writeToFile(readMeString);\n});\n}", "function init() {\n questions()\n// Write the user response to a file \n .then(response => {\n writeToFile('README.md', generateMarkdown(response));\n console.log('README success!')\n });\n}", "function init() {\n inquirer.prompt(questions).then((response) => {\n console.log(response);\n let readmeText = gen.generateMarkdown(response);\n writeToFile(\"./generated/readme.md\", readmeText);\n });\n}", "function init()\n{\n\n inquirer.prompt(questions)\n .then(inquirerResponses =>{\n console.log(\"inquirerResponses: \", inquirerResponses)\n writeToFile(\"README.md\", generateMarkdown ({...inquirerResponses}));\n\n });\n}", "function init() {\n inquirer.prompt(questions).then(answers=>{\n \n const response= generateMarkdown(answers);\n console.log(answers);\n writeFile(\"README.md\",response)\n\n});\n}", "function init() {\n inquirer.prompt(questions).then(answers => {\n let appTitle = answers.appTitle.trim();\n let appDescription = answers.appDescription ? answers.appDescription.trim() : \"\";\n let packageName = answers.packageName.trim();\n let openui5 = answers.openui5.trim();\n let appType = answers.type.trim();\n let splitApp = appType === \"split\";\n let routing = answers.routing || splitApp;\n\n ui5init.createFolders();\n ui5init.createComponent(packageName, routing);\n ui5init.createManifest(packageName, appType, routing);\n ui5init.createIndex(packageName, appTitle);\n ui5init.createI18n(appTitle, appDescription);\n jsGenerator.generateFile(\"App\", packageName, jsGenerator.types.controller);\n viewGenerator.generateAppView(packageName, splitApp, routing);\n if (routing || splitApp) {\n jsGenerator.generateFile(\"Master\", packageName, jsGenerator.types.controller);\n viewGenerator.generateView(\"Master\", packageName);\n }\n if (splitApp) {\n jsGenerator.generateFile(\"Detail\", packageName, jsGenerator.types.controller);\n viewGenerator.generateView(\"Detail\", packageName);\n }\n\n runtime.createPackage(appTitle, appDescription);\n runtime.createServer(openui5);\n runtime.createGruntEnvironment();\n\n console.log(`Application \"${appTitle}\" initialized.`);\n console.log(`Run npm install && npm start to install and start the app.`);\n });\n}", "function init() {\n console.log(\"Starting the program ........\"); \n inquirer.prompt(questions)\n .then(response => {\n console.log(\"user answers\", response); \n //convert int oa redme friendly format \n // console.log(generateMarkdown(response));\n writeToFile(\"SampleReadME.md\", generateMarkdown(response));\n })\n }", "function init() {\n inquirer.prompt(questions)\n .then((response) => {\n console.log('Generating README Now!');\n writeToFile('README.md', generateMarkdown({... response}))\n});\n}", "function init() \n{\n inquirer\n .prompt(questions)\n .then(response => writeToFile(\"generatedREADME.md\", generateMarkdown(response)));\n \n}", "function init() {\n inquirer.prompt(questions).then((response) => {\n console.log(response)\n const fileName = `${response.username.toLowerCase().split('').join('')}.md`;\n\n writeFile(fileName, generateMarkdown({ ...response }))\n });\n\n}", "function init() {\n inquirer.prompt(questions).then((data) => {\n console.log(data);\n let answers = markdown(data);\n console.log(\"This is the template\" + answers);\n writeToFile(\"README.md\", answers)\n })\n}", "function init() {\n inquirer.prompt(questions).then((answers) => {\n\n const response = markdown(answers);\n console.log(answers);\n\n writeToFile('README.md', response);\n })\n }", "function init() {\n inquirer.prompt(questions).then(response => {\n console.log(response); \n writeToFile(\"readme.md\" , generateMd(response))\n \n }\n \n )}", "function init() {\n prompt(questions).then(answers => {\n const response = generateMarkdown(answers);\n console.log(answers);\n\n writeToFile(\"README.md\", response)\n }).catch((err) =>\nconsole.log(err))\n }", "function init() {\n inquirer.prompt(questions).then((answers) => {\n const response = generatorMarkdown(answers);\n console.log(answers);\n\n writeToFile(\"README.MD\", response);\n });\n}", "function init() {\n inquirer.prompt(questions)\n .then(function(data){\n writeToFile(\"AppREADME.md\", generatorMarkdown(data));\n console.log(data);\n })\n}", "function init() {\n //got code from NPM website https://www.npmjs.com/package/inquirer\n inquirer\n .prompt(questions)\n .then(answers => {\n writeToFile('TestReadMe.md', generateMarkDown({\n ...answers\n }));\n })\n .catch(error => {\n if (error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n }\n });\n\n}", "function init() {\n inquirer.prompt(questions).then(response => {\n writeToFile(\"README.md\", generateMarkdown({ ...response}))\n })\n}", "function init() {\n inquirer.prompt(questions).then(answers => {\n \n const response = generateMarkdown(answers);\n console.log(answers);\n \n writeToFile(\"README.md\", response);\n})\n}", "function init() {\n inquirer.prompt(questions).then((inquirerResponses) => {\n console.log('applying questions to README.md..');\n //message in command line to show readme is being generated\n writeToFile('README.md', generateMarkdown({ ...inquirerResponses }));\n //calling writeToFile function where README.md is destination file and logs info using generateMarkdown file\n });\n }", "function init() {\n inquirer\n .prompt([\n {\n type: 'input',\n name: 'title',\n message: questions[0],\n },\n {\n type: 'input',\n name: 'description',\n message: questions[1],\n },\n {\n type: 'input',\n name: 'installation',\n message: questions[2],\n },\n {\n type: 'input',\n name: 'usage',\n message: questions[3],\n },\n {\n type: 'input',\n name: 'contributing',\n message: questions[4],\n },\n {\n type: 'input',\n name: 'test',\n message: questions[5],\n },\n {\n type: 'list',\n name: 'license',\n message: questions[6],\n choices:['MIT', 'APACHE 2.0', 'GPL 3.0', 'BSD 3', 'None'],\n },\n {\n type: 'input',\n name: 'github',\n message: questions[7],\n \n },\n {\n type: 'input',\n name: 'email',\n message: questions[8],\n },\n ])\n .then((data) => {\n console.log('Responses:',data)\n const fileText = genMarkdown.generateMarkdown(data)\n writeToFile(`${data.title}README.md`, fileText)\n })\n}", "async function init() {\n try {\n const userResponses = await inquirer.prompt(questions);\n\n // Referencing API.js\n const userInfo = await api.getUser(userResponses);\n\n // Pass inquirer data and api data to markdown\n const markdown = generateMarkdown(userResponses, userInfo);\n\n // Write markdown\n await writeFileAsync('ExampleREADME.md', markdown);\n\n console.log('Successfully wrote to README.md');\n\n }\n catch (error) {\n console.log(error);\n }\n}", "function init(){\n inquirer.prompt(managerQuestions)\n .then(answers=>{\n generateTemplate();\n managerData(answers);\n \n })\n .catch(error => {\n if (error) {\n console.log(error);}\n }\n )\n}", "function init() {\n inq.prompt(questions).then((res) => {\n // console.log(res);\n\n const licBadge = checkLicense(res);\n const returnMD = mark.generateMarkdown(res);\n // console.log(returnMD);\n\n // function to write README file\n fs.writeFileSync(\"genReadme/README.md\", returnMD, \"utf8\");\n });\n}", "function handleWelcomeRequest(response) {\n var whichCityPrompt = \"Which city would you like tide information for?\",\n speechOutput = {\n speech: \"<speak>Welcome to Tide Pooler. \"\n + \"<audio src='https://s3.amazonaws.com/ask-storage/YodaSpeaker/OceanWaves.mp3'/>\"\n + whichCityPrompt\n + \"</speak>\",\n type: AlexaSkill.speechOutputType.SSML\n },\n repromptOutput = {\n speech: \"I can lead you through providing a city and \"\n + \"day of the week to get tide information, \"\n + \"or you can simply open Tide Pooler and ask a question like, \"\n + \"get tide information for Seattle on Saturday. \"\n + \"For a list of supported cities, ask what cities are supported. \"\n + whichCityPrompt,\n type: AlexaSkill.speechOutputType.PLAIN_TEXT\n };\n\n response.ask(speechOutput, repromptOutput);\n}", "function init() {\n prompt(questions).then(answers => {\n\n const response = generateMarkdown(answers)\n writeToFile('README.md',response);\n \n console.log('Readme.md is being generated...')\n })\n}", "function init() {\n inquirer.prompt(questions)\n .then(inquirerResponses => {\n console.log(inquirerResponses)\n writeToFile('readMe.md',generateMarkdown({ ...inquirerResponses }))\n }).catch(err => {\n if (err) {\n console.log(err)\n }\n })\n}", "function init() {\n inquirer.prompt(questions)\n .then((data) => generateReadMe(`${fileName}.md`, generateMarkdown(data)))\n .then(() => console.log(\" README.mde created successfully\"))\n .catch((err) => console.error(err));\n}", "function init() {\n inquirer\n .prompt(questions)\n .then((data) => \n writeToFile(fileName, generateMarkdown(data))\n // const newFile = `# Project Title: ${response.projectTitle}`;\n // console.log(`${response.projectTitle}`);\n );\n // .catch((err) => console.error(err));\n}", "function init() {\n inquirer\n .prompt(questions)\n .then((readmeData) => generateMarkdown(readmeData))\n .then((readmeText) => writeReadme(readmeText))\n .then((writeReadmeResponse) => console.log(writeReadmeResponse))\n .catch((err) => console.log(err));\n}", "function init() {\n inquirer.prompt(questions).then(function (inquirerResponses) {\n console.log(\"Thank you! Generating your README.md File...\");\n writeToFile(\"README.md\", generateMarkdown({ ...inquirerResponses }));\n })\n}", "function init() { \n inquirer.prompt(questions).then((responses) => {\n console.log(\"Generating Readme\");\n writeToFile(\"README.md\", generateMarkdown(responses))\n });\n}", "function init() {\n inquirer.prompt(questions)\n .then((inquirerResponses) => {\n console.log(\"Generating README...\");\n writeToFile(\"README.md\", generateMarketdown({...inquirerResponses}));\n })\n}", "function init() {\n inquirer\n .prompt(questions)\n .then((answers) => {\n writeToFile(\"Generate-README.md\", generateMarkdown(answers));\n })\n .catch((error) => {\n if (error.Error) {\n // Prompt could not be rendered in the current environment\n } else {\n // Something else went wrong\n }\n });\n}", "function init() {\n inquirer\n .prompt([\n {\n type: 'input',\n message: questions[0],\n name: 'title',\n },\n {\n type: 'input',\n message: questions[1],\n name: 'description',\n },\n {\n type: 'input',\n message: questions[2],\n name: 'installation',\n },\n {\n type: 'input',\n message: questions[3],\n name: 'usage',\n },\n {\n type: 'input',\n message: questions[4],\n name: 'contribution',\n },\n {\n type: 'input',\n message: questions[5],\n name: 'testing',\n },\n {\n type: 'input',\n message: questions[6],\n name: 'github',\n },\n {\n type: 'input',\n message: questions[7],\n name: 'email',\n },\n {\n type: 'list',\n message: questions[8],\n choices: ['MIT', 'Mozilla', 'Apache'],\n name: 'license',\n },\n ])\n .then((response) => \n writeToFile(\"README.md\", generateMarkdown(response))\n );\n}", "function init() {\n inquirer.prompt(questions).then((response) => {\n writeToFile(\"README.md\", markDown({ ...response }));\n });\n}", "function init() {\n inquirer.prompt(questions).then(inquirerResponses => {\n console.log('generatingReadMe')\n writeToFile('README.md', generateMarkdown({ ...inquirerResponses }))\n })\n}", "function init() {\n\ninquirer\n.prompt(questions)\n.then(function(response) {\n console.log(response)\n const queryUrl = `https://api.github.com/users/${response.username}`;\n \naxios\n.get(queryUrl)\n.then(function(res) {\n\n const readmeTemplate = `\n# ${response.rmTitle}\n\n## Licensed Under\n${response.rmLic}\n\n## Table Contents\n${response.cont}\n\n## Installation Instruction\n\\`\\`\\`\n${response.inst}\n\\`\\`\\`\n\n## Description\n\\`\\`\\`\n${response.rmDesc}\n\\`\\`\\`\n\n## Questions\n${response.qs}\n\n## Contributor\n${response.con}\n\n `\n writeToFile(response.rmTitle, readmeTemplate, err=> console.log(err|| \"Success!\")); \n console.log(res.data);\n\n });\n});\n\n}", "function init() {\n inquirer.prompt(questions)\n .then((response) => {\n const createFile = generateMarkdown(response);\n writeToFile(createFile);\n })\n}", "function init() {\n inquirer.prompt(questions)\n .then(function(data) {\n console.log(data)\n const markDown = generateMarkdown(data);\n writeToFile(\"generatedREADME.md\", markDown)\n });\n\n\n}", "function init() {\n inquirer\n .prompt(questions)\n .then(response => writeToFile('readme sample.md', generateMarkdown(response)));\n}", "function init() {\n inquirer.prompt(questions)\n .then(function(answers) {\n console.log('answers from the prompt', answers);\n // All data returned from user input will be generated in a file called \"newREADME.md\"\n writeReadMe(\"newREADME.md\", generateMarkdown(answers));\n });\n}", "function init() {\n inquirer.prompt(questions).then(function(answer){\n const template = `\n# ${answer.projectName}\n## Table of Contents:\n* [Description](#description)\n* [Installation](#installation-instructions)\n* [Usage](#usage-instructions)\n* [Contribution](#contribution-guidelines)\n* [Test](#test-instructions)\n* [License](#license-type)\n* [Contact](#contact-information)\n\n## Descsription:\n${answer.description}\n\n## Installation Instructions: \n${answer.install}\n\n## Usage Instructions: \n${answer.usage}\n\n## Contribution Guidelines: \n${answer.contributionGuidelines}\n\n## Test Instructions: \n${answer.testInstructions}\n\n## License Type: \n${answer.license}\n \n## Contact Information:\n\nGithub Username: ${answer.github} \n\nGithub: https://github.com/${answer.github}\n\nEmail Address: ${answer.email} \n` \n\n writeToFile(answer.projectName, template)\n })\n}", "function initializeApp () {\n makeQuiz();\n eventHandlers();\n}", "function init() {\n inquirer.prompt(questions)\n .then((data) => {\n console.log('Generating README...');\n return generateMarkdown(data);\n })\n .then((template) => {\n writeToFile('README.md', template)\n })\n .catch((err) => {\n console.log(err);\n })\n}", "function init() {\n // begin asking the user questions\n inquirer.prompt(questions)\n // collect answers\n .then((answers) => {\n // push answers into\n writeToFile(\"README.md\", generateMarkdown(answers))\n }\n )\n}", "function init() {\n inquirer.prompt(questions).then((answer) => {\n console.log(answer);\n writeToFile(\"README.md\", generateMarkdown({...answer}));\n });\n}", "function init() {\n inquirer.prompt(questions)\n .then(answers => { \n writeToFile(\"README.md\", generateMarkdown({...answers}))\n });\n}", "function init() {\n inquirer.prompt(questions)\n .then(function (data) {\n writeToFile(\"README.md\", genorateMarkdown(data));\n console.log(data)\n })\n}", "function init() {\n questions() \n .then((answers) => {\n writeToFile(\"./README.MD\", generateMarkdown(answers));\n }\n \n )\n}", "function init() {\n inquirer.prompt(questions).then((answer) => {\n // this is the console.log indicating the README actually being written/generated\n console.log('Generating README...');\n writeToFile('README.md', generateMarkdown({...answer}));\n })\n}", "async function init() {\n \n const response = await inquirer.prompt(questions);\n console.log(response);\n\n const markdown = generateMarkdown(response);\n \n\n\n await writeToFile(\"./README.md\", markdown);\n\n}", "function init() {\n fetch(\"/faq\")\n .then(checkStatus)\n .then((resp) => resp.json())\n .then(populate)\n .catch(handleError);\n }", "function init() {\n inquirer.prompt(questions).then((res) => {\n writeToFile('ReadMe.md', generateMarkdown({...res}));\n }).catch(e => console.log(e));\n }", "function init() {\n inquirer\n .prompt(\n questions\n /* Pass your questions in here */\n )\n .then(answers => {\n const returnValue = generateMarkdown(answers)\n writeToFile(\"readme.md\", returnValue)\n // Use user feedback for... whatever!!\n })\n}", "function init() {\n inquirer.prompt(questions)\n .then((inquirerAnswers) => {\n writeToFile(\"./README.md\", generateMarkdown({...inquirerAnswers}))\n })\n}", "function init() {\n console.log(`\n =========================================================================\n ~~~~~~~~~~~~ Hello there! Welcome to a README.md Generator ~~~~~~~~~~~~ \n =========================================================================\n Answer the following questions regarding your current Project. Required \n questions will be made known by \"(Required)\" being included at the end of\n the question. Upon completing all necessary questions a README file will \n be created for your use. \n =========================================================================\n `\n )\n return inquirer\n .prompt (reqQuestions, answers)\n}", "function init() {\n questions()\n .then(questionsData => {\n return generateMarkdown('questionsData');\n })\n .then(writeMarkDown => {\n return writeFile(writeMarkdown);\n })\n}", "function init() {\n inquirer.prompt(questions)\n .then((data) => {\n const markDown = gm.generateMarkdown(data);\n writeToFile(\"./generated-README/README.md\", markDown);\n })\n\n}", "function getWelcomeResponse(callback) {\n // If we wanted to initialize the session to have some attributes we could add those here.\n var sessionAttributes = {};\n var cardTitle = \"Open Study\";\n var options = {\n host: 'api.quizlet.com', // connect to quizlet API\n port: 443,\n path: '/2.0/sets/67672902/terms?client_id=yqtnDKFeuF', // for different sets, all that would need to be changed would be the set id number. \n // the connection is the same using a public client_id for auth\n method: 'GET'\n };\n\n var req = https.request(options, function(res) {\n var body = '';\n console.log('Status:', res.statusCode); // check code for connection\n console.log('Headers:', JSON.stringify(res.headers)); // parse the headers \n res.setEncoding('utf8'); // encode the data properly\n res.on('data', function(chunk) {\n body += chunk; // for each chunk of data, append it to our body\n });\n res.on('end', function() {\n console.log('Successfully processed HTTPS response'); // if our website connection is good, log it! \n\n body = JSON.parse(body); // parse the data from the api to the string that Javascript can manipulate\n\n console.log(body); // log the data just for debug\n\t\t\t\tfor(var i = 0; i < Object.keys(body).length; i++){\n speechOutput += \"Term: \" + body[i].term + \". \" + \" Definition: \" + body[i].definition + \". \"; // output each defintion and term based off the length of body\n\t\t\t\t}\n callback(sessionAttributes,\n buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession));\n\n });\n });\n req.end(); // actually executes our code\n \n var speechOutput = \" \"\n var repromptText = '';\n var shouldEndSession = true;\n \n}", "function init() {\n inquirer.prompt(questions).then((response) => {\n let text = gen.generateMarkdown(response);\n try { \n writeToFile(\"README.md\", text)\n } catch (error) {\n console.error(error);\n }})\n\n}", "function init() { \n inquirer.prompt(questions).then((answers)=>{\n writeToFile(\"README.md\", generateMarkdown({...answers}))\n });\n}", "function init() {\n inquirer.prompt(questions).then((response) => {\n writeToFile(\"exampleREADME.md\", response);\n });\n}", "function init(){\n speak(quiz[currentquestion]['question'])\n\t\t//add title\n \n\t\tif(typeof quiztitle !== \"undefined\" && $.type(quiztitle) === \"string\"){\n\t\t\t$(document.createElement('h2')).text(quiztitle).appendTo('#frame');\n\t\t} else {\n\t\t\t$(document.createElement('h2')).text(\"Quiz\").appendTo('#frame');\n\t\t}\n \n\t\t\n\t\t//add pager and questions\n\t\tif(typeof quiz !== \"undefined\" && $.type(quiz) === \"array\"){\n\t\t\t//add pager\n \n\t\t\t$(document.createElement('p')).addClass('pager').attr('id','pager').text('Domanda 1 di ' + quiz.length).appendTo('#frame');\n\t\t\t//add first question\n\t\t\t$(document.createElement('h3')).addClass('question').attr('id', 'question').text(quiz[0]['question']).appendTo('#frame');\n\t\t\t//add image if present\n\t\t\tif(quiz[0].hasOwnProperty('image') && quiz[0]['image'] != \"\"){\n\t\t\t\t$(document.createElement('img')).addClass('question-image').attr('width','100px').attr('id', 'question-image').attr('src', quiz[0]['image']).attr('alt', (quiz[0]['question'])).appendTo('#frame');\n\t\t\t}\n\t\t\t\n\t\t\t$(document.createElement('p')).addClass('explanation').attr('id','explanation').html('').appendTo('#question');\n\t\t\t\n\t\t\t//questions holder\n\t\t\t$(document.createElement('ul')).attr('id', 'choice-block').appendTo('#frame');\n\t\t\t\n\t\t\t//add choices\n\t\t\taddChoices(quiz[0]['choices']);\n\t\t\t\n\t\t\t\n\t\t\tsetupButtons();\n\t\t}\n\t}", "function handleWelcomeRequest(response) {\n var speechOutput = \"Welcome to Know Your Congress. Which state or congressperson would you like to know about? \";\n var repromptOutput = \"You can ask things like who represents Iowa? or Who is Charles Grassley? \"\n + \"When looking for a person, you can also say who is Grassley? or who is Charles? \" \n + \"For more about the supported states, territories, and districts, ask what states are supported.\"\n + \"Which state or congressperson would you like to know about?\";\n\n response.ask(speechOutput, repromptOutput);\n}", "function init() {\ninquirer\n .prompt(questions)\n .then(answers => {\n console.log('test')\n writeToFile(\"README.md\", build({...answers}))\n console.log('readme gen')\n })\n .catch(error => {\n if(error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n console.log(error)\n }\n });\n }", "function init() {\n inquirer.prompt(questions)\n .then(data => {\n writeToFile('./readmeGenerated.md',data);\n // console.log(generateMarkdown(data));\n });\n}", "function init() {\n inquirer\n .prompt(questions)\n .then(function (response) {\n writeToFile(\"SUCCESS.md\", response)\n });\n}", "function init() {\n inquirer\n .prompt(questions)\n .then(function (input) {\n // console.log(answers);\n\n return input;\n })\n\n .then(function (inquirerAnswers) {\n const queryUrl = `https://api.github.com/users/${inquirerAnswers.username}`;\n axios.get(queryUrl)\n .then(function (response) {\n console.log(response.data);\n console.log(inquirerAnswers);\n\n response.data.title = inquirerAnswers.title; \n response.data.description = inquirerAnswers.description; \n response.data.contents = inquirerAnswers.contents; \n response.data.installation = inquirerAnswers.installation; \n response.data.usage = inquirerAnswers.usage; \n response.data.license = inquirerAnswers.license; \n response.data.contributing = inquirerAnswers.contributing; \n response.data.tests = inquirerAnswers.tests; \n response.data.username = inquirerAnswers.username; \n response.data.badge = inquirerAnswers.badge; \n \n writeToFile(\"readme.md\", response.data); // Writes to READme.md file\n })\n .then(function () {\n console.log(`Successfully wrote to README.md`);\n })\n .catch(function (error) {\n console.log(\"Please enter a valid Github username\", error);\n return;\n });\n });\n}", "function init() {\n inquirer.prompt(questions).then(function(data) {\n const generatedReadMe = generateMarkdown(data)\n writeToFile(\"./generatedreadme.md\", generatedReadMe)\n })\n}", "function init() {\n console.log(\"Running....\")\n //Ask the user the relevant questions needed for the read me\n inquirer.prompt(questions).then(responses => {\n //Take the users responses which are in an object and pass them to generateMarkdown\n //This returns a string which we can then use to pass to writeToFile to create the readme\n\n let readMeString = generateMarkdown({...responses })\n writeToFile('README.md', readMeString);\n\n })\n\n}", "function init() {\n inquirer\n.prompt(questions)\n.then(answers => {\n writeToFile ('./output/README.md', generateMarkdown({\n // uses spread operator to concat answers hash\n ...answers\n }))\n console.log(\"You've successfully created a README.md!\")\n})\n.catch((err) => console.error(err));\n}", "function init() {\n inquirer\n .prompt(questions)\n\n .then((data) => {\n console.log(data);\n writeToFile(\"README.md\", generateMarkdown(data));\n });\n}", "function init() {\n inquirer.prompt(questions).then(function(data) {\n writeToFile(\"README.md\", generatorMarkDown(data));\n console.log(data);\n });\n}", "function inflateResponses() {\n\n document.body.style.backgroundColor = \"#f2f2f2\";\n\n var summaryView = document.getElementById(\"details\");\n KASClient.UI.clearElement(summaryView);\n\n var divAttributes = {\n \"background-color\": \"white\",\n \"color\": \"#32485f\",\n \"font-size\": \"13.5pt\",\n \"margin\": \"16px\",\n \"margin-top\": \"8px\",\n \"margin-bottom\": \"8px\",\n \"box-shadow\": \"0px 0px 1px 0px rgba(0,0,0,0.12)\",\n \"border-radius\": \"4px\"\n };\n\n // firstName\n\n var firstNameDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var firstNameDetailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n\n firstNameDetailsHeader.className = \"comment-header\";\n firstNameDetailsHeader.innerText = _strings[_form.questions[FIRSTNAME].title];\n KASClient.UI.addElement(firstNameDetailsHeader, firstNameDetailsDiv);\n\n var firstNameDetailsView = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\"\n });\n\n var firstName = KASClient.UI.getElement(\"div\", {\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n firstName.innerHTML = _myFormResponses.questionToAnswerMap[FIRSTNAME];;\n\n KASClient.UI.addElement(firstName, firstNameDetailsView);\n KASClient.UI.addElement(firstNameDetailsView, firstNameDetailsDiv);\n\n // lastName\n\n var lastNameDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var lastNameDetailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n\n lastNameDetailsHeader.className = \"comment-header\";\n lastNameDetailsHeader.innerText = _strings[_form.questions[LASTNAME].title];\n KASClient.UI.addElement(lastNameDetailsHeader, lastNameDetailsDiv);\n\n var lastNameDetailsView = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\"\n });\n\n var lastName = KASClient.UI.getElement(\"div\", {\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n lastName.innerHTML = _myFormResponses.questionToAnswerMap[LASTNAME];\n\n KASClient.UI.addElement(lastName, lastNameDetailsView);\n KASClient.UI.addElement(lastNameDetailsView, lastNameDetailsDiv);\n\n // phone\n\n var phoneDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var phoneDetailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n\n phoneDetailsHeader.className = \"comment-header\";\n phoneDetailsHeader.innerText = _strings[_form.questions[PHONE].title];\n KASClient.UI.addElement(phoneDetailsHeader, phoneDetailsDiv);\n\n var phoneDetailsView = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\"\n });\n\n var phone = KASClient.UI.getElement(\"div\", {\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n phone.innerHTML = _myFormResponses.questionToAnswerMap[PHONE];\n\n KASClient.UI.addElement(phone, phoneDetailsView);\n KASClient.UI.addElement(phoneDetailsView, phoneDetailsDiv);\n\n // mail\n\n var mailDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var mailDetailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n\n mailDetailsHeader.className = \"comment-header\";\n mailDetailsHeader.innerText = _strings[_form.questions[MAIL].title];\n KASClient.UI.addElement(mailDetailsHeader, mailDetailsDiv);\n\n var mailDetailsView = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\"\n });\n\n var mail = KASClient.UI.getElement(\"div\", {\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n mail.innerHTML = _myFormResponses.questionToAnswerMap[MAIL];\n\n KASClient.UI.addElement(mail, mailDetailsView);\n KASClient.UI.addElement(mailDetailsView, mailDetailsDiv);\n\n // idNo\n\n var idNoDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var idNoDetailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n\n idNoDetailsHeader.className = \"comment-header\";\n idNoDetailsHeader.innerText = _strings[_form.questions[IDNO].title];\n KASClient.UI.addElement(idNoDetailsHeader, idNoDetailsDiv);\n\n var idNoDetailsView = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\"\n });\n\n var idNo = KASClient.UI.getElement(\"div\", {\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n idNo.innerHTML = _myFormResponses.questionToAnswerMap[IDNO];;\n\n KASClient.UI.addElement(idNo, idNoDetailsView);\n KASClient.UI.addElement(idNoDetailsView, idNoDetailsDiv);\n\n //end elements\n\n // Personal Details Summary\n var detailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var detailsHeader = KASClient.UI.getElement(\"div\", {\n \"padding\": \"14px\",\n \"padding-bottom\": \"0pt\"\n });\n detailsHeader.className = \"comment-header\";\n detailsHeader.innerText = _strings[\"strMiniAppYourDetails\"];\n KASClient.UI.addElement(detailsHeader, detailsDiv);\n\n var details = KASClient.UI.getElement(\"table\", {\n \"border\": \"none\",\n \"padding\": \"14px\",\n \"padding-top\": \"5pt\",\n \"color\": \"#32485f\",\n \"font-size\": \"12pt\",\n \"overflow-wrap\": \"break-word\",\n \"word-wrap\": \"break-word\",\n \"word-break\": \"break-word\"\n });\n\n var row1 = details.insertRow(0);\n var cell11 = row1.insertCell(0);\n var cell12 = row1.insertCell(1);\n cell11.className = \"first-column\";\n cell11.innerHTML = _strings[_form.questions[NAME].title];\n cell12.innerHTML = \": \" + _myFormResponses.questionToAnswerMap[NAME];\n\n var row2 = details.insertRow(1);\n var cell21 = row2.insertCell(0);\n var cell22 = row2.insertCell(1);\n cell21.className = \"first-column\";\n cell21.innerHTML = _strings[_form.questions[PHONE_NUMBER].title];\n cell22.innerHTML = \": \" + _myFormResponses.questionToAnswerMap[PHONE_NUMBER];\n\n KASClient.UI.addElement(details, detailsDiv);\n\n\n var locationDetailsDiv = KASClient.UI.getElement(\"div\", divAttributes);\n\n var locationDetailsHeader = KASClient.UI.getElement(\"div\");\n locationDetailsHeader.className = \"comment-header\";\n locationDetailsHeader.innerText = _strings[_form.questions[LOCATION].title];\n KASClient.UI.addElement(locationDetailsHeader, locationDetailsDiv);\n KASClient.UI.addElement(inflateLocation(), locationDetailsDiv);\n\n KASClient.UI.addElement(firstNameDetailsDiv, summaryView);\n KASClient.UI.addElement(lastNameDetailsDiv, summaryView);\n KASClient.UI.addElement(phoneDetailsDiv, summaryView);\n KASClient.UI.addElement(mailDetailsDiv, summaryView);\n KASClient.UI.addElement(idNoDetailsDiv, summaryView);\n KASClient.UI.addElement(detailsDiv, summaryView);\n\n }", "function init() {\n inquirer.prompt(questions)\n .then(data => writeToFile(\"SampleReadMe.md\", generateMarkdown(data)));\n}", "function init() { \n inquirer.prompt(questions).then(data => {\n console.log(data)\n writeToFile(\"README.md\",generateMarkdown(data))\n })\n}", "function init() {\n inquirer\n .prompt(questions)\n .then(answers => {\n generateMarkdown(answers);\n const fileName = `${answers.title}` + '.md'\n writeToFile(fileName, answers);\n\n\n console.log(answers.tests)\n console.log(answers);\n generateMarkdown();\n console.log(fileName);\n writeToFile(fileName, answers);\n\n })\n .catch(error => {\n if (error.isTtyError) {\n\n } else {\n\n }\n\n });\n}", "function init() {\n //user will see the first question\n inquirer.prompt(questions).then((data) => {\n writeToFile(\"README.md\", generateMarkdown(data));\n });\n}", "function init() {\n console.log('\\n');\n\n inquirer\n .prompt([\n {\n type: 'list',\n message: 'What would you like to do?',\n choices: options,\n name: 'init',\n },\n ])\n .then((response) => {\n //switch statement used to route function calls based on response selected\n switch (response.init) {\n case 'Add a new department':\n newDept();\n break;\n case 'Add a new role':\n newRole();\n break;\n case 'Add a new Employee':\n newEmp();\n break;\n case 'View Current Departments':\n viewDept();\n break;\n case 'View Current Roles':\n viewRole();\n break;\n case 'View Current Employees':\n viewEmployees();\n break;\n case 'Change Employee role':\n changeRole();\n break;\n default:\n connection.end();\n break;\n };\n });\n}", "function init() {\n inquirer\n .prompt([\n {\n type: 'input',\n message: ' What is your Github username?',\n name: 'username',\n \n },\n {\n type: 'input',\n message: 'What is your email?',\n name: 'email',\n \n },\n {\n type: 'input',\n message: 'What is the tittle of your project?',\n name: 'title',\n \n },\n {\n type: 'input',\n message: 'Please enter a description of your project:',\n name: 'description',\n \n },\n {\n type: 'input',\n message: 'Please enter a short note on the installation process of your project:',\n name: 'installation',\n \n },\n {\n type: 'input',\n message: 'Please submit a short discription of your application\\'s usage:',\n name: 'usage',\n },\n {\n type: 'list',\n message: 'Please select a license that best support your app:',\n choices: [\"MIT\", \"IBM\", \"Mozilla\", \"Other\"],\n name: 'license',\n \n },\n {\n type: 'input',\n message: 'Please note all contributiors to your project(if you are the only contributor please write your name):',\n \n name: 'contributors',\n \n },\n {\n type: 'input',\n message: 'Please input any test description to your application -- if you dont have any at the moment please write n/a:',\n name: 'test',\n },\n ])\n\n .then((response) => {\n let filename = `${response.title}` + \".md\"\n writeToFile(filename, response);\n });\n\n}", "function init() {\n inquirer\n .prompt(questions)\n .then((userAnswers) => {\n writeToFile(\"README.md\", generateMarkdown({ ...userAnswers }));\n })\n}", "function setAnswer(question, answer) {\n response = answer;\n\n}", "function setAnswer(question, answer) {\n response = answer;\n\n}", "function init() {\n inquirer\n .prompt(questions)\n .then(answers => {\n api.getUser(answer.username)\n .then(response => { \n console.log(response.data)\n console.log(answers) \n const markdown = generateMarkdown(answers, response.data);\n return writeToFile(\"output/readme.md\", markdown);\n })\n})\n.catch(error => {\n console.log(\"Couldn't create the file\")\n\n });\n}", "function init() {\n inquirer.prompt(questions).then(function (answers) {\n const data = generateMarkdown(answers);\n writeToFile('./README.md', data);\n });\n }", "function init() { \n inquirer.prompt(questions).then(function\n (answers) {\n \n const markdown = generateMarkdown(answers);\n writeToFile(\"GENERATED.md\", markdown);\n \n });\n}", "function respond(currAnswer, currQuestion, res) {\r\n res.writeHead(200, { 'Content-Type': 'text/html' });\r\n res.write(`<!DOCTYPE html>\r\n <html lang=\"en\">\r\n <head>\r\n <meta charset=\"UTF-8\">\r\n <title>Eliza</title>\r\n </head>\r\n <body>\r\n <h1>Hi, ${userName}!</h1>\r\n <p>${currAnswer}</p>\r\n <p>${currQuestion}</p>\r\n <form action=\"/chat\" method=\"post\">\r\n <input type=\"text\" name=\"userInput\"/>\r\n <input type=\"submit\" value=\"Submit\"/>\r\n </form><br>\r\n <form action=\"/dict\" method=\"post\"> \r\n <input type=\"submit\" value=\"New Dictionary\"/>\r\n </form>\r\n </body>\r\n </html>`);\r\n res.end();\r\n}", "function init() {\n inquirer\n .prompt(questions)\n .then((answers) =>{\n console.log(\"Generating README...\")\n writeToFile('./README.md', generateReadMe(answers));\n });\n}", "function init() {\n inquirer.prompt(questions)\n .then((data)=>{\n writeToFile('README.md', generateMarkdown(data))\n })\n \n}", "async function init() {\n const answers = await inquirer.prompt(questions);\n console.log('answers are:', answers);\n const markDown = generateMarkdown(answers);\n console.log('generated markdown:', markDown);\n writeToFile(answers.title + '_readme.md', generateMarkdown)\n}", "function responseHandler (app) {\n let ingr = req.query.food;\n request('https://api.edamam.com/api/food-database/parser?app_id=1f42d8bb&app_key=8ca5e6822e9abfd927289b214749ae7d&ingr=' + ingr, function (error, response, body) {\n body = JSON.parse(body);\n console.log('body', body);\n if (_.isEmpty(body.hints)) {\n console.log('could not find the nutrition values for the given food item, please try with different name');\n } else {\n\n console.log('body has data');\n }\n app.tell('response', response);\n app.tell('error', error);\n //console.log('hello');\n //res_body = body.hints;\n //res.send(res_body);\n // console.log('error:', error); // Print the error if one occurred\n // console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received\n // console.log('body:', body); // Print the HTML for the Google homepage.\n // app.tell(response);\n // app.tell(error);\n });\n\n }", "function init() {\n inquirer.prompt(questions)\n .then(function (data) {\n writeToFile(\"README.md\", generateMarkdown(data));\n })\n}", "function init() {\n\n inquirer\n .prompt(\n questions\n )\n .then((data) => {\n fileName = 'README.md';\n writeToFile(fileName, generateMarkdown(data));\n })\n}", "function getWelcomeResponse(response) {\r\n // If we wanted to initialize the session to have some attributes we could add those here.\r\n var cardTitle = \"The Virtual Librarian\";\r\n var speechText = \"Weclome to the Virtial Librarian. To get started, ask me to recommend a book.\";\r\n var repromptText = \"If you need more information, ask me for help.\";\r\n\r\n var speechOutput = {\r\n speech: \"<speak>\" + speechText + \"</speak>\",\r\n type: AlexaSkill.speechOutputType.SSML\r\n };\r\n var repromptOutput = {\r\n speech: repromptText,\r\n type: AlexaSkill.speechOutputType.PLAIN_TEXT\r\n };\r\n response.ask(speechOutput, repromptOutput);\r\n}", "async function init() {\n const answers = await inquirer.prompt(questions);\n console.log('answers are: ', answers);\n const markDown = generateMarkdown(answers);\n console.log('generated markdown: ', markDown);\n writeToFile(answers.title + '_README.md', markDown);\n}", "function init() {\n inquirer\n .prompt (questions)\n .then((data) => {\n writeToFile (\"README.md\", generateMarkdown({...data}))\n }).catch((err) => {\n console.log(err);\n })\n}", "function init() {\n return inquirer.prompt(questions)\n .then((data)=>{\n writeToFile('README.md', generateMarkdown(data))\n })\n}", "function init() {\n inquirer.prompt(questions).then(data =>{\n console.log(data);\n writeToFile(\"README.md\",generateMarkdown(data))\n }) \n}" ]
[ "0.6510164", "0.6224284", "0.62182885", "0.6192407", "0.6111945", "0.6046855", "0.6020527", "0.6009776", "0.60045815", "0.5996619", "0.59721255", "0.5958487", "0.5945753", "0.59330505", "0.5893523", "0.5885316", "0.58753145", "0.5871832", "0.5858695", "0.58482987", "0.5847131", "0.58434016", "0.5830196", "0.58188134", "0.58133805", "0.57956904", "0.5793027", "0.57910174", "0.57697153", "0.57681775", "0.57620823", "0.5753259", "0.57477295", "0.57432663", "0.5739218", "0.5735745", "0.5727407", "0.572385", "0.57225555", "0.5706784", "0.5697131", "0.56688064", "0.5663398", "0.5662793", "0.56592494", "0.56583446", "0.5635762", "0.56357104", "0.5629565", "0.5619716", "0.5618653", "0.56111544", "0.56111485", "0.56093836", "0.56084013", "0.5603149", "0.5602302", "0.56010693", "0.56000555", "0.55998284", "0.55927837", "0.5578093", "0.5576087", "0.5575378", "0.5572388", "0.5568559", "0.556307", "0.5555044", "0.55549794", "0.5553261", "0.55520934", "0.55518377", "0.55428183", "0.55407196", "0.5537053", "0.5536382", "0.5535214", "0.5532123", "0.5531593", "0.5531284", "0.5527632", "0.5526592", "0.55249697", "0.55246073", "0.552277", "0.552277", "0.55207896", "0.55200845", "0.5518132", "0.5512136", "0.55098796", "0.5505176", "0.5504522", "0.55031455", "0.5502376", "0.5501723", "0.5499861", "0.5499454", "0.54990757", "0.54976827", "0.5496496" ]
0.0
-1
if value is a function, invoke it with args, otherwise return it as object if value is undefined, will return undefined
function resolveValue(value, ...args) { if (typeof value === "function") { return value(...args); } else { return value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tryInvoke(value, ...args) {\n if (value === null) {\n return null;\n }\n else if (value === UNDEF) {\n throw new MonteOptionError('Value not initialized.');\n }\n\n try {\n return isFunc(value) ? value.call(this, ...args) : value;\n }\n catch (e) {\n if (console && console.error) { console.error(e); } // eslint-disable-line no-console\n this.__notify(EV.SUPPRESSED_ERROR, e);\n return null;\n }\n }", "function invokeWithArgsOrReturn(value, args) {\n return typeof value === 'function' ? value.apply(null, args) : value;\n }", "function invokeWithArgsOrReturn(value, args) {\n return typeof value === 'function' ? value.apply(null, args) : value;\n}", "function invokeWithArgsOrReturn(value, args) {\n return typeof value === 'function' ? value.apply(void 0, args) : value;\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n }", "tryInvoke(value, ...args) {\n try {\n return isFunc(value) ? value.call(this, ...args) : value;\n }\n catch (e) {\n if (console && console.error) { console.error(e); } // eslint-disable-line no-console\n this.__notify(EV.SUPPRESSED_ERROR, e, e.stack || 'No stack available.');\n return null;\n }\n }", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}", "function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}", "function resolve(value) {\n\t\t\treturn typeof value === 'function' ? value() : value;\n\t\t}", "function resolve(value) {\n\t\tfor (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t\tparams[_key - 1] = arguments[_key];\n\t\t}\n\n\t\treturn typeof value === 'function' ? value.apply(undefined, params) : value;\n\t}", "function functionValue(value) {\n if (_.isFunction(value)) {\n var args = Array.prototype.slice.call(arguments, 1);\n return value.apply(this, args);\n }\n return value;\n }", "function resolve(value, ctx) {\n return type_3.isFunction(value) ? value(ctx) : value;\n }", "function callFunction(obj, name, context, args) {\n var func = go.getProp(name, obj);\n //If value is string, try to resolve to fuction\n if (isString(func)) func = go.getProp(func, window);\n //If value is function, then run\n if (isFunction(func)) {\n func.call(context, args);\n return true;\n }\n }", "function invoke(fns, value) {\n return fns.reduce(callWith, value);\n}", "function o_o(){\n\t\t// check to see if it was an `()` function call\n\t\tif (arguments.length === 0) {\n\t\t\t// If everything has been properly set up, return the composed function\n\t\t\t// from the array of `funcs`\n\t\t\tif(INITIALIZED) {\n\t\t\t\treturn threadState(funcs);\n\t\t\t} else {\n\t\t\t\t// Oops, we don't have any functions to work with!\n\t\t\t\t// Could return the identity function or something here,\n\t\t\t\t// (or a function that always returns `true`), but it seems like\n\t\t\t\t// it would probably be an error, not an intentional action on the\n\t\t\t\t// part of the user.....\n\t\t\t\tthrow new Error(\"Not initialized!\");\n\t\t\t}\n\t\t// The call had 1 or more arguments, so we're applying the chain to a value\n\t\t} else {\n\t\t\t// Ff this is the first time we've recieved a value, this is the initial\n\t\t\t// function wrapping (which will be bound to the `initial` variable named)\n\t\t\t// in the function definition of `function o(initial)`\n\t\t\tif (!INITIALIZED) {\n\t\t\t\t// Set our tracker to true\n\t\t\t\tINITIALIZED = true; \n\t\t\t\t// Return the `o` composer object\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\t// Create a function from the threaded functions and apply the arguments\n\t\t\t\t// recieved to the composed function\n\t\t\t\treturn threadState(funcs).apply(this, arguments);\n\t\t\t}\n\t\t}\n\t}", "function get(...args) {\n const keys = [];\n let callback = undefined;\n args.forEach(a => {\n if (typeof a === 'string') {\n keys.push(a);\n } else if (typeof a === 'function') {\n callback = a;\n }\n });\n\n let values = _mapKeysToValues(keys);\n if (!callback) {\n values = values.map((v) => {\n if (typeof v === 'function') {\n if (v.length === 0) {\n return v();\n }\n return undefined;\n }\n return v;\n });\n if (values.length > 1) {\n return values;\n }\n return values[0];\n }\n\n let toResolve = values.filter(v => typeof v === 'function').length;\n\n if (toResolve === 0) {\n callback(...values);\n } else {\n const valueCallback = idx => (val) => {\n values[idx] = val;\n toResolve--;\n if (toResolve === 0) {\n callback(...values);\n }\n };\n\n values.forEach((v, idx) => {\n if (typeof v === 'function') {\n if (v.length > 0) {\n v(valueCallback(idx));\n } else {\n valueCallback(idx)(v());\n }\n }\n });\n }\n\n return undefined;\n }", "function handleValue(arg) {\n if (Number.isInteger(arg)) {\n return new NumNode(arg);\n }\n if (Array.isArray(arg)) {\n return new ArrNode(arg.map(handleValue));\n }\n if ((typeof arg) === 'string') {\n return new StrNode(arg);\n }\n if ((typeof arg) === 'boolean') {\n return new BoolNode(arg);\n }\n if (arg === null) {\n return new NullNode();\n }\n if (arg === undefined) {\n return new UndefNode();\n }\n if (arg.constructor === Object) {\n let pairs = [];\n for (let key in arg) {\n pairs.push(handleValue(key));\n pairs.push(handleValue(arg[key]));\n }\n return new ObjNode(pairs)\n }\n if ((typeof arg) === 'function') {\n return new FuncNode(arg);\n }\n if (arg instanceof ExprNode) {\n return arg\n }\n\n throw TypeError(`Cannot handle arg ${arg}`)\n}", "function checkValue(value){\n if (value === Function){\n value = safeFunction\n }\n return finalValue(value)\n }", "function checkValue(value){\n if (value === Function$1){\n value = safeFunction\n }\n return finalValue(value)\n }", "function _valueOf(value) {\n var p = {};\n switch (value.type) {\n case 'object':\n p.value = {\n description: value.className,\n hasChildren: true,\n injectedScriptId: value.ref || value.handle,\n type: 'object'\n };\n break;\n case 'function':\n p.value = {\n description: value.text || 'function()',\n hasChildren: true,\n injectedScriptId: value.ref || value.handle,\n type: 'function'\n };\n break;\n case 'undefined':\n p.value = {description: 'undefined'};\n break;\n case 'null':\n p.value = {description: 'null'};\n break;\n case 'script':\n p.value = {description: value.text};\n break;\n default:\n p.value = {description: value.value};\n break;\n }\n return p;\n }", "function evalFunc(obj, e) {\n if (isFunction(obj)) return obj(e);\n else return obj;\n }", "_checkValue(value) {\n if (!_.isFunction(value)) {\n throw new Error('functionsDict._checkValue: must provide only Function as values.');\n }\n }", "function makeDebuggeeValueIfNeeded(obj, value) {\r\n if (value && (typeof value == \"object\" || typeof value == \"function\")) {\r\n return obj.makeDebuggeeValue(value);\r\n }\r\n return value;\r\n}", "function isObjectLike(value) {\n return value != null && (typeof value === \"function\" || typeof value === \"object\");\n}", "_dehydrateArg(arg) {\n if (typeof arg === \"string\") {\n return ({\n type: \"string\",\n value: String(arg)\n });\n } else if (typeof arg === \"function\") {\n // store a pointer to the function in the function lib\n let functionPointerName = \"f@\" + this._functionPointerCounter;\n this._functionPointerCounter++;\n this._functionPointerLib.put(functionPointerName, arg);\n return ({\n type: \"function\",\n name: functionPointerName\n });\n } else if (typeof arg === \"number\") {\n return ({\n type: \"number\",\n value: arg\n });\n } else if (typeof arg === \"boolean\") {\n return ({\n type: \"boolean\",\n value: arg\n })\n } else if (typeof arg === \"object\") {\n\n if (arg.constructor.name === \"Array\") {\n let argDef = {\n type: \"array\",\n elements: [],\n };\n\n arg.forEach(element => {\n argDef.elements.push(this._dehydrateArg(element));\n });\n\n return argDef;\n } else {\n let argDef = {\n type: \"object\",\n properties: {},\n };\n\n for (let prop in arg) {\n if (arg.hasOwnProperty(prop)) {\n argDef.properties[prop] = this._dehydrateArg(arg[prop]);\n }\n }\n\n return argDef;\n }\n\n // return ({\n // type: \"json\",\n // value: JSON.stringify(arg)\n // })\n } else {\n throw new Error(\"Unsupported argument type for arg: \" + arg)\n }\n }", "getValue (value) {\n if (isObjectLike(value) && Object.prototype.hasOwnProperty.call(value, 'fact')) { // value = { fact: 'xyz' }\n return this.factValue(value.fact, value.params, value.path)\n }\n return Promise.resolve(value)\n }", "function callWith(value, f) {\n f(value);\n return value;\n}", "function asFirstClass(value) {\n switch (typeOf(value)) {\n case 'function': {\n if (isFunc(value) || isCtor(value)) {\n if (isFrozen(value)) {\n return value;\n }\n // TODO(metaweta): make this a cajita-uncatchable exception\n fail('Internal: non-frozen function encountered: ', value);\n } else if (isXo4aFunc(value)) {\n // TODO(metaweta): make this a cajita-uncatchable exception\n // TODO(erights): non-user-hostile error message\n fail('Internal: toxic exophora encountered: ', value);\n } else {\n // TODO(metaweta): make this a cajita-uncatchable exception\n fail('Internal: toxic function encountered: ', value);\n }\n break;\n }\n case 'object': {\n if (value !== null && isPrototypical(value)) {\n // TODO(metaweta): make this a cajita-uncatchable exception\n fail('Internal: prototypical object encountered: ', value);\n }\n return value;\n }\n default: {\n return value;\n }\n }\n }", "function isObject$1(value) {\n return typeof value === 'object' && value !== null || typeof value === 'function';\n }", "function isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}", "function isObj(value) {\n var type = typeof value;\n return value !== null && (type === 'object' || type === 'function');\n}", "function normalize(obj) {\n var result = obj;\n if (typeof obj !== \"function\") {\n if (typeof obj !== \"undefined\") {\n if (typeof obj !== \"object\") {\n result = (function(value) { return function() { return value; }; })(obj);\n } else {\n result = (function(o) { return function(key) {\n if (o[key] === void 0) {\n if (o.__default) {\n return o.__default;\n }\n return key;\n } else {\n return o[key];\n }\n }; })(obj);\n }\n } else {\n result = function(passthru) { return passthru; };\n }\n }\n return result;\n}", "walk_values() {\n if (arguments.length < 2) return false;\n if (!this.is_object(arguments[0])) return arguments[0];\n var obj = arguments[0];\n var filter = null;\n var callfunc = null;\n if (arguments.length == 2) \n callfunc = arguments[1];\n if (arguments.length == 3) {\n filter = arguments[1];\n callfunc = arguments[2];\n }\n if ((filter != null) && (!this.is_array(filter))) \n throw 'Invalid filter supplied to utils.walk_values()';\n if (!this.is_function(callfunc)) \n throw 'Invalid callback function supplied to utils.walk_values()';\n for (var key in obj) {\n if (!obj.hasOwnProperty(key))\n continue;\n var val = obj[key];\n if (this.is_object(val) && !this.is_empty(val) && !this.encryption.is_encrypted(val))\n obj[key] = this.walk_values(val, filter, callfunc);\n else \n if ((filter == null) || (filter.includes(key))) \n obj[key] = callfunc(val); \n }\n return obj;\n }", "function getVal(val) {\n if (typeof val === 'function') {\n return val.apply(undefined, slice.call(arguments, 1));\n } else {\n return val;\n }\n }", "function isObject(value) {\n return typeof value === \"object\" && value !== null || typeof value === \"function\";\n}", "function isObject(value) {\n return typeof value === \"object\" && value !== null || typeof value === \"function\";\n}", "function isObject(value) {\n return typeof value === \"object\" && value !== null || typeof value === \"function\";\n}", "function alt( obj )\n {\n return (typeof obj === 'function' ? obj() : obj);\n }", "function aFunctor(value, fn) {\n return fn(value);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function toObject(arg) {\n if (arg === null) throw new TypeError('Cannot convert null or undefined to object');\n\n if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;\n return Object(arg);\n}", "function getThen(value) {\n var t = typeof value;\n if (value && (t === 'object' || t === 'function')) {\n var then = value.then;\n if (typeof then === 'function') {\n return then;\n }\n }\n return null;\n }", "function invoke(objs, funcName, args){\n args = args || [];\n var objsAreFuncs = false;\n switch(typeof funcName){\n case \"object\":\n args = funcName;\n break;\n case \"undefined\":\n objsAreFuncs = true;\n }\n return map(objs, function(o){\n return objsAreFuncs ? o.apply(null, args) : o[funcName].apply(o, args);\n });\n }", "function of(value) {\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return NULL;\n } else if (Array.isArray(value)) {\n return ARRAY;\n }\n return OBJECT;\n case 'string':\n return STRING;\n case 'boolean':\n return BOOLEAN;\n case 'number':\n return isFinite(value) ? NUMBER : MISSING;\n }\n // Covers undefined, function, etc\n return MISSING;\n}", "function isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n }", "function defaultResolveFn(source, args, context, info) {\n var fieldName = info.fieldName;\n // ensure source is a value for which property access is acceptable.\n if (typeof source === 'object' || typeof source === 'function') {\n return typeof source[fieldName] === 'function'\n ? source[fieldName]()\n : source[fieldName];\n }\n}", "function recordArg(value) {\n\n if (options.json) {\n\n // Do our best to corece it into JSON\n if (!sg.isObject(value) && !_.isArray(value)) {\n if (_.isString(value)) {\n value = sg.safeJSONParse(value);\n }\n }\n\n // If still not an Object or Array, might be an error\n if (!sg.isObject(value) && !_.isArray(value)) {\n if (required) {\n self.argErrs = sg.ap(self.argErrs, {code: 'ENOTJSON', ...self.argTypes[defName]});\n return recordArg2(def);\n\n } else {\n value = { __just__ : value };\n }\n }\n }\n\n return recordArg2(value);\n }", "function safeInvokeForConfig(_ref) {\n var fn = _ref.fn;\n var context = _ref.context;\n var params = _ref.params;\n var onNotInvoked = _ref.onNotInvoked;\n\n if (typeof fn === 'function') {\n var fnParams = params;\n if (typeof params === 'function') {\n fnParams = params();\n }\n\n // Warn if params or lazily evaluated params were given but not in an array\n if (fnParams != null && !Array.isArray(fnParams)) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(\"Params to pass into safeInvoke's fn is not an array. Ignoring...\", fnParams);\n }\n\n fnParams = null;\n }\n\n return {\n invoked: true,\n result: fn.apply(context, fnParams)\n };\n } else {\n if (typeof onNotInvoked === 'function') {\n onNotInvoked();\n }\n\n return { invoked: false };\n }\n}", "async function processValue({ value, yieldHandlers }) {\n try {\n // run through all yieldHandlers\n for (const yieldHandler of yieldHandlers) {\n let handlerResult = yieldHandler(value);\n\n // only replace our value if the handler returned something\n // (it's supposed to be a promise, but I check that later)\n if (handlerResult) {\n value = handlerResult;\n break;\n }\n }\n\n if (!util.isPromise(value)) {\n throw new TypeError('OMG, Not a promise.');\n }\n\n value = await value;\n return {\n value,\n error: undefined,\n errorMode: false\n };\n }\n catch (ex) {\n return {\n value: undefined,\n error: ex,\n errorMode: true\n };\n }\n}", "function justInvoke(fn){\n return fn()\n}//justInvoke", "valueOf() {\n if (this.changed) {\n // check if the dependency is safe before evaluation\n this.dependencyOnList.forEach(d => {\n // check if there is a cycle after adding\n let visited = new Set();\n let toVisit = new Set();\n if (this.hasLoop(d, visited, toVisit)) {\n throw \"There is a loop from a dependency on \" + d.object.constructor.name + \".\" + d.propertyName;\n }\n });\n\n // re-evaluate our list of dependencies to feed\n // into the the provided function\n var params = this.dependencyOnList.map(d => d.object[d.propertyName]);\n // console.log(\"eval\")\n // console.log(params);\n\n this.value = this.func(...params);\n this.changed = false;\n }\n return this.value;\n }", "function evaluate(a) {\n if (a === undefined) {\n return nada;\n } else if (a.ctype === \"infix\") {\n return a.impl(a.args, {}, a);\n } else if (a.ctype === \"variable\") {\n return evaluate(namespace.getvar(a.name));\n } else if (a.ctype === \"function\") {\n callStack.push(a);\n a = eval_helper.evaluate(a.oper, a.args, a.modifs);\n callStack.pop();\n return a;\n } else if (a.ctype === \"void\") {\n return nada;\n } else if (a.ctype === \"field\") {\n const obj = evaluate(a.obj);\n if (obj.ctype === \"geo\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = evaluate(Accessor.getField(obj.value, a.key));\n Json._helper.self = oldobject;\n return result;\n } else if (obj.ctype === \"list\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = List.getField(obj, a.key);\n Json._helper.self = oldobject;\n return result;\n } else if (obj.ctype === \"JSON\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = evaluate(Json.getField(obj, a.key));\n Json._helper.self = oldobject;\n return result;\n } else {\n return nada;\n }\n } else if (a.ctype === \"userdata\") {\n const obj = evaluate(a.obj);\n let key = General.string(niceprint(evaluate(a.key)));\n if (key.value === \"_?_\") key = nada;\n if (obj.ctype === \"geo\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = evaluate(Accessor.getuserData(obj.value, key));\n Json._helper.self = oldobject;\n return result;\n } else if (obj.ctype === \"list\" || obj.ctype === \"string\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = evaluate(Accessor.getuserData(obj, key));\n Json._helper.self = oldobject;\n return result;\n } else if (obj.ctype === \"JSON\") {\n let oldobject = Json._helper.self;\n Json._helper.self = obj;\n let result = evaluate(Json.getField(obj, key.value));\n Json._helper.self = oldobject;\n return result;\n } else return nada;\n } else {\n return a;\n }\n}", "function async_call(){\n\tvar args = Array.prototype.slice.call(arguments);\n\tif(args.length==1){\n\t\t// Promise\n\t\tvar p = args[0];\n\t\treturn new Promise(function(resolve, reject){\n\t\t\tp.then(function(record) {\n\t\t\t\tresolve({\n\t\t\t\t result : record\n\t\t\t\t});\n\t\t\t}).catch(function(error) {\n\t\t\t\tresolve({\n\t\t\t\t err : error\n\t\t\t\t});\n\t\t\t});\n\t\t});\t\t\n\t}\n\tvar obj = args.shift();\n\t\n\tvar func = obj instanceof Function ? obj : obj[args.shift()];\n\t//console.log('async_call',func);\n\treturn new Promise(function(resolve, reject){\n\t\ttry{\n\t\t\tif(func){\n\t\t\t\targs.push(function (err, replay){\n\t\t\t\t\tif (replay) {\n\t\t\t\t\t resolve({\n\t\t\t\t\t\t result : replay\n\t\t\t\t\t });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\terr: err\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tfunc.apply(obj, args);\n\t\t\t}\n\t\t\telse\n\t\t\t\tresolve({\n\t\t\t\t\terr : 'Not defined '+func\n\t\t\t\t});\n\t\t}catch(e){\n\t\t\tresolve({\n\t\t\t\terr:e\n\t\t\t});\n\t\t}\n\t\t\n\t});\n}", "function maybeCall(obj, prop) {\n\t var value = obj[prop]\n\t if (is.Function(value)) {\n\t value = value.call(obj)\n\t }\n\t return value\n\t}", "function sk$call(obj)\n{\n var args = Array.prototype.slice.call(arguments);\n args.shift();\n try\n {\n return obj.apply(this, args);\n }\n catch (e)\n {\n //print(e.toString());\n if (obj.__call__ !== undefined)\n {\n return obj.__call__.apply(obj, args);\n }\n else\n {\n if (obj.__class__ === undefined)\n throw new AttributeError(\"trying to call uncallable and non-class?\");\n throw new AttributeError(obj.__class__.__name__ + \" instance has no __call__ method\");\n }\n }\n}", "is_function(value) {\n return typeof(value) === 'function';\n }", "function callPub(obj, name, args) {\n name = String(name);\n if (obj === null || obj === void 0) {\n throw new TypeError(\"Can't call \" + name + ' on ' + obj);\n }\n if (obj[name + '_canCall___'] || canCallPub(obj, name)) {\n return obj[name].apply(obj, args);\n }\n if (obj.handleCall___) { return obj.handleCall___(name, args); }\n fail('not callable:', debugReference(obj), '.', name);\n }", "function exp(value) {\n return (Array.isArray(value))\n ? value[0](\n exp(value[1]),\n exp(value[2])\n )\n : value;\n}", "function path2callable (object, name, callable) {\n var names = name.split('.'),\n method = names.pop(),\n obj = (names.reduce(function (ob, meth) { return ob[meth] }, object)\n || object),\n self = this\n\n if (!obj[method]) {\n console.warn(\"Tried to resolve bad object path: \" + name)\n console.warn(\"Server:\", object)\n return null // errorThrower(name)\n }\n\n return obj[method].bind(obj)\n}", "function isObject(val) {\n return typeOf(val) === 'object' || typeof val === 'function';\n}", "function isObject(val) {\n return typeOf(val) === 'object' || typeof val === 'function';\n}", "function isObject(val) {\n return typeOf(val) === 'object' || typeof val === 'function';\n}", "function pipe(value, ...fns) {\n if (!arguments.length) {\n throw new Error('expected one value argument and least one function argument');\n }\n if (!fns.length) {\n throw new Error(\n 'expected at least one (and probably more) function arguments'\n );\n }\n\n var result = fns[0](value);\n var len = fns.length;\n for (var i = 1; i < len; i++) {\n result = fns[i](result);\n }\n return result;\n}", "function getPromise(value) {\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null && typeof value.then === 'function') {\n return value;\n }\n}", "function executeIfObjectIsFunction(func) {\n if (typeof func === 'function') // if the object is a function, execute it\n return func();\n\n if (func === undefined)\n return;\n\n if (func === {})\n return;\n\n console.error(\"Function passed to executeIfObjectIsFunction was not a function!\");\n}", "function create_concrete_invoke(f) {\n return function() {\n var len = arguments.length;\n for (var i = 0; i<len; i++) {\n arguments[i] = pc.concretize(initUndefinedNumber(getSingle(arguments[i])));\n }\n return f.apply(pc.concretize(initUndefinedString(getSingle(this))),arguments);\n }\n }", "function isObject(val) {\n\t\t\t\t\t\t\tif (val === null) { return false;}\n\t\t\t\t\t\t\treturn ( (typeof val === 'function') || (typeof val === 'object') );\n\t\t\t\t\t\t}", "function exp(value) {\n return (Array.isArray(value)) ? value[0](exp(value[1]), exp(value[2])) : value;\n}", "fnInvoke(fn, ...args) {\n if (fn == null || !isFunc(fn)) {\n return null;\n }\n\n try {\n return fn.call(this, ...args);\n }\n catch (e) {\n this.__notify(EV.SUPPRESSED_ERROR, e);\n return null;\n }\n }", "function get(arg) {\n return {\n then: function(ful, rej) {\n ful(arg)\n }\n }\n}", "function get(object, key) {\n if (object) {\n var value = object[key];\n if (typeof value === 'function') {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n return value.apply(undefined, args);\n } else {\n return value;\n }\n }\n}", "function callFunction(obj) {\n if (typeof obj == \"function\") {\n obj.call();\n }\n }", "function objFunc(obj) {\n\tif (typeof obj == 'function') {\n\t\t\treturn getValue(obj); // stringify functions\n\t}\n\tif (typeof obj != 'object') {\n\t\treturn obj;\n\t}\n\n\tif (Array.isArray(obj)) {\n\t\tvar arr = [];\n obj.forEach(function(item) {\n arr.push(objFunc(item));\n });\n return arr;\n\t} else {\n\t\tvar keys = Object.keys(obj);\n var sobj = {};\n keys.forEach(function(k){\n sobj[k] = objFunc(obj[k]);\n });\n\t\treturn sobj;\n\t}\n}", "function pub ( scope, value, meta, opts ) {\n var args = slice.call( arguments );\n\n if ( scope === undefined ) {\n throw \"Undefined passed in as first argument.\";\n }\n\n // If there was one argument, then this is\n // either a getter or the object style\n // invocation.\n if ( isArray(scope) ) {\n // remove the scope argument.\n args.shift();\n\n return map(scope, function (which) {\n return pub.apply(pub.context, [which].concat(args));\n });\n }\n\n // The object style invocation will return\n // handles associated with all the keys that\n // went in. There *could* be a mix and match\n // of callbacks and setters, but that would\n // be fine I guess...\n if ( isObject(scope) ) {\n if ( args.length === 1 && scope.constructor.toString().search(/{\\s+\\[native code\\]\\s+}/) === -1 ) {\n pub.context = scope;\n return;\n }\n \n var ret = {};\n\n //\n // Object style should be executed as a transaction\n // to avoid ordinals of the keys making a substantial\n // difference in the existence of the values.\n //\n // Also under an object style assignment passing, the\n // ordering of the arguments is naturally one off -\n // excluding the value ... this means that we cascade\n // down.\n opts = meta || {};\n meta = value;\n opts.noexec = 1;\n\n each( scope, function ( _key, _value ) {\n ret[_key] = pub ( _key, _value, meta, opts );\n });\n\n // After the callbacks has been bypassed, then we\n // run all of them a second time, this time the\n // dependency graphs from the object style transactional\n // invocation should be satisfied\n if (!opts.bypass) {\n each( ret, function ( _key, _value ) {\n if (isFunction(ret[_key]) && !isFunction(scope[_key])) {\n scope[_key] = ret[_key]();\n }\n });\n }\n\n // TODO: fix this\n bubble( keys(ret)[0] );\n\n return scope;\n }\n\n // This will return all the handlers associated with\n // this event.\n if ( args.length === 1 ) {\n return smartMap(scope, resolve);\n } \n\n // If there were two arguments and if one of them was a function, then\n // this needs to be registered. Otherwise, we are setting a value.\n //\n // unless it's an array of functions\n return pub [ \n ( isFunction ( value ) || \n ( isArray(value) && isFunction(value[0]) )\n ) ? ON : SET ].apply(this, args);\n }", "async walk_values_async() {\n if (arguments.length < 2) return false;\n if (!this.is_object(arguments[0])) return arguments[0];\n var obj = arguments[0];\n var filter = null;\n var callfunc = null;\n if (arguments.length == 2) \n callfunc = arguments[1];\n if (arguments.length == 3) {\n filter = arguments[1];\n callfunc = arguments[2];\n }\n if ((filter != null) && (!this.is_array(filter))) \n throw 'Invalid filter supplied to utils.walk_values()';\n if (!this.is_function(callfunc)) \n throw 'Invalid callback function supplied to utils.walk_values()';\n for (var key in obj) {\n if (!obj.hasOwnProperty(key))\n continue;\n var val = obj[key];\n if (this.is_object(val) && !this.is_empty(val) && !this.encryption.is_encrypted(val))\n obj[key] = await this.walk_values_async(val, filter, callfunc);\n else \n if ((filter == null) || (filter.includes(key))) \n obj[key] = await callfunc(val); \n }\n return obj; \n }", "function isSimpleValue(arg) {\n if (Array.isArray(arg) || typeof arg === 'function') return false;\n if (arg == null || typeof arg !== 'object') return true;\n if (arg.valueOf && typeof arg.valueOf() !== 'object') {\n return true;\n }\n return false;\n }", "function of(value) {\n return function continuable(callback) {\n callback(null, value)\n }\n}", "function of(value) {\n return function continuable(callback) {\n callback(null, value)\n }\n}", "function coerceValue(type, value) {\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if ((0, _isInvalid2.default)(_value)) {\n return; // Intentionally return no value.\n }\n\n if (type instanceof _definition.GraphQLNonNull) {\n if (_value === null) {\n return; // Intentionally return no value.\n }\n return coerceValue(type.ofType, _value);\n }\n\n if (_value === null) {\n // Intentionally return the value null.\n return null;\n }\n\n if (type instanceof _definition.GraphQLList) {\n var itemType = type.ofType;\n if ((0, _iterall.isCollection)(_value)) {\n var coercedValues = [];\n var valueIter = (0, _iterall.createIterator)(_value);\n if (!valueIter) {\n return; // Intentionally return no value.\n }\n var step = void 0;\n while (!(step = valueIter.next()).done) {\n var itemValue = coerceValue(itemType, step.value);\n if ((0, _isInvalid2.default)(itemValue)) {\n return; // Intentionally return no value.\n }\n coercedValues.push(itemValue);\n }\n return coercedValues;\n }\n var coercedValue = coerceValue(itemType, _value);\n if ((0, _isInvalid2.default)(coercedValue)) {\n return; // Intentionally return no value.\n }\n return [coerceValue(itemType, _value)];\n }\n\n if (type instanceof _definition.GraphQLInputObjectType) {\n if ((typeof _value === 'undefined' ? 'undefined' : _typeof(_value)) !== 'object') {\n return; // Intentionally return no value.\n }\n var coercedObj = Object.create(null);\n var fields = type.getFields();\n var fieldNames = Object.keys(fields);\n for (var i = 0; i < fieldNames.length; i++) {\n var fieldName = fieldNames[i];\n var field = fields[fieldName];\n if ((0, _isInvalid2.default)(_value[fieldName])) {\n if (!(0, _isInvalid2.default)(field.defaultValue)) {\n coercedObj[fieldName] = field.defaultValue;\n } else if (field.type instanceof _definition.GraphQLNonNull) {\n return; // Intentionally return no value.\n }\n continue;\n }\n var fieldValue = coerceValue(field.type, _value[fieldName]);\n if ((0, _isInvalid2.default)(fieldValue)) {\n return; // Intentionally return no value.\n }\n coercedObj[fieldName] = fieldValue;\n }\n return coercedObj;\n }\n\n !(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType) ? (0, _invariant2.default)(0, 'Must be input type') : void 0;\n\n var parsed = type.parseValue(_value);\n if ((0, _isNullish2.default)(parsed)) {\n // null or invalid values represent a failure to parse correctly,\n // in which case no value is returned.\n return;\n }\n\n return parsed;\n}", "function coerceValue(type, value) {\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if ((0, _isInvalid2.default)(_value)) {\n return; // Intentionally return no value.\n }\n\n if (type instanceof _definition.GraphQLNonNull) {\n if (_value === null) {\n return; // Intentionally return no value.\n }\n return coerceValue(type.ofType, _value);\n }\n\n if (_value === null) {\n // Intentionally return the value null.\n return null;\n }\n\n if (type instanceof _definition.GraphQLList) {\n var itemType = type.ofType;\n if ((0, _iterall.isCollection)(_value)) {\n var coercedValues = [];\n var valueIter = (0, _iterall.createIterator)(_value);\n if (!valueIter) {\n return; // Intentionally return no value.\n }\n var step = void 0;\n while (!(step = valueIter.next()).done) {\n var itemValue = coerceValue(itemType, step.value);\n if ((0, _isInvalid2.default)(itemValue)) {\n return; // Intentionally return no value.\n }\n coercedValues.push(itemValue);\n }\n return coercedValues;\n }\n var coercedValue = coerceValue(itemType, _value);\n if ((0, _isInvalid2.default)(coercedValue)) {\n return; // Intentionally return no value.\n }\n return [coerceValue(itemType, _value)];\n }\n\n if (type instanceof _definition.GraphQLInputObjectType) {\n if ((typeof _value === 'undefined' ? 'undefined' : _typeof(_value)) !== 'object') {\n return; // Intentionally return no value.\n }\n var coercedObj = Object.create(null);\n var fields = type.getFields();\n var fieldNames = Object.keys(fields);\n for (var i = 0; i < fieldNames.length; i++) {\n var fieldName = fieldNames[i];\n var field = fields[fieldName];\n if ((0, _isInvalid2.default)(_value[fieldName])) {\n if (!(0, _isInvalid2.default)(field.defaultValue)) {\n coercedObj[fieldName] = field.defaultValue;\n } else if (field.type instanceof _definition.GraphQLNonNull) {\n return; // Intentionally return no value.\n }\n continue;\n }\n var fieldValue = coerceValue(field.type, _value[fieldName]);\n if ((0, _isInvalid2.default)(fieldValue)) {\n return; // Intentionally return no value.\n }\n coercedObj[fieldName] = fieldValue;\n }\n return coercedObj;\n }\n\n !(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType) ? (0, _invariant2.default)(0, 'Must be input type') : void 0;\n\n var parsed = type.parseValue(_value);\n if ((0, _isNullish2.default)(parsed)) {\n // null or invalid values represent a failure to parse correctly,\n // in which case no value is returned.\n return;\n }\n\n return parsed;\n}", "function invoke (a, b, c, d, e) {\n\t\t\t\t/*jshint evil:true*/\n\t\t\t\t/*jshint unused:false*/\n\t\t\t\treturn eval('node.' + method + '(' + argsList + ');');\n\t\t\t}", "function functor(v) {\n return typeof v === 'function' ? v : function() {\n return v\n }\n }", "function weak_force(value) {\n\tif (value instanceof LazyApplication ||\n\t\tvalue instanceof EvaluateResult && value.value instanceof LazyApplication) {\n\t\tvar traits = [];\n\t\twhile (true) {\n\t\t\tif (value instanceof EvaluateResult) {\n\t\t\t\ttraits.push(value.traits);\n\t\t\t\tvalue = value.value;\n\t\t\t}\n\t\t\tif (value instanceof LazyApplication)\n\t\t\t\tvalue = value.apply();\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tif (value instanceof EvaluateResult) {\n\t\t\ttraits.push(value.traits);\n\t\t\tvalue = value.value;\n\t\t}\n\t\treturn make_return_value(value, merge_traits(traits));\n\t} else\n\t\treturn value;\n}", "function isObject$8(val) {\n return kindOf$3(val) === 'object' || typeof val === 'function';\n}", "get function() {\n return this.args.function;\n }", "function race() {\n const arg1 = arguments[0]\n\n return new Promise((resolve, reject) => {\n if(!isArray(arg1)) { throw new TypeError('undefined is not a function') }\n\n arg1.forEach((value) => {\n if (isObject(value) || isFunction(value)) {\n const thenable = value.then\n isFunction(thenable)\n ? thenable.call(value, resolve, reject)\n : resolve(value)\n } else {\n resolve(value)\n }\n })\n })\n}", "function invoke(method, arg) {\n var result = generator[method](arg);\n var value = result.value;\n return value instanceof AwaitArgument ? _Promise.resolve(value.arg).then(invokeNext, invokeThrow) : _Promise.resolve(value).then(function (unwrapped) {\n result.value = unwrapped;\n return result;\n }, invokeThrow);\n }", "function tryCatch(fn,obj,arg){try{return {type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return {type:\"throw\",arg:err};}}", "function makeGetCurrent (value) {\n if(Array.isArray(value)) {\n return arrayGetCurrent(value);\n }\n else {\n }\n return objectGetCurrent(value);\n}" ]
[ "0.7101803", "0.6993886", "0.6940897", "0.68156296", "0.6651396", "0.661615", "0.65037775", "0.65037775", "0.65037775", "0.65037775", "0.65037775", "0.65037775", "0.65037775", "0.6498376", "0.6373962", "0.6292613", "0.619484", "0.5970673", "0.59453213", "0.592843", "0.5885674", "0.5868639", "0.58539766", "0.578152", "0.57151705", "0.5672745", "0.5665304", "0.5648948", "0.5576823", "0.542437", "0.5377514", "0.5368627", "0.535844", "0.5308755", "0.5300597", "0.52870136", "0.52647567", "0.5230202", "0.52140343", "0.51883453", "0.518026", "0.518026", "0.518026", "0.5178884", "0.5171568", "0.5170714", "0.5170714", "0.5170714", "0.5170714", "0.5170714", "0.5170714", "0.50899386", "0.5077286", "0.5071257", "0.50447893", "0.5035948", "0.5028003", "0.50272995", "0.502074", "0.50114524", "0.49954093", "0.49913928", "0.4988244", "0.49757376", "0.49618763", "0.49576047", "0.49540102", "0.49119797", "0.4910761", "0.4904304", "0.4904304", "0.4904304", "0.4902749", "0.48954067", "0.48933715", "0.48910433", "0.48826116", "0.48584777", "0.48567906", "0.48481578", "0.48460454", "0.4831763", "0.4825613", "0.4814325", "0.48105118", "0.4801358", "0.48012763", "0.48012763", "0.47975075", "0.47975075", "0.4797327", "0.47971055", "0.47926453", "0.4790202", "0.47840926", "0.4777873", "0.47769332", "0.4776601", "0.477579" ]
0.72190434
0
Taunt. Each of Colonist Chapman's nonStar Alliance neighbors gains, "Reap: Gain 1A."
setupCardAbilities(ability) { this.persistentEffect({ targetController: 'any', match: (card, context) => card.type === 'creature' && context.source.neighbors.includes(card) && !card.hasHouse('staralliance'), effect: ability.effects.gainAbility('reap', { gameAction: ability.actions.gainAmber() }) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSynergy(){\n return 0.25 + 0.75 * (this.getActivePlayingPlayers().length / 11) ** 2;\n }", "function netPromoterScore(sede, generation) {\n var ratings = data[sede][generation]['ratings'];\n var array = [];\n for (var i = 0 ; i < ratings.length;i++) {\n var promoters = ratings[i]['nps']['promoters'];\n var detractors = ratings[i]['nps']['detractors'];\n var passive = ratings[i]['nps']['passive'];\n array[i] = promoters - detractors;\n var nps = (promoters - detractors);\n }\n document.getElementById('nps').innerHTML = nps;\n document.getElementById('promoters').innerHTML = promoters + '% promoters';\n document.getElementById('passive').innerHTML = passive + '% passive';\n document.getElementById('detractors').innerHTML = detractors + '% detractors';\n return array;\n}", "function calculateTradeGoodGoldBonus() {\n // TODO: this\n return 0;\n}", "getTotalRewards() {\n let asps = []\n let stats = game.app.stats\n let rews = {\n force: stats.embodimentReward.Force.amount,\n entropy: stats.embodimentReward.Entropy.amount,\n form: stats.embodimentReward.Form.amount,\n inertia: stats.embodimentReward.Inertia.amount,\n life: stats.embodimentReward.Life.amount,\n }\n\n for (let x in this.app.state.aspects) {\n asps.push(this.getReferenceById(this.app.state.aspects[x].id))\n }\n\n for (let x in asps) {\n for (let z in asps[x].rewards) {\n let amount = asps[x].rewards[z]\n rews[z] += amount\n }\n }\n\n // core nodes\n for (let x in game.app.state.coreNodes) {\n rews[x] += game.app.state.coreNodes[x] ? 1 : 0\n if (game.app.hasCompleteCore)\n rews[x] += 1\n }\n\n return rews;\n }", "function upgrade_cost (k)\n {\n return 500.0 * (1 + k/(15-k)) * Math.pow(k, 1.5) * (1/(15-k));\n }", "function k538(matches) { return 250 / Math.pow(matches + 5, .4); }", "gainMult() {\n let mult = D(1)\n if(player.grindless)mult=mult.times(3)\n return mult // Factor in any bonuses multiplying gain here.\n }", "function eggClickers() {\n if (gameData.click_increment_cost <= gameData.cash) {\n gameData.click_increment++;\n gameData.cash -= gameData.click_increment_cost;\n gameData.click_increment_cost = 1 * Math.pow(1.1, gameData.click_increment);\n duckUpdate();\n }\n}", "function optimal_compos_golden(adr)//mam sklad 7, szukam czy ktos na lawce sie nadaje//szukanie lepszego perfo-nie roz problem\n{\n if(adr==1)\n {\n \ttea = team1;//z tempo odczyt, a do tempz zapisuje;\n }\n else \n {\n \ttea = team2;//z tempo odczyt, a do tempz zapisuje;\n }\n//console.log(changes);\n var all_lawka = [];\n var item1 = [];\n var item2 = [];\n var item3 = [];\n var item4 = [];\n for(var i=1;i<=6;i++)//mam gwaracje, że przejdzie przez każdego R na ławce, ale dalej zawsze wybierze najlepszego\n {\t\n tea[0]=Array(0,0,0,0,0,0,0,0,0,0,0,0);\n item1 = [];item2 = [];item3 = [];item4 = [];\n\t\t\tfor(var j=8;j<=12;j++)\n\t\t\t{\n\t\t\t //item = [];\n if(tea[j][4]==\"R\" && i == 1)// i = 1 - sprawdzam każdego z ławki konkretnie za R\n\t\t\t {\n\t\t\t \tif(tea[j][11] > (tea[i][11]+1))\n {\n nadwyzka = tea[j][11] - tea[i][11];nadwyzka = zaokr(nadwyzka); \n item1 = [j, i, nadwyzka];\n all_lawka.unshift(item1);// \n }\n\t\t\t }\n if(tea[j][4]==\"A\" && i == 4)// i = 4\t\n\t\t\t {\n\t\t\t \tif(tea[j][6] > (tea[i][6]+1))\n {\n nadwyzka = tea[j][6] - tea[i][6];nadwyzka = zaokr(nadwyzka);\n item2 = [j, i, nadwyzka];\n all_lawka.unshift(item2);// \n }\n\t\t\t }\n item3 =[];\n if(tea[j][4]==\"P\" && (i == 2 || i == 5))// i = 2; i =5;\n\t\t\t {\n\t\t\t \tif( (tea[j][6]+tea[j][7])/2 > ((tea[i][6]+tea[i][7])/2)+1)\n {\n nadwyzka = (tea[j][6]+tea[j][7])/2 - ((tea[i][6]+tea[i][7])/2);nadwyzka = zaokr(nadwyzka);\n item3=[];\n item3 = [j, i, nadwyzka];\n test = all_lawka.unshift(item3);//\n //alert(\"test-length: \"+test+\" item: \"+item3);\n }\n\t\t\t }\n if(tea[j][4]==\"S\" && (i == 3 || i == 6))// i = 3; i =6;\n\t\t\t {\n\t\t\t \tif( (tea[j][6]+tea[j][9])/2 > ((tea[i][6]+tea[i][9])/2)+1)\n {\n nadwyzka = (tea[j][6]+tea[j][9])/2 - ((tea[i][6]+tea[i][9])/2);nadwyzka = zaokr(nadwyzka);\n item4 = [j, i, nadwyzka];\n all_lawka.unshift(item4);// \n }\n\t\t\t }\n } //end of for j=8..12\n //console.log(all_lawka);\n }//end of for i=1..6\n //sortowanie\n for(u=0; u<all_lawka.length; u++)\n {\n for(w=1; w<all_lawka.length; w++)\n {\n if(all_lawka[w][2] > all_lawka[w-1][2])\n {\n temp = all_lawka[w-1];\n all_lawka[w-1] = all_lawka[w];\n all_lawka[w] = temp;\n }\n }\n }\n //próba wykoanania zmiany\n for(u=0; u<all_lawka.length; u++)\n {\n out_id = all_lawka[u][1];\n in_id = all_lawka[u][0];\n out_nr = tea[out_id][3]; //na indeksie 1 mam wyznaczonego do zejścia - nr dla funkcji possible_change\n in_nr = tea[in_id][3]; //\n if(adr == 1)\n {\n if(possible_change(adr, out_nr, in_nr) < 6)\n {\nvar fffv = document.getElementById(\"screen3\").innerHTML;\ndocument.getElementById(\"screen3\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za: \"+tea[out_id][5]+\" (stan: \"+mm1+\" : \"+mm2+\") \";\n//2021-01-13: nowy screen do zapisu zmian na czas seta\nvar fffv = document.getElementById(\"change_info1\").innerHTML;\ndocument.getElementById(\"change_info1\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za \"+tea[out_id][5];\n change1(out_id,in_id); flag_golden1 = 1; return 0;\n }\n }\n else\n {\n if(possible_change(adr, out_nr, in_nr) < 6)\n {\nvar fffv = document.getElementById(\"screen6\").innerHTML;\ndocument.getElementById(\"screen6\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za: \"+tea[out_id][5]+\" (stan: \"+mm1+\" : \"+mm2+\") \";\n//2021-01-13: nowy screen do zapisu zmian na czas seta\nvar fffv = document.getElementById(\"change_info2\").innerHTML;\ndocument.getElementById(\"change_info2\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za \"+tea[out_id][5];\n change2(out_id,in_id); flag_golden2 = 1; return 0;\n }\n }\n }\n\n\n if(adr==1)\n {\n team1 = tea;\n }\n else \n {\n team2 = tea;\n }\n\n banch_ins();\n return 1;\n}", "function getAttackBonuses() {\n\trelicsIndex = myCharacter.relics;\n\tfor(var relicName in relicsIndex) {\n\t\tattackName = relicName + \"Attack\";\n\t\tdamageName = relicName + \"Damage\";\n\t\tattackToLoad = {};\n\t\tdamageToLoad = {};\n\t\tfor(var bonusDice in relicsIndex[relicName]['bonusDice']) {\n\t\t\tif(bonusDice == attackName) {\n\t\t\t\tmyAttackAttacks[bonusDice] = convertToEffectiveNumberBoons(relicsIndex[relicName]['bonusDice'][bonusDice]);\n\t\t\t}\n\t\t\tif(bonusDice == damageName) {\n\t\t\t\tmyAttackDamages[bonusDice] = convertToEffectiveNumberBoons(relicsIndex[relicName]['bonusDice'][bonusDice]);\n\t\t\t}\n\t\t\tattackToLoad = myAttackAttacks[attackName];\n\t\t\tdamageToLoad = myAttackDamages[damageName];\n\t\t}\n\t\tfor(var itemEnhancements in relicsIndex[relicName]['itemEnhancements']) {\n\t\t\tif(itemEnhancements == attackName) {\n\t\t\t\tif(myCharacter.legend <= 4) {\n\t\t\t\t\tmyAttackAttacks[itemEnhancements] = nanEqualsZero(attackToLoad) + parseInt(relicsIndex[relicName]['itemEnhancements'][itemEnhancements]);\n\t\t\t\t} else {\n\t\t\t\t\tmyAttackAttacks[itemEnhancements] = nanEqualsZero(attackToLoad) + convertToEpic(parseInt(relicsIndex[relicName]['itemEnhancements'][itemEnhancements]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(itemEnhancements == damageName) {\n\t\t\t\tif(myCharacter.legend <= 4) {\n\t\t\t\t\tmyAttackDamages[itemEnhancements] = nanEqualsZero(damageToLoad) + parseInt(relicsIndex[relicName]['itemEnhancements'][itemEnhancements]);\n\t\t\t\t} else {\n\t\t\t\t\tmyAttackDamages[itemEnhancements] = nanEqualsZero(damageToLoad) + convertToEpic(parseInt(relicsIndex[relicName]['itemEnhancements'][itemEnhancements]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function CalcExpectTargets()\n{\n\t//base on enemy danger's to assign my tanks to fight with enemy's tanks\n\tarrAssigned = [false, false, false, false];\n\t\n\t//sort arrOppDanger: greatest first\n\tconsole.log(\"arrOppDanger: \" + arrOppDanger[0] + \", \" + arrOppDanger[1] + \", \" + arrOppDanger[2] + \", \" + arrOppDanger[3]);\n\tvar arrDangerIdx = [0, 1, 2, 3];\n\tvar swapped = false;\n\tdo\n\t{\n\t\tswapped = false;\n\t\tfor(var i = 1; i < NUMBER_OF_TANK; i++)\n\t\t{\n\t\t\tif(arrOppDanger[arrDangerIdx[i-1]] < arrOppDanger[arrDangerIdx[i]])\n\t\t\t{\n\t\t\t\tvar tmp = arrDangerIdx[i-1];\n\t\t\t\tarrDangerIdx[i-1] = arrDangerIdx[i];\n\t\t\t\tarrDangerIdx[i] = tmp;\n\t\t\t\tswapped = true;\n\t\t\t}\n\t\t}\n\t}\n\twhile(swapped);\n\t//console.log(\"After sort: \" + arrOppDanger[arrDangerIdx[0]] + \", \" + arrOppDanger[arrDangerIdx[1]] + \", \" + arrOppDanger[arrDangerIdx[2]] + \", \" + arrOppDanger[arrDangerIdx[3]]);\n\t//console.log(\"Idx: \" + arrDangerIdx[0] + \", \" + arrDangerIdx[1] + \", \" + arrDangerIdx[2] + \", \" + arrDangerIdx[3]);\n\t\n\t//if has power up item in my bag, apply to the most danger tank! (Check if danger > threshold first.)\n\tif(arrOppDanger[arrDangerIdx[0]] >= DANGER_THRESHOLD)\n\t{\n\t\tif (HasAirstrike()) {\n\t\t\tvar tank0 = g_tanks[g_opponent][arrDangerIdx[0]];\n\t\t\tUseAirstrike (tank0.m_x, tank0.m_y); //TODO - calc position to not bomb my tank!\n\t\t}\n\t\tif (HasEMP()) {\n\t\t\tvar tank0 = g_tanks[g_opponent][arrDangerIdx[0]];\n\t\t\tUseEMP (tank0.m_x, tank0.m_y); //TODO - calc position to not bomb my tank!\n\t\t}\n\t}\n\t\t\n\t//assign\n\tvar assignedCount = 0;\n\tvar assignedCountMax = NUMBER_OF_TANK;\n\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t{\n\t\tvar temp = g_tanks[g_team][j];\n\t\tif(temp.m_HP == 0)\n\t\t\tassignedCountMax--;\n\t}\n\t\n\t//reset arrNotAvoiding if enemy tank's death\n\tfor(var i = 0; i < NUMBER_OF_TANK; i++)\n\t{\n\t\tvar opTank = g_tanks[g_opponent][i];\n\t\tif(opTank.m_HP == 0)\n\t\t{\n\t\t\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t\t\t{\n\t\t\t\tif(arrOldTargets[j] != null && arrOldTargets[j].type == TARGET_TANK && arrOldTargets[j].object == opTank)\n\t\t\t\t{\n\t\t\t\t\tarrNotAvoiding[j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(var i = 0; i < NUMBER_OF_TANK; i++)\n\t{\n\t\t//don't fight if not danger atm\n\t\tif(arrOppDanger[arrDangerIdx[i]] < DANGER_THRESHOLD)\n\t\t\tbreak;\n\t\t\t\n\t\tvar dangerTank = g_tanks[g_opponent][arrDangerIdx[i]];\n\t\t\t\n\t\t//check double threshold\n\t\tvar needTanks = 1;\n\t\tif(arrOppDanger[arrDangerIdx[i]] >= DANGER_TRIPLE_THRESHOLD)\n\t\t\tneedTanks = 3;\n\t\telse if(arrOppDanger[arrDangerIdx[i]] >= DANGER_DOUBLE_THRESHOLD)\n\t\t\tneedTanks = 2;\n\t\tconsole.log(\"danger tank: \" + arrDangerIdx[i] + \", needTanks: \" + needTanks);\n\t\t\n\t\tvar tankCount = 0;\n\t\t\n\t\t//check if there's a tank that has old target is this dangerTank\n\t\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t\t{\n\t\t\tif(arrAssigned[j] == true)\n\t\t\t\tcontinue;\n\t\t\tvar temp = g_tanks[g_team][j];\n\t\t\tif(temp.m_HP == 0)\n\t\t\t\tcontinue;\n\t\t\tif(arrOldTargets[j] != null && arrOldTargets[j].type == TARGET_TANK && arrOldTargets[j].object == dangerTank)\n\t\t\t{\n\t\t\t\tconsole.log(\"Assign to old tank & old target\");\n\t\t\t\tconsole.log(\"TARGET --- tank: \" + j + \", dangerTank: (\" + dangerTank.m_x +\",\" + dangerTank.m_y + \")\");\n\t\t\t\tarrTargets[j] = new TankTarget(TARGET_TANK, dangerTank, dangerTank.m_x, dangerTank.m_y);\n\t\t\t\tarrAssigned[j] = true;\n\t\t\t\ttankCount++;\n\t\t\t\tassignedCount++;\n\t\t\t\tif(tankCount == needTanks)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//assign tanks base on needTanks\n\t\twhile((tankCount < needTanks) && (assignedCount < assignedCountMax))\n\t\t{\n\t\t\tconsole.log(\"tankCount: \" + tankCount + \", assignedCount: \" + assignedCount);\n\t\t\tvar assigned = false;\n\t\t\tvar minDistance = 9999; //use min distance in worst case\n\t\t\tvar minIdx = 99;\n\t\t\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t\t\t{\n\t\t\t\tif(arrAssigned[j] == true)\n\t\t\t\t\tcontinue;\n\t\t\t\tvar temp = g_tanks[g_team][j];\n\t\t\t\tif(temp.m_HP == 0)\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\tvar dist = Math.abs(temp.m_x - dangerTank.m_x) + Math.abs(temp.m_y - dangerTank.m_y);\n\t\t\t\t\n\t\t\t\t//check old target, if it's still not death & nearer -> not assign to this danger tank\n\t\t\t\tif(arrOldTargets[j] != null && arrOldTargets[j].type == TARGET_TANK)\n\t\t\t\t{\n\t\t\t\t\tvar oldOpTank = arrOldTargets[j].object;\n\t\t\t\t\tif(oldOpTank.m_HP > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar oldDist = Math.abs(temp.m_x - oldOpTank.m_x) + Math.abs(temp.m_y - oldOpTank.m_y);\n\t\t\t\t\t\tif(oldDist < dist)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if my tank can shoot to it\n\t\t\t\tif(CanShootEm(temp, dangerTank.m_x, dangerTank.m_y))\n\t\t\t\t{\n\t\t\t\t\t//arrExpectPos[j] = new Position(dangerTank.m_x, dangerTank.m_y);\n\t\t\t\t\tconsole.log(\"TARGET --- tank: \" + j + \", dangerTank: (\" + dangerTank.m_x +\",\" + dangerTank.m_y + \")\");\n\t\t\t\t\tarrTargets[j] = new TankTarget(TARGET_TANK, dangerTank, dangerTank.m_x, dangerTank.m_y);\n\t\t\t\t\tarrAssigned[j] = true;\n\t\t\t\t\tassigned = true;\n\t\t\t\t\ttankCount++;\n\t\t\t\t\tassignedCount++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if my tank's nearby it\n\t\t\t\tif(dist <= TARGET_TANK_DISTANCE)\n\t\t\t\t{\n\t\t\t\t\t//arrExpectPos[j] = new Position(dangerTank.m_x, dangerTank.m_y);\n\t\t\t\t\tconsole.log(\"TARGET --- tank: \" + j + \", dangerTank: (\" + dangerTank.m_x +\",\" + dangerTank.m_y + \")\");\n\t\t\t\t\tarrTargets[j] = new TankTarget(TARGET_TANK, dangerTank, dangerTank.m_x, dangerTank.m_y);\n\t\t\t\t\tarrAssigned[j] = true;\n\t\t\t\t\tassigned = true;\n\t\t\t\t\ttankCount++;\n\t\t\t\t\tassignedCount++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//min distance for last choice\n\t\t\t\tif(dist < minDistance)\n\t\t\t\t{\n\t\t\t\t\tminDistance = dist;\n\t\t\t\t\tminIdx = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//pick a tank that in min distance\n\t\t\tif(!assigned && (minIdx < NUMBER_OF_TANK))\n\t\t\t{\n\t\t\t\t//arrExpectPos[minIdx] = new Position(dangerTank.m_x, dangerTank.m_y);\n\t\t\t\tconsole.log(\"TARGET --- tank: \" + j + \", dangerTank: (\" + dangerTank.m_x +\",\" + dangerTank.m_y + \")\");\n\t\t\t\tarrTargets[minIdx] = new TankTarget(TARGET_TANK, dangerTank, dangerTank.m_x, dangerTank.m_y);\n\t\t\t\tarrAssigned[minIdx] = true;\n\t\t\t\ttankCount++;\n\t\t\t\tassignedCount++;\n\t\t\t}\n\t\t\telse //don't have free tank to assign\n\t\t\t{\n\t\t\t\tif(tankCount < needTanks)\n\t\t\t\t\tconsole.log(\"don't have free tank to assign!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//check for unassigned tanks, can shoot to base or obstacle, or get the power up\n\tif(assignedCount < assignedCountMax)\n\t{\n\t\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t\t{\n\t\t\tif(arrAssigned[j] == true)\n\t\t\t\tcontinue;\n\t\t\tvar temp = g_tanks[g_team][j];\n\t\t\tif(temp.m_HP == 0)\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\tFindOtherTankTarget(temp, j, true, true);\n\t\t}\n\t}\n\t\n\t//if(arrTargets[0] != null)\n\t//\tconsole.log(\"Expect pos for tank 0 - type: \" + arrTargets[0].type + \", post: (\" + arrTargets[0].x + \",\" + arrTargets[0].y + \")\");\n\t\t\n\t//calc expect position for tank targets\n\tfor(var j = 0; j < NUMBER_OF_TANK; j++)\n\t{\n\t\tif((arrAssigned[j] == true) && (arrTargets[j].type == TARGET_TANK))\n\t\t{\n\t\t\tconsole.log(\"Check target tanks, idx: \" + j);\n\t\t\tvar temp = g_tanks[g_team][j];\n\t\t\tvar target = arrTargets[j];\n\t\t\tvar opp = target.object;\n\t\t\tvar oppTankIdx = -1;\n\t\t\tfor(var i = 0; i < NUMBER_OF_TANK; i++)\n\t\t\t{\n\t\t\t\tif(g_tanks[g_opponent][i] == opp)\n\t\t\t\t{\n\t\t\t\t\toppTankIdx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(oppTankIdx == -1)\n\t\t\t\tconsole.log(\"========================= CalcExpectedTargets, why oppTankIdx == -1 ???\");\n\t\t\t//if can shoot 'em\n\t\t\tif(CanShootEm(temp, opp.m_x, opp.m_y))\n\t\t\t{\n\t\t\t\tconsole.log(\"CanShootEm\");\n\t\t\t\ttarget.canShoot = true;\n\t\t\t\tif(Math.abs(temp.m_x - opp.m_x) <= 0.5) //vertical\n\t\t\t\t{\n\t\t\t\t\tvar dist = Math.abs(temp.m_y - opp.m_y);\n\t\t\t\t\ttarget.dir2Target = (temp.m_y < opp.m_y)?DIRECTION_DOWN:DIRECTION_UP;\n\t\t\t\t\tif(dist <= TANK_FIGHT_DISTANCE)\n\t\t\t\t\t{\n\t\t\t\t\t\t//stay at current pos\n\t\t\t\t\t\tconsole.log(\"stay at current pos\");\n\t\t\t\t\t\ttarget.x = temp.m_x;\n\t\t\t\t\t\ttarget.y = temp.m_y;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//set target pos \n\t\t\t\t\t\ttarget.x = opp.m_x;//temp.m_x;\n\t\t\t\t\t\ttarget.y = opp.m_y;\n\t\t\t\t\t\t// target.y = (temp.m_y < opp.m_y)?(opp.m_y - TANK_FIGHT_DISTANCE):(opp.m_y + TANK_FIGHT_DISTANCE);\n\t\t\t\t\t\t// while(!IsPositionAvailable(new Position(target.x, target.y), j))\n\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// if(temp.m_y < opp.m_y)\n\t\t\t\t\t\t\t\t// target.y++;\n\t\t\t\t\t\t\t// else\n\t\t\t\t\t\t\t\t// target.y--;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tconsole.log(\"Target pos: (\" + target.x + \",\" + target.y + \")\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse //horizontal\n\t\t\t\t{\n\t\t\t\t\tvar dist = Math.abs(temp.m_x - opp.m_x);\n\t\t\t\t\ttarget.dir2Target = (temp.m_x < opp.m_x)?DIRECTION_RIGHT:DIRECTION_LEFT;\n\t\t\t\t\tif(dist <= TANK_FIGHT_DISTANCE)\n\t\t\t\t\t{\n\t\t\t\t\t\t//stay at current pos\n\t\t\t\t\t\tconsole.log(\"stay at current pos\");\n\t\t\t\t\t\ttarget.x = temp.m_x;\n\t\t\t\t\t\ttarget.y = temp.m_y;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//set target pos \n\t\t\t\t\t\ttarget.y = opp.m_y; //temp.m_y;\n\t\t\t\t\t\ttarget.x = opp.m_x;\n\t\t\t\t\t\t// target.x = (temp.m_x < opp.m_x)?(opp.m_x - TANK_FIGHT_DISTANCE):(opp.m_x + TANK_FIGHT_DISTANCE);\n\t\t\t\t\t\t// while(!IsPositionAvailable(new Position(target.x, target.y), j))\n\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// if(temp.m_x < opp.m_x)\n\t\t\t\t\t\t\t\t// target.x++;\n\t\t\t\t\t\t\t// else\n\t\t\t\t\t\t\t\t// target.x--;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tconsole.log(\"Target pos: (\" + target.x + \",\" + target.y + \")\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //can't shoot atm -> moving to a pos that can shoot\n\t\t\t{\n\t\t\t\tconsole.log(\"!CanShootEm - moving\");\n\t\t\t\ttarget.canShoot = false;\n\t\t\t\t//TODO - check bullet road to make sure that we can shoot opp at target pos \n\t\t\t\tvar pos1 = new Position(temp.m_x, opp.m_y);\n\t\t\t\tvar pos2 = new Position(opp.m_x, temp.m_y);\n\t\t\t\tvar checkPos1 = false;\n\t\t\t\twhile(true)\n\t\t\t\t{\n\t\t\t\t\tif(IsPositionAvailable(pos1, j, oppTankIdx) && CanShootEm2(pos1.x, pos1.y, opp.m_x, opp.m_y))\n\t\t\t\t\t{\n\t\t\t\t\t\tcheckPos1 = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(temp.m_x > opp.m_x)\n\t\t\t\t\t{\n\t\t\t\t\t\tpos1.x--;\n\t\t\t\t\t\tif(pos1.x <= opp.m_x)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpos1.x++;\n\t\t\t\t\t\tif(pos1.x >= opp.m_x)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar checkPos2 = false;\n\t\t\t\twhile(true)\n\t\t\t\t{\n\t\t\t\t\tif(IsPositionAvailable(pos2, j, oppTankIdx) && CanShootEm2(pos2.x, pos2.y, opp.m_x, opp.m_y))\n\t\t\t\t\t{\n\t\t\t\t\t\tcheckPos2 = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(temp.m_y > opp.m_y)\n\t\t\t\t\t{\n\t\t\t\t\t\tpos2.y--;\n\t\t\t\t\t\tif(pos2.y <= opp.m_y)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpos2.y++;\n\t\t\t\t\t\tif(pos2.y >= opp.m_y)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(checkPos1 && \n\t\t\t\t(!checkPos2 || (Math.abs(temp.m_x - pos1.x) + Math.abs(temp.m_y - pos1.y) < Math.abs(temp.m_x - pos2.x) + Math.abs(temp.m_y - pos2.y)))) //should go to pos1\n\t\t\t\t{\n\t\t\t\t\ttarget.x = pos1.x;\n\t\t\t\t\ttarget.y = pos1.y;\n\t\t\t\t}\n\t\t\t\telse if(checkPos2)//should go to pos2\n\t\t\t\t{\n\t\t\t\t\ttarget.x = pos2.x;\n\t\t\t\t\ttarget.y = pos2.y;\n\t\t\t\t}\n\t\t\t\tconsole.log(\"Target pos: (\" + target.x + \",\" + target.y + \")\");\n\t\t\t}\n\t\t}\n\t}\n}", "function eventDefect(a1) {\n var test = getRand();\n\n\n if (test <= window[a1].reliablity) {\n\n var affected = window[a1].owned * 0.8;\n var costperunit = window[a1].cost * 0.2;\n var cost = affected * costperunit;\n\n credits = credits - cost;\n\n console.log(a1 + \" Drone Error: \" + affected + \" Needed Repairs it cost \" + cost + \" Credits to fix\");\n\n } else\n\n console.log(\"safe \" + ranMiner());\n\n}", "function calculateGoldNewTurn() {\n gold += getGoldPerTurn();\n }", "TrafferTrafficAfterHoming(nodei, nodej, home){\n //console.log(\"Home của \" + nodei.label + \" và \" + nodej.label + \" là: \" + home.label)\n let t = 0;\n nodei.processingTraffic.forEach((tra) => {\n if(tra.label == nodej.label){\n t += tra.traffic\n }\n if(tra.label == home.label){\n t += tra.traffic\n }\n });\n\n\n // console.log(t)\n\n nodei.processingTraffic.forEach((tra) => {\n if(tra.label == home.label){\n tra.traffic = t + tra.traffic;\n }\n });\n\n if(nodei.newEraTraffic.length == 0){\n let traf = new Traffic(home.label, t)\n nodei.newEraTraffic.push(traf)\n }else{\n let countForNewEra = 0;\n nodei.newEraTraffic.forEach((traff) => {\n if(traff.label == home.label){\n countForNewEra ++;\n traff.traffic += t;\n }\n });\n\n if(countForNewEra == 0){\n let traf = new Traffic(home.label, t)\n nodei.newEraTraffic.push(traf)\n }\n\n }\n\n }", "function weightedClue(clue) {\n return clue ? clue : -10;\n }", "gainMult() {\n let mult = D(1)\n if(player.grindless)mult=mult.div(3)\n return mult // Factor in any bonuses multiplying gain here.\n }", "function roboteggCollectorOn () {\n if (gameData.roboteggcollectorNum >= 0 && gameData.cash >= gameData.roboteggcollectorCost) {\n gameData.roboteggcollectorNum++;\n gameData.cash -= gameData.roboteggcollectorCost;\n gameData.roboteggcollectorCost = 10 * Math.pow(1.2, gameData.roboteggcollectorNum + 1); \n duckUpdate();\n }\n}", "countNeurons() {\n throw new Error('Unimplemented.');\n }", "function buyGall() {\r\n if(player.gold.num >= player.galleon.price && player.influence >= player.galleon.infMin) {\r\n player.galleon.num++;\r\n player.gold.num -= player.galleon.price;\r\n player.influence += player.galleon.influence;\r\n player.galleon.income = player.galleon.num * player.galleon.gain;\r\n gameLog('Cap\\'n, ye be sure yer not building a war fleet?');\r\n } else {\r\n gameLog('Not chance, Cap\\'n');\r\n };\r\n player.galleon.price = Math.floor(13525 * Math.pow(1.15, player.galleon.num));\r\n document.getElementById('gallCost').innerHTML = player.galleon.price;\r\n document.getElementById('gallNum').innerHTML = player.galleon.num;\r\n document.getElementById('gallGain').innerHTML = player.galleon.income;\r\n document.getElementById('gallInf').innerHTML = player.galleon.influence;\r\n document.getElementById('gold').innerHTML = player.gold.num;\r\n document.getElementById('influence').innerHTML = player.influence;\r\n}", "function getRelicBonuses() {\n\trelicsIndex = myCharacter.relics;\n\tfor(var relicName in relicsIndex) {\n\t\tif(relicsIndex[relicName]['enabled'] == true) {\n\t\t\tfor(var bonusB in relicsIndex[relicName]['relicBoons']) {\n\t\t\t\tmyRelicBonusB.push(bonusB);\n\t\t\t\tmyRelicBonusB2.push(relicsIndex[relicName]['relicBoons'][bonusB]);\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < myRelicBonusB2.length; i++) {\n\t\tswitch(myRelicBonusB2[i]) {\n\t\t\tcase 'numberAnimal':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberAnimal);\n\t\t\tbreak;\n\t\t\tcase 'numberChaos':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberChaos);\n\t\t\tbreak;\n\t\t\tcase 'numberCreation':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberCreation);\n\t\t\tbreak;\n\t\t\tcase 'numberDarkness':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberDarkness);\n\t\t\tbreak;\n\t\t\tcase 'numberDeath':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberDeath);\n\t\t\tbreak;\n\t\t\tcase 'numberEarth':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberEarth);\n\t\t\tbreak;\n\t\t\tcase 'numberFertility':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberFertility);\n\t\t\tbreak;\n\t\t\tcase 'numberFire':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberFire);\n\t\t\tbreak;\n\t\t\tcase 'numberFrost':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberFrost);\n\t\t\tbreak;\n\t\t\tcase 'numberGuardian':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberGuardian);\n\t\t\tbreak;\n\t\t\tcase 'numberHealth':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberHealth);\n\t\t\tbreak;\n\t\t\tcase 'numberIllusion':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberIllusion);\n\t\t\tbreak;\n\t\t\tcase 'numberJustice':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberJustice);\n\t\t\tbreak;\n\t\t\tcase 'numberMagic':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberMagic);\n\t\t\tbreak;\n\t\t\tcase 'numberMoon':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberMoon);\n\t\t\tbreak;\n\t\t\tcase 'numberMystery':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberMystery);\n\t\t\tbreak;\n\t\t\tcase 'numberProphecy':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberProphecy);\n\t\t\tbreak;\n\t\t\tcase 'numberPsychopomp':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberPsychopomp);\n\t\t\tbreak;\n\t\t\tcase 'numberSky':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberSky);\n\t\t\tbreak;\n\t\t\tcase 'numberStar':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberStar);\n\t\t\tbreak;\n\t\t\tcase 'numberSun':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberSun);\n\t\t\tbreak;\n\t\t\tcase 'numberThunder':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberThunder);\n\t\t\tbreak;\n\t\t\tcase 'numberWar':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberWar);\n\t\t\tbreak;\n\t\t\tcase 'numberWater':\n\t\t\tmyRelicBonusB2[i] = nanEqualsZero(numberWater);\n\t\t\tbreak;\n\t\t\tcase 'numberLegend':\n\t\t\tmyRelicBonusB2[i] = myCharacter['coreTraits']['legend'];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0; i < myRelicBonusB.length; i++) {\n\t\tvar relicBonusBoonsToLoad1 = myRelicBonusB[i];\n\t\tvar relicBonusBoonsToLoad2 = myRelicBonusB2[i];\n\t\ttempRelicBonusBoons = nanEqualsZero(myRelicBonusBoons[relicBonusBoonsToLoad1]) + relicBonusBoonsToLoad2;\n\t\tmyRelicBonusBoons[relicBonusBoonsToLoad1] = tempRelicBonusBoons;\n\t}\n\teffectiveNumberAnimal = numberAnimal + nanEqualsZero(myRelicBonusBoons.numberAnimal) + nanEqualsZero(myTempBoons.animal);\n\teffectiveNumberChaos = numberChaos + nanEqualsZero(myRelicBonusBoons.numberChaos) + nanEqualsZero(myTempBoons.chaos);\n\teffectiveNumberCreation = numberCreation + nanEqualsZero(myRelicBonusBoons.numberCreation) + nanEqualsZero(myTempBoons.creation);\n\teffectiveNumberDarkness = numberDarkness + nanEqualsZero(myRelicBonusBoons.numberDarkness) + nanEqualsZero(myTempBoons.darkness);\n\teffectiveNumberDeath = numberDeath + nanEqualsZero(myRelicBonusBoons.numberDeath) + nanEqualsZero(myTempBoons.death);\n\teffectiveNumberEarth = numberEarth + nanEqualsZero(myRelicBonusBoons.numberEarth) + nanEqualsZero(myTempBoons.earth);\n\teffectiveNumberFertility = numberFertility + nanEqualsZero(myRelicBonusBoons.numberFertility) + nanEqualsZero(myTempBoons.fertility);\n\teffectiveNumberFire = numberFire + nanEqualsZero(myRelicBonusBoons.numberFire) + nanEqualsZero(myTempBoons.fire);\n\teffectiveNumberFrost = numberFrost + nanEqualsZero(myRelicBonusBoons.numberFrost) + nanEqualsZero(myTempBoons.frost);\n\teffectiveNumberGuardian = numberGuardian + nanEqualsZero(myRelicBonusBoons.numberGuardian) + nanEqualsZero(myTempBoons.guardian);\n\teffectiveNumberHealth = numberHealth + nanEqualsZero(myRelicBonusBoons.numberHealth) + nanEqualsZero(myTempBoons.health);\n\teffectiveNumberIllusion = numberIllusion + nanEqualsZero(myRelicBonusBoons.numberIllusion) + nanEqualsZero(myTempBoons.illusion);\n\teffectiveNumberJustice = numberJustice + nanEqualsZero(myRelicBonusBoons.numberJustice) + nanEqualsZero(myTempBoons.justice);\n\teffectiveNumberMagic = numberMagic + nanEqualsZero(myRelicBonusBoons.numberMagic) + nanEqualsZero(myTempBoons.magic);\n\teffectiveNumberMoon = numberMoon + nanEqualsZero(myRelicBonusBoons.numberMoon) + nanEqualsZero(myTempBoons.moon);\n\teffectiveNumberMystery = numberMystery + nanEqualsZero(myRelicBonusBoons.numberMystery) + nanEqualsZero(myTempBoons.mystery);\n\teffectiveNumberProphecy = numberProphecy + nanEqualsZero(myRelicBonusBoons.numberProphecy) + nanEqualsZero(myTempBoons.prophecy);\n\teffectiveNumberPsychopomp = numberPsychopomp + nanEqualsZero(myRelicBonusBoons.numberPsychopomp) + nanEqualsZero(myTempBoons.psychopomp);\n\teffectiveNumberSky = numberSky + nanEqualsZero(myRelicBonusBoons.numberSky) + nanEqualsZero(myTempBoons.sky);\n\teffectiveNumberStar = numberStar + nanEqualsZero(myRelicBonusBoons.numberStar) + nanEqualsZero(myTempBoons.star);\n\teffectiveNumberSun = numberSun + nanEqualsZero(myRelicBonusBoons.numberSun) + nanEqualsZero(myTempBoons.sun);\n\teffectiveNumberThunder = numberThunder + nanEqualsZero(myRelicBonusBoons.numberThunder) + nanEqualsZero(myTempBoons.thunder);\n\teffectiveNumberWar = numberWar + nanEqualsZero(myRelicBonusBoons.numberWar) + nanEqualsZero(myTempBoons.war);\n\teffectiveNumberWater = numberWater + nanEqualsZero(myRelicBonusBoons.numberWater) + nanEqualsZero(myTempBoons.water);\n\n\tfor(var relicName in relicsIndex) {\n\t\tif(relicsIndex[relicName]['enabled'] == true) {\n\t\t\tfor(var bonusD in relicsIndex[relicName]['bonusDice']) {\n\t\t\t\tbonusD2 = relicsIndex[relicName]['bonusDice'][bonusD];\n\t\t\t\tbonusD2 = bonusD2.replace(\"#\", \"\");\n\t\t\t\tbonusD2 = capitalizeFirstLetter(bonusD2);\n\t\t\t\tbonusD2 = \"number\" + bonusD2;\n\t\t\t\tmyRelicBonusD.push(bonusD);\n\t\t\t\tmyRelicBonusD2.push(bonusD2);\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < myRelicBonusD2.length; i++) {\n\t\tswitch(myRelicBonusD2[i]) {\n\t\t\tcase 'numberAnimal':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberAnimal;\n\t\t\tbreak;\n\t\t\tcase 'numberChaos':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberChaos;\n\t\t\tbreak;\n\t\t\tcase 'numberCreation':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberCreation;\n\t\t\tbreak;\n\t\t\tcase 'numberDarkness':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberDarkness;\n\t\t\tbreak;\n\t\t\tcase 'numberDeath':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberDeath;\n\t\t\tbreak;\n\t\t\tcase 'numberEarth':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberEarth;\n\t\t\tbreak;\n\t\t\tcase 'numberFertility':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberFertility;\n\t\t\tbreak;\n\t\t\tcase 'numberFire':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberFire;\n\t\t\tbreak;\n\t\t\tcase 'numberFrost':\n\t\t\tmyRelicBonusD2[i] = effectiveNumerFrost;\n\t\t\tbreak;\n\t\t\tcase 'numberGuardian':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberGuardian;\n\t\t\tbreak;\n\t\t\tcase 'numberHealth':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberHealth;\n\t\t\tbreak;\n\t\t\tcase 'numberIllusion':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberIllusion;\n\t\t\tbreak;\n\t\t\tcase 'numberJustice':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberJustice;\n\t\t\tbreak;\n\t\t\tcase 'numberMagic':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberMagic;\n\t\t\tbreak;\n\t\t\tcase 'numberMoon':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberMoon;\n\t\t\tbreak;\n\t\t\tcase 'numberMystery':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberMystery;\n\t\t\tbreak;\n\t\t\tcase 'numberProphecy':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberProphecy;\n\t\t\tbreak;\n\t\t\tcase 'numberPsychopomp':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberPsychopomp;\n\t\t\tbreak;\n\t\t\tcase 'numberSky':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberSky;\n\t\t\tbreak;\n\t\t\tcase 'numberStar':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberStar;\n\t\t\tbreak;\n\t\t\tcase 'numberSun':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberSun;\n\t\t\tbreak;\n\t\t\tcase 'numberThunder':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberThunder;\n\t\t\tbreak;\n\t\t\tcase 'numberWar':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberWar;\n\t\t\tbreak;\n\t\t\tcase 'numberWater':\n\t\t\tmyRelicBonusD2[i] = effectiveNumberWater;\n\t\t\tbreak;\n\t\t\tcase 'numberLegend':\n\t\t\tmyRelicBonusD2[i] = myCharacter['coreTraits']['legend'];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0; i < myRelicBonusD.length; i++) {\n\t\tvar relicBonusDiceToLoad1 = myRelicBonusD[i];\n\t\tvar relicBonusDiceToLoad2 = myRelicBonusD2[i];\n\t\ttempRelicBonusDice = nanEqualsZero(myRelicBonusDice[relicBonusDiceToLoad1]) + relicBonusDiceToLoad2;\n\t\tmyRelicBonusDice[relicBonusDiceToLoad1] = tempRelicBonusDice;\n\t}\n\n\n\n\tfor(var relicName in relicsIndex) {\n\t\tif(relicsIndex[relicName]['enabled'] == true) {\n\t\t\tfor(var itemE in relicsIndex[relicName]['itemEnhancements']) {\n\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\n}", "function calcMaxPossibleBTGain() {\n var a = getAge();\n var d = getDay();\n var trainingDaysLeft = getTP()/2;\n while (a <= plateau_age) {\n // use constants for the length of the offseason and preseason\n d++;\n if (d>(40+offseasonLength)) {\n d = (0-preseasonLength);\n }\n if (d>0 && d<41) {\n a++;//seasonal day, add age\n }\n trainingDaysLeft++;\n }\n return (trainingDaysLeft-1)*6;\n}", "function teddyAfrica(totalKids)\n {\n //Calculate how much it would cost\n //One bear costs 12 dollars\n var oneBear = 12;\n var howMuch = (oneBear*totalKids);\n return howMuch;\n }", "function activ_dist(){\n if(distance_token == 0){\n distance_token = 1;\n score_actu();\n }\n}", "function ok2(){ \n if(j-avain2<0){\n \n r=29-avain2+j;\n \n \n }\n else{\n r=(j-avain2);\n \n }\n}", "static getRefreshCost() {\n let notComplete = player.completedQuestList.filter((elem) => { return !elem(); }).length;\n return Math.floor(250000 * Math.LOG10E * Math.log(Math.pow(notComplete, 4) + 1));\n }", "function uppdateraAllaKlossar() {\n /* Skapa rader */\n for (let j = 1; j < 6; j++) {\n /* Skapa klossar */\n for (let i = 0; i < 6; i++) {\n if (!klossar[j][i].hit) {\n ritaKlossar(45 + i * 120, j * 50);\n }\n }\n }\n }", "function uppdateraAllaKlossar() {\n /* Skapa rader */\n for (let j = 1; j < 5; j++) {\n /* Skapa klossar */\n for (let i = 0; i < 6; i++) {\n if (!klossar[j][i].hit) {\n ritaKloss(40 + i * 120, j * 50);\n }\n }\n }\n }", "function lawOfDecay(gridCell) { gridCell.KineticEnergy *= decayRate;}", "function gm_attack(direction, pow1id, pow2id, zid, room, opponent_team, card1, normal_attack, underdog, tiebreaker, bribe, ambush) { /* (ttt.up, ) */\r\n\tlet spiked = false;\r\n\tlet reach_target = false;\r\n\tlet target_team = null;\r\n\t//if (direction(zid)>=0)\r\n\t\t//console.log(\"0/2 gm_attack: \",direction(zid),\" \",room.game.board[direction(zid)][0]);\r\n\tif (direction(zid)>=0 && room.game.board[direction(zid)][0]!=\"\") { /* has card */\r\n\t\t//console.log(\"1/2 gm_attack: \",direction(zid),\" \",room.game.board[direction(zid)][0]);\r\n\t\tlet target_card_id = null;\r\n\t\tlet target_zone_id = null;\r\n\t\tif (room.game.board[direction(zid)][2]===opponent_team) { /* is enemy card */\r\n\t\t\ttarget_card_id = parseInt(room.game.board[direction(zid)][1])-1;\r\n\t\t\ttarget_zone_id = direction(zid);\r\n\t\t\tif (room.game.board[direction(zid)][0]===opponent_team) { /* whose deck is it from? */\r\n\t\t\t\ttarget_team = opponent_team;\r\n\t\t\t} else {\r\n\t\t\t\ttarget_team = (opponent_team===\"X\"?\"O\":\"X\");\r\n\t\t\t}\r\n\t\t} else \r\n\t\tif (room.game.board[direction(zid)][2]===(opponent_team===\"X\"?\"O\":\"X\")) { /* is allied card */\r\n\t\t\tif ((card1[4]===6 || card1[5]===6) && direction(direction(zid))>=0 && room.game.board[direction(direction(zid))][2]===opponent_team) { // [R]each\r\n\t\t\t\ttarget_card_id = parseInt(room.game.board[direction(direction(zid))][1])-1;\r\n\t\t\t\ttarget_zone_id = direction(direction(zid));\r\n\t\t\t\treach_target = true;\r\n\t\t\t\tif (room.game.board[direction(direction(zid))][0]===opponent_team) { /* whose deck is it from? */\r\n\t\t\t\t\ttarget_team = opponent_team;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget_team = (opponent_team===\"X\"?\"O\":\"X\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (target_card_id!=null) {\r\n\t\t\t//console.log(\"2/2 gm_attack: \",card2);\r\n\t\t\tlet card2 = null; \r\n\t\t\tif (room.game.players[0].team===target_team) { \r\n\t\t\t\tcard2 = room.game.players[0].deck[target_card_id]; \r\n\t\t\t}\r\n\t\t\telse if (room.game.players[1].team===target_team) { \r\n\t\t\t\tcard2 = room.game.players[1].deck[target_card_id];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconsole.log(\"\\n{we should never get here #1}\\n\");\r\n\t\t\t}\r\n\t\t\tif (card2!=null) { /* we are gm_attacking this card */\r\n\t\t\t\tlet has_chain = (card2[4]==7 || card2[5]==7);\r\n\t\t\t\tlet pow1 = card1[pow1id];\r\n\t\t\t\tlet pow2 = card2[pow2id];\r\n\t\t\t\tlet cost1 = card1[0]+card1[1]+card1[2]+card1[3];\r\n\t\t\t\tlet cost2 = card2[0]+card2[1]+card2[2]+card2[3];\r\n\t\t\t\tif (pow1>pow2) { /* [N]ormal gm_attack */\r\n\t\t\t\t\tnormal_attack[0]+=1;\r\n\t\t\t\t\tnormal_attack[1]+=pow2;\r\n\t\t\t\t\tnormal_attack[2].push([target_card_id+1,target_zone_id+1,target_team,has_chain]);\r\n\t\t\t\t}\r\n\t\t\t\tif (pow1===pow2 && cost1<cost2) { /* [U]nderdog */\r\n\t\t\t\t\tunderdog[0]+=1;\r\n\t\t\t\t\tunderdog[1]+=pow2;\r\n\t\t\t\t\tunderdog[2].push([target_card_id+1,target_zone_id+1,target_team,has_chain]);\r\n\t\t\t\t}\r\n\t\t\t\tif (pow1===pow2) { /* [T]iebreaker */\r\n\t\t\t\t\ttiebreaker[0]+=1;\r\n\t\t\t\t\ttiebreaker[1]+=pow2;\r\n\t\t\t\t\ttiebreaker[2].push([target_card_id+1,target_zone_id+1,target_team,has_chain]);\r\n\t\t\t\t}\r\n\t\t\t\tif (cost1===cost2) { /* [B]ribe */\r\n\t\t\t\t\tbribe[0]+=1;\r\n\t\t\t\t\tbribe[1]+=pow2;\r\n\t\t\t\t\tbribe[2].push([target_card_id+1,target_zone_id+1,target_team,has_chain]);\r\n\t\t\t\t}\r\n\t\t\t\tif (true) { /* [A]mbush */\r\n\t\t\t\t\tambush[0]+=1;\r\n\t\t\t\t\tambush[1]+=pow2;\r\n\t\t\t\t\tambush[2].push([target_card_id+1,target_zone_id+1,target_team,has_chain]);\r\n\t\t\t\t}\r\n\t\t\t\tif((card2[4]===9 || card2[5]===9) && reach_target===false && pow1<pow2) {\r\n\t\t\t\t\tspiked = true;\r\n\t\t\t\t}\r\n\t\t\t\treturn spiked;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn spiked;\r\n}", "function hotelCost(n) {\n var taka;\n if (n <= 10 ) {\n taka = n * 100;\n }\n else if (n <= 20 ) {\n taka = n * 80;\n }\n else if (n => 21 ) {\n taka =n * 50;\n }\n return taka;\n\n}", "DiplomaticEffectOfAcquiringPlanet( p ) { \n\t\t// neighbors may not like our being here\n\t\tlet civs = p.star.CivsWithNoStarSharingTreaties(this);\n\t\tfor ( let civ of civs ) {\n\t\t\tthis.EndTreaty( 'NO_STAR_SHARING', civ, true ); // automatically handles reputation log \n\t\t\t}\n\t\tlet neighbors = p.star.planets.filter( p => p.owner && p.owner!=this ).map( p => p.owner ).unique();\n\t\tfor ( let civ of neighbors ) {\n\t\t\tciv.LogDiploEvent( this, -5, 'starmates', `You settled planet ${p.name} in our turf.` );\n\t\t\t}\n\t\t}", "function checkForAdmiralBonus() {\n\n if (board.length >= 5) {\n\n if('Admiral' in getPlayerCards()) {\n\n if (playerMoves > 0 && !admiralBonusGiven) {\n \n admiralBonus = getPlayerCards().Admiral * 2;\n \n for (let i = 0; i < admiralBonus; i++) {\n players[actingPlayer].coins.push(deck.pop());\n }\n displayBoards();\n admiralBonusGiven = true;\n showModal('admiral bonus');\n }\n }\n } \n}", "function getGramsFromOunces(ounces) {\nreturn ounces * 28.3495;\n}", "gainMult() { // Calculate the multiplier for main currency from bonuses\r\n mult = new ExpantaNum(1)\r\n return mult\r\n }", "function numAngels(amount) {\n\treturn Math.floor(150*Math.sqrt(amount/1e15));\n}", "function gallonstoLiters(gallon){\n return gallon / 0.26417;\n}", "function glance(members) {\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"D\") {\n statistics.Democrats.n_reps += 1;\n }\n }\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n statistics.Republicans.n_reps += 1;\n }\n }\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"I\") {\n statistics.Independents.n_reps += 1;\n }\n }\n\n statistics.Total.n_reps =\n statistics.Independents.n_reps +\n statistics.Republicans.n_reps +\n statistics.Democrats.n_reps;\n\n var votesWPT = 0;\n\n for (var i = 0; i < members.length; i++) {\n votesWPT = votesWPT + members[i].votes_with_party_pct;\n statistics.Total.vote_w_party =\n (votesWPT / statistics.Total.n_reps).toFixed(2) + \"%\";\n }\n\n var votesWPD = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"D\") {\n votesWPD = votesWPD + members[i].votes_with_party_pct;\n statistics.Democrats.vote_w_party =\n (votesWPD / statistics.Democrats.n_reps).toFixed(2) + \"%\";\n }\n }\n\n var votesWPR = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n votesWPR = votesWPR + members[i].votes_with_party_pct;\n statistics.Republicans.vote_w_party =\n (votesWPR / statistics.Republicans.n_reps).toFixed(2) + \"%\";\n }\n }\n\n var votesWPI = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"I\") {\n votesWPI = votesWPI + members[i].votes_with_party_pct;\n statistics.Independents.vote_w_party =\n (votesWPI / statistics.Independents.n_reps).toFixed(2) + \"%\";\n }\n }\n\n //For with an Object to add .js to .html:\n\n var glance = document.getElementById(\"glance\");\n\n for (var party in statistics) {\n var row = document.createElement(\"tr\");\n var partyCell = document.createElement(\"td\");\n partyCell.innerHTML = party;\n var repsCell = document.createElement(\"td\");\n repsCell.innerHTML = statistics[party].n_reps;\n var voteCell = document.createElement(\"td\");\n voteCell.innerHTML = statistics[party].vote_w_party;\n row.append(partyCell, repsCell, voteCell);\n glance.appendChild(row);\n }\n}", "function checkObjectives() {\n // A Humble Beginning (1565 - 1650)\n if (((population.colonist.number * population.colonist.rate) + ((population.slave.number / population.slave.increment) * population.slave.rate) >= 10) && (population.merchant.rate2 >= 5)) {\n timePeriod[0].tracker[0] = 0;\n }\n if (population.number >= 50000) {\n timePeriod[0].tracker[2] = 0;\n }\n \n // War Is Too Expensive (1763 - 1775)\n if (population.minutemen.number >= 100) {\n timePeriod[2].tracker[3] = 0;\n }\n if (currency.colonialNotes.amount >= 2000000) {\n timePeriod[2].tracker[4] = 0;\n }\n}", "function threatenedPoints(opts) {\n let threatened = [];\n let enemy = enemySnakes(opts);\n for (snake of enemy) {\n moves = possibleMoves(snake.body[0]);\n threatened = threatened.concat(moves);\n }\n \n return threatened;\n }", "bestGuess() {\n const bestChromosome = this._bestChromosome();\n return [bestChromosome.calcCostAgainst(this.goal), bestChromosome.code];\n }", "function C012_AfterClass_Jennifer_Ungag() {\n\tActorUngag();\n\tC012_AfterClass_Jennifer_CalcParams();\n\tCurrentTime = CurrentTime + 50000;\n}", "function calculateWinners(snapshot, penguins) {\n let rank = snapshot.replace(/~/g, '--').match(/p-*/gi).map((dist, i) => [ dist.length, penguins[i] ]).sort((a, b) => a[0] - b[0]).map(p => p[1]);\n return `GOLD: ${rank[0]}, SILVER: ${rank[1]}, BRONZE: ${rank[2]}`;\n}", "function endEvaluation(){\n //find average score\n var totalScore = 0\n var averageScore = 0\n\n //variable mutation...\n for(var i = 0; i < neat.popsize; i++){\n totalScore += abs(players[0].brain.score)\n }\n averageScore = totalScore / neat.popsize\n //console.log(averageScore,totalScore)\n\n neat.mutationRate = averageScore <= 1000 ? Math.round((1 - (averageScore/1000)) * 1 * 1000) / 1000 : 0 \n\n if(neat.mutationRate == 0 && firstConvergence == -1 && neat.generation && totalScore > 10000){\n if(neat.generation > 10){\n firstConvergence = neat.generation\n $('#firstConvergence').html(firstConvergence)\n }\n }\n\n // Networks shouldn't get too big\n for(var genome in neat.population){\n genome = neat.population[genome];\n //genome.score -= genome.nodes.length * SCORE_RADIUS / 10;\n genome.score -= genome.nodes.length * SCORE_RADIUS / 50;\n }\n\n // Sort the population by score\n neat.sort();\n\n // Draw the best genome\n drawGraph(neat.population[0].graph($('.best').width()/2, $('.best').height()/2), '.best');\n\n // Init new pop\n var newPopulation = [];\n\n // Elitism\n for(var i = 0; i < neat.elitism; i++){\n newPopulation.push(neat.population[i]);\n //newPopulation[i].brainIdx = i\n }\n\n // Breed the next individuals\n for(var i = 0; i < neat.popsize - neat.elitism; i++){\n newPopulation.push(neat.getOffspring());\n }\n\n // Replace the old population with the new population\n neat.population = newPopulation;\n neat.mutate();\n\n neat.generation++;\n $('#generation').html(neat.generation)\n $('#mutationRate').html(neat.mutationRate)\n\n startEvaluation();\n}", "function manhattan(tile){\n if (tile){\n return Math.abs(tile.row - tile.goalRow) + Math.abs(tile.col - tile.goalCol);\n }else{\n return 0;\n }\n}", "totalNaive() {\n let total = BigInt(0);\n for( let square = 1; square <= this.CHESSBOARD_SQUARES; ++square ) {\n total = total.add( this.grainsInSquare(square) );\n }\n return total.toString();\n }", "gambler(stake, goal, bet) {\n var win = 0\n var loss = 0\n var cash = stake;\n for (var i = 1; i <= bet; i++) {\n while (cash > 0 && cash < goal) {\n if (Math.random() < 0.5) {\n cash++\n\n }\n else {\n cash--\n }\n }\n if (cash == goal) {\n win++\n }\n else {\n loss++\n }\n }\n\n\n var per_win = win / bet * 100;\n var per_loss = loss / bet * 100;\n //var per_loss=100-per_win\n //loss=bet-win;\n\n console.log(\"percentage of win is \" + per_win);\n console.log(\"percentage of loss is \" + per_loss);\n console.log(\"win \" + win);\n console.log(\"loss :\" + loss);\n\n\n\n\n\n\n\n }", "function charaterGen(){\n luke.AP = 5;\n luke.HP = 100;\n obiwan.AP = 9;\n obiwan.HP = 120;\n maul.AP = 13;\n maul.HP = 150;\n sidious.AP = 17;\n sidious.HP = 180;\n}", "function calculatePlan(actor) \n{\n var teamColor = actor.getKnowledge(\"team_color\");\n var otherFlag = teamColor == \"red\" ? flag_green.position : flag_red.position;\n var ownFlag = teamColor == \"red\" ? flag_red.position : flag_green.position;\n\n var planner = new Planner();\n var actionSet = [new MoveToFlagAction(teamColor, ownFlag), \n \t\t\t\t new MoveToFlagAction(teamColor, otherFlag),\n \t\t\t\t new ReloadAction(),\n \t\t\t\t new ShootAction()]\n\n var allActions = {}\n \tvar preconditionSet = []\n\tfor(var i = 0; i < actionSet.length; ++i) {\n\t\tvar action = actionSet[i]\n\t planner.addAction(action.precondition,\n\t action.postcondition,\n\t action.cost,\n\t action.perform, \n\t action.name);\n\n\t allActions[action.name] = action\n\t preconditionSet = preconditionSet.concat(action.preconditions)\n }\n\n //var tree = [\"[L3\",\"[S2\",\"s\",\"r\",\"[S4\",{\"enemy_in_range\":true},\"t\",\"[S2\",\"s\",\"r\",\"s\",\"[S2\",\"g\",\"r\"]\n //printTree(treeFromString(tree,0,allActions).root)\n\n testApproachRandom(10);\n //testApproachRandom(0, allActions, {\"made_points\" : true});\n}", "function fl_outToGvina ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t}}", "function idGua(guaCode) {\n\t//Gua[0] is the upper trigram; Gua[1] is the lower trigram\n var jiuGua = 0, //Old situation\n\tyiGua = 0, //The situation which affects the change\n\txinGua =0; //New situation\n\n\tfor (i=0; i<6; i++) {\n\t if (guaCode[i] === 3) { //Yang changes to Yin\n\t\tjiuGua += 9 * (Math.pow(10,i));\t//Yang\n\t\tyiGua += 9 * (Math.pow(10,i));\t//Active\n\t\txinGua += 6 * (Math.pow(10,i));\t//Yin\n\t } else if (guaCode[i] === 4) { //Yin stays yin\n\t\tjiuGua += 6 * (Math.pow(10,i));\t//Yin\n\t\tyiGua += 6 * (Math.pow(10,i));\t//Passive\n\t\txinGua += 6 * (Math.pow(10,i));\t//Yin\n\t } else if (guaCode[i] === 5) { //Yang stays Yang\n\t\tjiuGua += 9 * (Math.pow(10,i));\t//Yang\n\t\tyiGua += 6 * (Math.pow(10,i));\t//Passive\n\t\txinGua += 9 * (Math.pow(10,i));\t//Yang\n\t } else { //if (guaCode[i] === 6) { //Yin changes to Yang\n\t\tjiuGua += 6 * (Math.pow(10,i));\t//Yin\n\t\tyiGua += 9 * (Math.pow(10,i));\t//Active\n\t\txinGua += 9 * (Math.pow(10,i));\t//Yang\n\t }\n\t}\n\n\tfunction nameGua(gua) {\n\t\tif (gua === 669669) {\n\t\t\treturn '51';\n\t\t} else if (gua === 969669) {\n\t\t\treturn '21';\n\t\t} else if (gua === 699669) {\n\t\t\treturn '17';\n\t\t} else if (gua === 999669) {\n\t\t\treturn '25. Wu Wang: Innocence |||';\n\t\t} else if (gua === 996669) {\n\t\t\treturn '42. Yi: Increase |||';\n\t\t} else if (gua === 696669) {\n\t\t\treturn '3';\n\t\t} else if (gua === 966669) {\n\t\t\treturn '27. Yi: The corners of the Mouth |||';\n\t\t} else if (gua === 666669) {\n\t\t\treturn '24. Fu: Return ||';\n\n\n\t\t} else if (gua === 669969) {\n\t\t\treturn '55';\n\t\t} else if (gua === 969969) {\n\t\t\treturn '30';\n\t\t} else if (gua === 699969) {\n\t\t\treturn '49';\n\t\t} else if (gua === 999969) {\n\t\t\treturn '13. Tong Ren: Fellowship with People |||';\n\t\t} else if (gua === 996969) {\n\t\t\treturn '37';\n\t\t} else if (gua === 696969) {\n\t\t\treturn '63';\n\t\t} else if (gua === 966969) {\n\t\t\treturn '22';\n\t\t} else if (gua === 666969) {\n\t\t\treturn '36';\n\n\n\t\t} else if (gua === 669699) {\n\t\t return '54';\n\t\t} else if (gua === 969699) {\n\t\t return '38';\n\t\t} else if (gua === 699699) {\n\t\t return '58';\n\t\t} else if (gua === 999699) {\n\t\t return '10. Lu: Treading |||';\n\t\t} else if (gua === 996699) {\n\t\t return '61. Zhong Fu: Inner Truth |||';\n\t\t} else if (gua === 696699) {\n\t\t return '60';\n\t\t} else if (gua === 966699) {\n\t\t return '41. Sun: Decrease |||';\n\t\t} else if (gua === 666699) {\n\t\t return '19. Lin: Approach ||';\n\n\n\t\t} else if (gua === 669999) {\n\t\t return '34. Da Zhuang: The Power of the Great ||';\n\t\t} else if (gua === 969999) {\n\t\t return '14. Da Yu: Possession in Great Measure |||';\n\t\t} else if (gua === 699999) {\n\t\t return '43. Guai: Break-through ||';\n\t\t} else if (gua === 999999) {\n\t\t return '1. Qian: The Creative |';\n\t\t} else if (gua === 996999) {\n\t\t return '9. Xiao Chu: The Taming Power of the Small |||';\n\t\t} else if (gua === 696999) {\n\t\t return '5';\n\t\t} else if (gua === 966999) {\n\t\t return '26. Da Chu: The Taming Power of the Great |||';\n\t\t} else if (gua === 666999) {\n\t\t return '11. Tai: Peace ||';\n\n\n\t\t} else if (gua === 669996) {\n\t\t return '32. Heng: Duration |||';\n\t\t} else if (gua === 969996) {\n\t\t return '50';\n\t\t} else if (gua === 699996) {\n\t\t return '28. Da Guo: Preponderance of the Great |||';\n\t\t} else if (gua === 999996) {\n\t\t return '44. Gou: Coming to Meet ||';\n\t\t} else if (gua === 996996) {\n\t\t return '57';\n\t\t} else if (gua === 696996) {\n\t\t return '48';\n\t\t} else if (gua === 966996) {\n\t\t return '18';\n\t\t} else if (gua === 666996) {\n\t\t return '46. Sheng: Pushing Upward |||';\n\n\n\t\t} else if (gua === 669696) {\n\t\t return '40';\n\t\t} else if (gua === 969696) {\n\t\t return '64';\n\t\t} else if (gua === 699696) {\n\t\t return '47';\n\t\t} else if (gua === 999696) {\n\t\t return '6';\n\t\t} else if (gua === 996696) {\n\t\t return '59';\n\t\t} else if (gua === 696696) {\n\t\t return '29';\n\t\t} else if (gua === 966696) {\n\t\t return '4';\n\t\t} else if (gua === 666696) {\n\t\t return '7. Shi: The Army |||';\n\n\n\t\t} else if (gua === 669966) {\n\t\t return '62. Xiao Guo: Preponderance of the Small |||';\n\t\t} else if (gua === 969966) {\n\t\t return '56';\n\t\t} else if (gua === 699966) {\n\t\t return '31. Xian: Influence |||';\n\t\t} else if (gua === 999966) {\n\t\t return '33. Dun: Retreat ||';\n\t\t} else if (gua === 996966) {\n\t\t return '53';\n\t\t} else if (gua === 696966) {\n\t\t return '39';\n\t\t} else if (gua === 966966) {\n\t\t return '52';\n\t\t} else if (gua === 666966) {\n\t\t return '15. Qian: Modesty |||';\n\n\n\t\t} else if (gua === 669666) {\n\t\t return '16. Yu: Enthusiasm |||';\n\t\t} else if (gua === 969666) {\n\t\t return '35';\n\t\t} else if (gua === 699666) {\n\t\t return '45. Cui: Gathering Together |||';\n\t\t} else if (gua === 999666) {\n\t\t return '12. Pi: Standstill ||';\n\t\t} else if (gua === 996666) {\n\t\t return '20. Guan: Contempation ||';\n\t\t} else if (gua === 696666) {\n\t\t return '8. Bi: Holding Together |||';\n\t\t} else if (gua === 966666) {\n\t\t return '23. Bo: Splitting Apart ||';\n\t\t} else if (gua === 666666) {\n\t\t return '2. Kun: The Receptive |';\n\t\t} else { return gua; }\n\t}\n\t\n\treturn (nameGua(jiuGua) + '\\n' + nameGua(yiGua) + '\\n' + nameGua(xinGua));\n\t//return jiuGua + '\\n' + yiGua + '\\n' + xinGua;\n}", "function moneyProducers() {\n\tmoneyClicks += workers;\n\tmoneyClicks += teamLeader * teamLeaderMPS;\n\tmoneyClicks += manager * managerMPS;\n\n}", "function luckBalance(k, contests) {\n let importantes =[];\n let noimportantes=[];\n let aux= [];\n console.log(contests)\n contests.forEach((e1,index1)=>{\n e1.forEach((e2,index,arr)=>{\n if(index==1){\n if(e2==1){\n importantes.push(arr[index-1]);\n aux.push(arr[index-1]);\n }\n }\n if(index==1){\n if(e2==0){\n noimportantes.push(arr[index-1]);\n }\n }\n \n \n \n });\n });\n importantes.sort(function(a, b){return a-b});\n aux.sort(function(a, b){return a-b});\n console.log(\"primero: importantes: \"+importantes +\" no importantes: \"+noimportantes+\" por restar: \"+aux);\n \n let lose= importantes.length-k;\n aux.splice(lose,aux.length-1);\n //aux.splice(lose, aux.length-1);\n importantes.splice(0,lose);\n let sumai= 0;\n let sumani=0;\n let sumau=0;\n importantes.forEach(e=> sumai+=e);\n noimportantes.forEach(e=> sumani+=e);\n aux.forEach(e=>sumau+=e);\n let lucky = sumai+sumani-sumau;\nconsole.log(\"importantes: \"+importantes +\" no importantes: \"+noimportantes+\" perdida: \"+lose+ \"por restar: \"+aux);\nreturn lucky;\n}", "function portals(maxTime, manacost) {\n\n let isVisited = new Array(manacost.length).fill([])\n isVisited = isVisited.map(v => new Array(manacost[0].length).fill(0))\n\n isInRange = (x, y) => x >= 0 && y >= 0 && x < manacost.length\n && y < manacost[0].length\n\n isDupCoord = ([x, y], [a, b]) => x == a && y == b\n\n const direction = [[-1, 0], [0, 1], [1, 0], [0, -1]]\n\n bfs = ([x, y], signal) => {\n let res = []\n\n let queue = [{x, y, time: 0, manaCost: manacost[x][y]}]\n isVisited[x][y] = 1\n while(queue.length > 0){\n let data = queue.shift()\n\n if(data.time > maxTime)\n continue;\n\n if(data.x == manacost.length-1 && data.y == manacost[0].length-1 && signal)\n return 0\n\n res.push(data)\n\n for(let d of direction){\n let dX = d[0] + data.x\n let dY = d[1] + data.y\n if(isInRange(dX, dY) && isVisited[dX][dY] == 0 && manacost[dX][dY] > -1){\n isVisited[dX][dY] = 1\n queue.push({x: dX, y: dY, time: data.time + 1, manaCost: manacost[dX][dY]})\n }\n }\n }\n\n\n return res\n }\n\n let topToDown = bfs([0, 0], true)\n if(topToDown == 0) return 0\n\n isVisited = isVisited.map(v => v.map(t => 0))\n let downToTop = bfs([manacost.length-1, manacost[0].length-1], false)\n\n topToDown = topToDown.sort((a, b) => a.manaCost - b.manaCost)\n downToTop = downToTop.sort((a, b) => a.manaCost - b.manaCost)\n\n let portal = 1000000000\n\n console.log(topToDown, downToTop)\n\n for(let ttd of topToDown){\n for(let dtt of downToTop){\n if(ttd.time + dtt.time <= maxTime && !isDupCoord([ttd.x, ttd.y], [dtt.x, dtt.y])){\n portal = portal > ttd.manaCost + dtt.manaCost ? ttd.manaCost + dtt.manaCost : portal\n }\n }\n }\n\n return portal\n}", "function buyGB() {\r\n if(player.gold.num >= player.gunboat.price && player.influence >= player.gunboat.infMin) {\r\n player.gunboat.num++;\r\n player.gold.num -= player.gunboat.price;\r\n player.influence += player.gunboat.influence;\r\n player.gunboat.income = player.gunboat.num * player.gunboat.gain;\r\n gameLog('Shiver me timbers! A ship to feel slightly threatened by!');\r\n } else {\r\n gameLog('Avast Cap\\'n, ye\\'ve not enough resources!');\r\n }; \r\n player.gunboat.price = Math.floor(15 * Math.pow(1.37, player.gunboat.num));\r\n document.getElementById('gunCost').innerHTML = player.gunboat.price;\r\n document.getElementById('gunNum').innerHTML = player.gunboat.num;\r\n document.getElementById('gunGain').innerHTML = player.gunboat.income;\r\n document.getElementById('gunInf').innerHTML = player.gunboat.influence;\r\n document.getElementById('gold').innerHTML = player.gold.num;\r\n document.getElementById('influence').innerHTML = player.influence;\r\n}", "function niveau1() {\n\ttable = [\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t\t[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n\t];\n}", "function goalScored() {\n if (puckPosX + radius < 0) {\n awayScore += 1;\n document.getElementById(\"away\").innerHTML = \"AWAY \" + awayScore;\n return true;\n } else if (puckPosX - radius > c.width) {\n homeScore += 1;\n document.getElementById(\"home\").innerHTML = \"HOME \" + homeScore; \n document.getElementById(\"away\").innerHTML = \"AWAY \" + awayScore;\n return true;\n }\n }", "Gambler(stake, goal, trials) {\n var bets = 0; // total number of bets made\n var wins = 0; // total number of games won\n\n // repeat trials times\n for (var t = 0; t < trials; t++) {\n\n // do one gambler's ruin simulation\n var cash = stake;\n while (cash > 0 && cash < goal) {\n bets++;\n if (Math.random() < 0.5) cash++; // win $1\n else cash--; // lose $1\n }\n if (cash == goal) wins++; // did gambler go achieve desired goal?\n }\n\n // print results\n console.log(wins + \" wins of \" + trials);\n var ps = 100.0 * wins;\n var b = ps / trials;\n console.log(\"Percent of games won = \" + 100.0 * wins / trials);\n var d = 1.0 * bets;\n var s = d / trials;\n console.log(\"Avg # bets = \" + 1.0 * bets / trials);\n\n }", "function gainAuto(){\n // Calculate GainPerSec - I should do something like foreach so things can generate other stuff too, and not //\n // strictly define them, but ADD them //\n\n game[game.weed.generates].gainPerSec = new Decimal(game.weed.amount).mul(game.weed.power).sub(game.noteGenerators.consumesPerSec*game.noteGenerators.amount);\n game[game.weedPlants.generates].gainPerSec = new Decimal(game.weedPlants.amount).mul(game.weedPlants.power);\n game[game.songs.generates].gainPerSec = new Decimal(game.songs.amount).mul(game.songs.power);\n\n game.notes.gainPerSec = new Decimal(game.noteGenerators.amount).mul(game.noteGenerators.power);\n game.phrases.gainPerSec = new Decimal(game.notes.gainPerSec).div(game.phrases.buys);\n game.chains.gainPerSec = new Decimal(game.notes.gainPerSec).div(game.chains.buys);\n game.songs.gainPerSec = new Decimal(game.notes.gainPerSec).div(game.songs.buys);\n\n game.notes.amount = new Decimal(game.notes.amount).plus(game.notes.gainPerSec/(1000/game.tickspeed))\n game.creativity.amount = new Decimal(game.creativity.amount).plus(game.creativity.gainPerSec/(1000/game.tickspeed));\n game.money.amount = new Decimal(game.money.amount).plus(game.money.gainPerSec/(1000/game.tickspeed));\n game.weed.amount = new Decimal(game.weed.amount).plus(game.weed.gainPerSec/(1000/game.tickspeed));\n\n if(new Decimal(game.creativity.amount).lte(0)){\n game.creativity.amount = new Decimal(0);\n }\n }", "smaAdvancing() {\r\n\r\n }", "function isloss() {\n clickcount = 0;\n $(\"#currentcount\").text(\"CLICK COUNT IS: \" + clickcount);\n loss++;\n $(\"#loss\").text(\"LOSSES: \" + loss);\n coguess = compguessed();\n $(\"#randomv\").text(\"YOUR TARGET IS :\" + coguess);\n crys1 = crystall();\n crys2 = crystall();\n crys3 = crystall();\n crys4 = crystall();\n }", "function haveFullGoldBonus() {\n return getGold() >= 150;\n}", "function adjustPlayer3GP() {\n for (let i = 0; i < Player[2].Hand.length; i++) {\n Player[2].Points += Player[2].Hand[i];\n }\n Player[0].Points += 10;\n Player[1].Points += 10;\n Player[3].Points += 10;\n console.log('adding one to count ' + roundCount)\n roundCount++;\n\n }", "willLikelySurvive() {\n let returnPercentage = 0;\n this.dna.forEach(item => item === 'C' || item === 'G' ? returnPercentage += 1/this.dna.length : '');\n return returnPercentage >= .6 ? true : false;\n }", "function countArmy() {\n var sum = 0;\n _.each(this.player.countries, function(i) {\n sum += g.nodes[i].army;\n })\n return sum;\n }", "baseAmount() {return inChallenge(\"m\",11)?player.points:player.l1.points}", "function un(cnn, targetNode, actualTargetNode, name, nodes, actualStartNode, heuristic, boardArray) {\n let distance = gd(cnn, targetNode);\n let dtc;\n if (actualTargetNode && name === \"astar\") {\n if (heuristic === \"manhattanDist\") {\n dtc = cnn.distance + targetNode.weight + distance[0] + manhattanDist(targetNode, actualTargetNode);\n } else if (heuristic === \"poweredManhattanDistance\") {\n dtc = cnn.distance + targetNode.weight + distance[0] + Math.pow(manhattanDist(targetNode, actualTargetNode), 3);\n } else if (heuristic === \"extraPoweredManhattanDistance\") {\n dtc = cnn.distance + targetNode.weight + distance[0] + Math.pow(manhattanDist(targetNode, actualTargetNode), 5);\n }\n let snmd = manhattanDist(actualStartNode, actualTargetNode);\n } else if (actualTargetNode && name === \"greedy\") {\n dtc = targetNode.weight + distance[0] + manhattanDist(targetNode, actualTargetNode);\n } else {\n dtc = cnn.distance + targetNode.weight + distance[0];\n }\n if (dtc < targetNode.distance) {\n targetNode.distance = dtc;\n targetNode.previousNode = cnn.id;\n targetNode.path = distance[1];\n targetNode.direction = distance[2];\n }\n}", "function ManhattanDistance(Point, Goal)\n\n{\n\n// linear movement - no diagonals - just cardinal directions (NSEW)\n\nreturn abs(Point.x - Goal.x) + abs(Point.y - Goal.y);\n\n}", "function gratuity(bill) {\n return bill * .20;\n}", "_getHungerCost(friendo) {\n return friendo.maxBelly * this.hungerMultiplier\n }", "function transitivityHolds() {\n var toGraph = [];\n\n /* we populate the variable & graph */\n for (var i = 1; i <= 4; i++) {\n toGraph[i] = [];\n }\n toGraph[1][1] = 0;\n toGraph[2][2] = 0;\n toGraph[3][3] = 0;\n toGraph[4][4] = 0;\n\n /* convert the input to a useful graph */\n for (var k = 1; k <= 6; k++) {\n switch (Number(itemID[k])) {\n case 1:\n if (choiceOther[k] > 50) {\n toGraph[4][2] = 1;\n toGraph[2][4] = 0;\n } //61 and 39 for thirds\n else if (choiceOther[k] < 50) {\n toGraph[4][2] = 0;\n toGraph[2][4] = 1;\n } else {\n toGraph[4][2] = 0;\n toGraph[2][4] = 0;\n }\n break;\n case 2:\n if (choiceOther[k] > 32.5) {\n toGraph[4][3] = 1;\n toGraph[3][4] = 0;\n } //38 and 27 for thirds\n else if (choiceOther[k] < 32.5) {\n toGraph[4][3] = 0;\n toGraph[3][4] = 1;\n } else {\n toGraph[4][3] = 0;\n toGraph[3][4] = 0;\n }\n break;\n case 3:\n if (choiceOther[k] > 92.5) {\n toGraph[2][1] = 1;\n toGraph[1][2] = 0;\n } //95 and 90 for thirds\n else if (choiceOther[k] < 92.5) {\n toGraph[2][1] = 0;\n toGraph[1][2] = 1;\n } else {\n toGraph[1][2] = 0;\n toGraph[2][1] = 0;\n }\n break;\n case 4:\n if (choiceOther[k] > 57.5) {\n toGraph[4][1] = 1;\n toGraph[1][4] = 0;\n }//71 and 44 for thirds\n else if (choiceOther[k] < 57.5) {\n toGraph[4][1] = 0;\n toGraph[1][4] = 1;\n } else {\n toGraph[4][1] = 0;\n toGraph[1][4] = 0;\n }\n break;\n case 5:\n if (choiceOther[k] > 75) {\n toGraph[3][1] = 1;\n toGraph[1][3] = 0;\n }//83 and 67 for thirds\n else if (choiceOther[k] < 75) {\n toGraph[3][1] = 0;\n toGraph[1][3] = 1;\n } else {\n toGraph[1][3] = 0;\n toGraph[3][1] = 0;\n }\n break;\n case 6:\n if (choiceOther[k] > 67.5) {\n toGraph[3][2] = 1;\n toGraph[2][3] = 0;\n }//73 and 62 for thirds\n else if (choiceOther[k] < 67.5) {\n toGraph[3][2] = 0;\n toGraph[2][3] = 1;\n } else {\n toGraph[2][3] = 0;\n toGraph[3][2] = 0;\n }\n break;\n }\n }\n\n isDag(toGraph);\n }", "function getMilk(bottles){\r\n var cost = bottles * 1.5;\r\n\r\nconsole.log(`${bottles} is costing ${cost}`);\r\n}", "function gm_replay(chains, board, player_team, room, can_be_spiked = false) {\r\n\r\n\tlet my_capture_score = 0;\r\n\r\n\t/* [[id,zone,target_original-team,has_chain],...] */\r\n\tlet capture_targets = []; /* (cards that should switch loyalty to opposite loyalty on client) */\r\n\tlet unveil_targets = []; /* (cards that should update to reveal powers,abilities on client) */\r\n\tlet chained_targets = []; /* <cards that should be replayed on server before pinging client> */\r\n\t/* ^ Target trackers ^ */\r\n\tlet am_i_spiked = [];\r\n\tlet did_i_capture = [];\r\n\t/* ^ Self tracker ^ */\r\n\r\n\r\n\t// PREPARE TO RESOLVE TARGETS\r\n\tlet opponent_team = (player_team===\"X\"?\"O\":\"X\");\r\n\tfor (let ch=0; ch<chains.length; ch++) {\r\n\r\n\t\tlet chain = chains[ch];\t\r\n\t\tlet cid = parseInt(chain[0])-1;\r\n\t\tlet zid = parseInt(chain[1])-1;\r\n\t\tlet capture_card_original_team = chain[2];\r\n\t\tlet card1 = null;\r\n\t\tif (capture_card_original_team===room.game.players[0].team) {\r\n\t\t\tcard1 = room.game.players[0].deck[cid];\r\n\t\t} else\r\n\t\tif (capture_card_original_team===room.game.players[1].team) {\r\n\t\t\tcard1 = room.game.players[1].deck[cid];\r\n\t\t} else {\r\n\t\t\tconsole.log(\"\\n{we should never get here #21}\\n\");\r\n\t\t}\r\n\t\t\r\n\t\tif (card1!=null) {\r\n\r\n\t\t\t/* [ 'no. of targets', 'sum of powers', [[id,zone,target_original-team,has_chain],...] ]*/\r\n\t\t\tlet normal_attack = [0,0,[]]; \r\n\t\t\tlet underdog = [0,0,[]];\r\n\t\t\tlet tiebreaker = [0,0,[]];\r\n\t\t\tlet bribe = [0,0,[]];\r\n\t\t\tlet ambush = [0,0,[]];\r\n\t\t\t/* ^ Ability trackers ^ */ \r\n\r\n\t\t\tlet cost1 = (card1[0] + card1[1] + card1[2] + card1[3]);\r\n\r\n\t\t\t// GET CAPTURE TARGETS && track self target (spike ability)\r\n\t\t\tlet spiked = false;\r\n\t\t\tlet spiked1 = gm_attack(ttt.up, 0, 2, zid, room, opponent_team, card1, normal_attack, underdog, tiebreaker, bribe, ambush);\r\n\t\t\tlet spiked2 = gm_attack(ttt.right, 1, 3, zid, room, opponent_team, card1, normal_attack, underdog, tiebreaker, bribe, ambush);\r\n\t\t\tlet spiked3 = gm_attack(ttt.down, 2, 0, zid, room, opponent_team, card1, normal_attack, underdog, tiebreaker, bribe, ambush);\r\n\t\t\tlet spiked4 = gm_attack(ttt.left, 3, 1, zid, room, opponent_team, card1, normal_attack, underdog, tiebreaker, bribe, ambush);\r\n\t\t\tam_i_spiked.push(spiked || spiked1 || spiked2 || spiked3 || spiked4);\r\n\r\n\t\t\t// PREPARE TO CAPTURE UNIQUE TARGETS\r\n\t\t\tlet capture_counter = capture_targets.length;\r\n\t\t\tgm_harvest(card1, 2, underdog, function (crops,x) {return crops[2].length>0}, capture_targets, chained_targets)\r\n\t\t\tgm_harvest(card1, 3, tiebreaker, function (crops,x) {return crops[2].length>=2}, capture_targets, chained_targets)\r\n\t\t\tgm_harvest(card1, 4, bribe, function (crops,x) {return crops[2].length>=2}, capture_targets, chained_targets)\r\n\t\t\tgm_harvest(card1, 5, ambush, function (crops,x) {return crops[1]===x}, capture_targets, chained_targets, cost1)\r\n\t\t\tif (normal_attack[2].length>0) {\r\n\t\t\t\tfor (let i=0; i<normal_attack[2].length; i++) {\r\n\t\t\t\t\tif (!contains_array_triplet(capture_targets,normal_attack[2][i])) {\r\n\t\t\t\t\t\tcapture_targets.push(normal_attack[2][i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (capture_targets.length>capture_counter) {\r\n\t\t\t\tdid_i_capture.push(true);\r\n\t\t\t} else {\r\n\t\t\t\tdid_i_capture.push(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// CAPTURE UNIQUE TARGETS\r\n\t// update board state to reflect (chain-0) captures on other cards\r\n\tfor (let i=0; i<capture_targets.length; i++) {\r\n\r\n\t\tmy_capture_score += 1;\r\n\r\n\t\tlet cid = capture_targets[i][0]-1;\r\n\t\tlet zid = capture_targets[i][1]-1;\r\n\t\tlet capture_card_original_team = capture_targets[i][2];\r\n\t\tboard[zid][2] = player_team;\r\n\r\n\t\t// unveil veiled captures\r\n\t\tif (board[zid][3]===true) {\r\n\t\t\tlet card2 = null;\r\n\t\t\tif (capture_card_original_team===room.game.players[0].team) {\r\n\t\t\t\tcard2 = room.game.players[0].deck[cid];\r\n\t\t\t} else\r\n\t\t\tif (capture_card_original_team===room.game.players[1].team) {\r\n\t\t\t\tcard2 = room.game.players[1].deck[cid];\r\n\t\t\t} else {\r\n\t\t\t\tconsole.log(\"\\n{we should never get here #22}\\n\");\r\n\t\t\t}\r\n\t\t\tif (card2!=null) {\r\n\t\t\t\tboard[zid][3] = false;\r\n\t\t\t\tunveil_target = {\r\n\t\t\t\t\ttarget: capture_targets[i],\r\n\t\t\t\t\tcard: card2\r\n\t\t\t\t};\r\n\t\t\t\tunveil_targets.push(unveil_target);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// RESOLVE SELF\r\n\tif (can_be_spiked)\r\n\tfor (let ch=0; ch<chains.length; ch++) {\r\n\r\n\t\tlet chain = chains[ch];\t\r\n\t\tlet cid = parseInt(chain[0])-1;\r\n\t\tlet zid = parseInt(chain[1])-1;\r\n\t\tlet capture_card_original_team = chain[2];\r\n\t\tlet card1 = null;\r\n\t\tif (capture_card_original_team===room.game.players[0].team) {\r\n\t\t\tcard1 = room.game.players[0].deck[cid];\r\n\t\t} else\r\n\t\tif (capture_card_original_team===room.game.players[1].team) {\r\n\t\t\tcard1 = room.game.players[1].deck[cid];\r\n\t\t} else {\r\n\t\t\tconsole.log(\"\\n{we should never get here #23}\\n\");\r\n\t\t}\r\n\t\t\r\n\t\tif (card1!=null) {\r\n\t\t\t// RESOLVE spiked by ability (SELF-TARGET)\r\n\t\t\tlet spiked_b = am_i_spiked[ch];\r\n\t\t\tlet captured_b = did_i_capture[ch];\r\n\t\t\tif (spiked_b) {\r\n\t\t\t\tboard[zid][2] = opponent_team;\r\n\t\t\t\tcapture_targets.push([cid+1,zid+1,player_team]);\r\n\t\t\t}\r\n\t\t\t// unveil self\r\n\t\t\tif (board[zid][3]===true && (captured_b || spiked_b)) {\r\n\t\t\t\tboard[zid][3] = false;\r\n\t\t\t\tunveil_target = {\r\n\t\t\t\t\ttarget: [cid+1,zid+1,player_team],\r\n\t\t\t\t\tcard: card1\r\n\t\t\t\t};\r\n\t\t\t\tunveil_targets.push(unveil_target);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlet was_i_spiked = (can_be_spiked && am_i_spiked[0] && chains.length===1);\r\n\tlet packet = {\r\n\t\tcapture_t: capture_targets, \r\n\t\tunveil_t: unveil_targets, \r\n\t\tchain_t: chained_targets,\r\n\t\tcapture_n: my_capture_score,\r\n\t\tspiked: was_i_spiked\r\n\t};\r\n\treturn packet;\r\n}", "function chooseNcheck() {\n //var userGuess = document.getElementById(\"needs to change\").onclick\n var userGuess = \"a1\"\n for (var battleship of battleships){\n for(var key of battleship) {\n if (userGuess === key){\n console.log('hit');\n hitCounter++\n if (hitCounter == 17)\n console.log('game over')\n for (var row of coords){\n for (var col of row){\n if (userGuess === col){\n row.splice(col.indexOf(key), 1, '')\n for (battleship of battleships){\n if (battleship = ''){\n console.log(\"sunk\")\n }\n }\n }\n }\n }\n }\n }\n }\n }", "function sonnyGoals(player) {\n return player.epl.assists; // <== Highlight\n}", "function beeStingsNeeded(victimWeight)\n{\n var totalStings = 8.666666667 * victimWeight; // This is the code that will run in the function.\n\n return totalStings; // This is the code to return the total number of bee stings to the function.\n}", "function ourTurn(){\n if (Pokemon.theirAttack.hp <= Pokemon.ourAttack.power) {\n Pokemon.results.theirFaint = true;\n console.log(`${Pokemon.theirAttack.name} fainted ${Pokemon.results.theirFaint}`);\n Pokemon.results.theirAttackPower = 0;\n return 0;\n } else {\n Pokemon.results.theirAttackPower = Pokemon.theirAttack.power;\n $('#instructions-text').text(`You did ${Pokemon.ourAttack.power} damage. Click fight or switch button.`);\n // Add: they have X hit points left here...\n return Pokemon.theirAttack.hp - Pokemon.ourAttack.power;\n }\n }", "getActionsScore() {\n const actions_score = [];\n const nbr_of_trees = this.getNumberOfTrees();\n\n\n // COMPLETE\n if(nbr_of_trees[3] > 0 && this.sun >= 4){\n if(this.play_index === -1){\n for (let i = 0; i < this.trees.length; i += this.treeI) {\n if (this.trees[i+1] === 3 && this.trees[i+2] && !this.trees[i+3]){\n let score = this.score_of_previous_round + (Math.exp(this.cells[this.trees[i]*this.cellI+1] * this.mulA) \n + Math.exp(nbr_of_trees[3]*this.mulB) + Math.exp(this.cells[this.trees[i]*this.cellI+8]*this.mulC)) * this.complete_mul / this.iter;\n if(this.change_commplete){\n score = this.score_of_previous_round + (Math.exp(this.cells[this.trees[i]*this.cellI+1]) * 2) / this.iter;\n }\n actions_score.push([this.play_index, score, COMPLETE, this.trees[i], -1, ...this.last_action.slice(5)]);\n }\n }\n }else{\n const bestTree = {\n score:-9999,\n tree:-1,\n }\n for (let i = 0; i < this.trees.length; i += this.treeI) {\n if (this.trees[i+1] === 3 && this.trees[i+2] && !this.trees[i+3] && this.cells[this.trees[i] * this.cellI + 8] * this.cells[this.trees[i] * this.cellI + 1] > bestTree.score){\n bestTree.score = this.cells[this.trees[i] * this.cellI + 8] * this.cells[this.trees[i] * this.cellI + 1];\n bestTree.tree = this.trees.slice(i,i+this.treeI);\n }\n }\n if(bestTree.tree !== -1){\n let score = this.score_of_previous_round + (Math.exp(this.cells[bestTree.tree[0] * this.cellI + 1]*this.mulA)\n + Math.exp(nbr_of_trees[3]*this.mulB) + Math.exp(this.cells[bestTree.tree[0]*this.cellI+8] * this.mulC)) * this.complete_mul / this.iter;\n if(this.change_commplete){\n score = this.score_of_previous_round + ( Math.exp(this.cells[bestTree.tree[0]*this.cellI+1]) * 2) / this.iter;\n }\n actions_score.push([this.play_index, score, COMPLETE, bestTree.tree[0], -1, ...this.last_action.slice(5)]);\n }\n }\n }\n\n\n // SEED\n if(this.sun >= nbr_of_trees[0] && this.rday < 20){\n if(nbr_of_trees[4] - nbr_of_trees[3] < this.max_tree){\n let mul = 1;\n if(nbr_of_trees[0] === 0){\n mul = this.seed_mul;\n }else if (this.rday < this.seed_2_phase_day){\n mul = this.start_seed_mul;\n }\n const bestTree = {\n score: 9999,\n tree: -1,\n spot: -1,\n }\n\n if(bestTree.tree === -1) {\n for (let i = 0; i < this.trees.length; i += this.treeI) {\n if (this.trees[i+2] && this.trees[i+1] > 1 && !this.trees[i+3]){\n let cells_to_check = [this.trees[i]];\n for (let j = 0; j < this.trees[i+1]; j++) {\n let new_cells = [];\n cells_to_check.forEach(cell =>{\n this.cells.slice(cell * this.cellI + 2, cell * this.cellI + 8).forEach(spot => {\n if (spot !== -1 ){\n new_cells.push(spot);\n let div = this.cells[spot * this.cellI + 1];\n if(this.rday < this.seed_2_phase_day ){\n div = 1 + this.cells[spot * this.cellI + 1]/10;\n }\n if (this.cells[spot * this.cellI + 8] / div < bestTree.score && this.cells[spot * this.cellI + 1] > 0 && !this.isOccupied(spot)){\n bestTree.score = this.cells[spot * this.cellI + 8] / div;\n bestTree.tree = this.trees.slice(i, i+this.treeI);\n bestTree.spot = spot;\n }\n }\n });\n });\n cells_to_check = new_cells;\n }\n }\n }\n }\n if (bestTree.tree !== -1){\n actions_score.push([\n this.play_index,\n this.score_of_previous_round + (mul * this.cells[bestTree.spot * this.cellI + 1] / this.cells[bestTree.spot * this.cellI + 8]) / this.iter,\n SEED, bestTree.tree[0], bestTree.spot, ...this.last_action.slice(5)\n ]);\n }\n }\n }\n\n\n // GROW\n if (this.sun >= 1 && nbr_of_trees[4] > nbr_of_trees[3]){\n if(this.play_index === -1){\n for (let i = 0; i < this.trees.length; i += this.treeI) {\n if (this.rday <= 20 + this.trees[i+1] && this.trees[i+1] < 3 && this.trees[i+2] && !this.trees[i+3]){\n let needed_sun;\n switch (this.trees[i+1]) {\n case 0:\n needed_sun = 1 + nbr_of_trees[1];\n break;\n case 1:\n needed_sun = 3 + nbr_of_trees[2];\n break;\n case 2:\n needed_sun = 7 + nbr_of_trees[3];\n break;\n }\n if (this.sun >= needed_sun){\n actions_score.push([\n this.play_index,\n this.score_of_previous_round + (this.cells[this.trees[i] * this.cellI + 1] * this.grow_mul[this.trees[i+1]] / this.cells[this.trees[i] * this.cellI + 8])/this.iter,\n GROW, this.trees[i], -1, ...this.last_action.slice(5)\n ]);\n }\n }\n }\n }else{\n const bestTree = {\n score:[9999, 9999, 9999],\n tree:[-1, -1, -1],\n }\n for (let i = 0; i < this.trees.length; i += this.treeI) {\n if (this.rday <= 20 + this.trees[i+1] && this.trees[i+1] < 3 && this.trees[i+2] && !this.trees[i+3] && this.cells[this.trees[i] * this.cellI + 8] / this.cells[this.trees[i] * this.cellI + 1] < bestTree.score[this.trees[i+1]]){\n let needed_sun;\n switch (this.trees[i+1]) {\n case 0:\n needed_sun = 1 + nbr_of_trees[1];\n break;\n case 1:\n needed_sun = 3 + nbr_of_trees[2];\n break;\n case 2:\n needed_sun = 7 + nbr_of_trees[3];\n break;\n }\n if (this.sun >= needed_sun){\n bestTree.score[this.trees[i+1]] = this.cells[this.trees[i] * this.cellI + 8] / this.cells[this.trees[i] * this.cellI + 1];\n bestTree.tree[this.trees[i+1]] = this.trees.slice(i,i+this.treeI);\n }\n }\n }\n for (let i = 0 ; i< 3; i++){\n if(bestTree.tree[i] !== -1){\n actions_score.push([\n this.play_index,\n this.score_of_previous_round + (this.cells[bestTree.tree[i][0] * this.cellI + 1] * this.grow_mul[bestTree.tree[i][1]] / this.cells[bestTree.tree[i][0] * this.cellI + 8])/this.iter,\n GROW, bestTree.tree[i][0], -1, ...this.last_action.slice(5)\n ]);\n }\n }\n }\n }\n\n\n //WAIT\n actions_score.push([this.play_index, this.score_of_previous_round - (this.sun * this.wait_mul) / this.iter, WAIT, -1, -1, ...this.last_action.slice(5)]);\n\n if(this.play_index === -1){\n actions_score.map((val, i) => {\n val[0] = i;\n return val;\n });\n }\n\n return actions_score;\n }", "levelUpDifficulty() {\n if (gameState.maxNumber < 900) {\n gameState.maxNumber += 5; // Increase the maximum number found in a cell.\n }\n if (gameState.expressNum < 100) {\n gameState.expressNum += 4; // Increase how much the expressions can deviate by.\n }\n }", "function trackAward(dist) {\r\n if (!isGameEnded && dist % 1000 == 0) {\r\n toggleAward(true && dist > 500);\r\n }\r\n}", "function numAngels(amount) {\n return Math.floor(150*Math.sqrt(amount/1e15));\n}", "function getPoints(player) {\n var points = 0;\n for (var i = 0; i < players[player].Hand.length; i++) {\n points += players[player].Hand[i].Weight;\n if (points == 21) {\n endGame();\n } else if (points > 21) {\n if ((players[player].Hand[0].Value == players[player].Hand[1].Value) && (players[player].Hand[1].Value == \"A\")) {\n players[player].Hand[1].Weight = 1;\n points -= 10;\n }\n }\n }\n players[player].Points = points;\n return points;\n}", "function battle(victimStrength, attackerStrength){\nif (victim.strength === attacker.strength) {\n console.log(\"Dead\");\n}\nelse if (victim.strength < attacker.strength) {\n console.log(\"Also dead\");\n}\nelse {\n console.log(\"Alive\");\n}\n}", "function costs(){\r\n\"use strict\";\r\nif (numFail==numTotalRuns)\r\n\t{\r\n\t\tnumTotalCoins = costCoins * numFail;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tnumTotalCoins = costCoins * numTotalRuns - 30 * (numTotalRuns - 1) + 30 * (numFail) - 200;\r\n\t}\r\n}", "static wonderingFightBack(/*Unit*/ unit, /*Grid*/ grid, /*Unit*/ theHero, /*Array<Unit>*/ allies) {\n\n /*Hex[]*/\n let possibleMoves = grid.getMovableHexes(unit, 1);\n\n if (possibleMoves.length) {\n\n //If Helene is near, most likely attack!\n for (let hex of possibleMoves) {\n if (hex.content === theHero) {\n if (Math.random() > 0.36) {\n grid.goTo(hex, unit);\n return;\n }\n }\n }\n\n //maybe do nothing?\n if (Math.random() > 0.50) {\n return;\n }\n\n //else lets get rolling\n let randomMove = possibleMoves[Math.floor(Math.random() * possibleMoves.length)];\n if (randomMove.content && allies.indexOf(randomMove.content) !== -1) {\n //maybe do nothing?\n if (Math.random() > 0.50) {\n return;\n }\n //lets give him a chance, or else! (rerandom - perhaps we will not kick an ally!)\n return possibleMoves[Math.floor(Math.random() * possibleMoves.length)];\n\n }\n return randomMove;\n\n }\n }", "function noticeplayer() {\n var monsters = nearbymonsters();\n for (var i = 0; i < monsters.length ; i++) {\n var monster = monsters[i];\n if (rund(15) < getDifficulty() - 1) { // increase odds starting with diff 2\n if (!monster.awake && rnd(101) < 50) { // want at worst 50/50 odds\n updateLog(`The ${monster} sees you!`);\n monster.awake = true;\n }\n }\n }\n}", "eatGhost() {\n if (this.ghostEatenScore < 1600) {\n this.ghostEatenScore *= 2;\n this.score += this.ghostEatenScore;\n }\n }", "manhattanCost(vertex) {\n const [endX, endY] = idToCoord(this.endId);\n const [curX, curY] = idToCoord(vertex.id);\n return Math.abs(endX - curX) + Math.abs(endY - curY);\n }", "function top10Synergies(tally, agents, policyMatrix) {\n}", "pointDegradation(addToPaper){cov_1rtpcx8cw8.f[2]++;const letters=(cov_1rtpcx8cw8.s[6]++,addToPaper.split(''));let availableLetters=(cov_1rtpcx8cw8.s[7]++,'');// When you reach the end of the string, get out of loop\ncov_1rtpcx8cw8.s[8]++;for(let i=0;i<letters.length;i++){cov_1rtpcx8cw8.s[9]++;// If durability ever reaches 0, sharpen pencil\nif(this.durability===0){cov_1rtpcx8cw8.b[1][0]++;cov_1rtpcx8cw8.s[10]++;console.log(`Your pencil has a durability of 0! You need to sharpen it! Here's what I've written ${availableLetters}`);}else{cov_1rtpcx8cw8.b[1][1]++;}cov_1rtpcx8cw8.s[11]++;if((cov_1rtpcx8cw8.b[3][0]++,this.durability===0)&&(cov_1rtpcx8cw8.b[3][1]++,this.length===0)){cov_1rtpcx8cw8.b[2][0]++;cov_1rtpcx8cw8.s[12]++;break;}else{cov_1rtpcx8cw8.b[2][1]++;}// Check how many letters of the string you can write with pencil\ncov_1rtpcx8cw8.s[13]++;availableLetters+=letters[i];cov_1rtpcx8cw8.s[14]++;if(letters[i]===' '){cov_1rtpcx8cw8.b[4][0]++;cov_1rtpcx8cw8.s[15]++;this.durability-=0;}else{cov_1rtpcx8cw8.b[4][1]++;cov_1rtpcx8cw8.s[16]++;if((cov_1rtpcx8cw8.b[6][0]++,letters[i]!==letters[i].toUpperCase())||(cov_1rtpcx8cw8.b[6][1]++,letters[i].match(/^[.,:!?]/))){cov_1rtpcx8cw8.b[5][0]++;cov_1rtpcx8cw8.s[17]++;this.durability-=1;}else{cov_1rtpcx8cw8.b[5][1]++;cov_1rtpcx8cw8.s[18]++;if(letters[i]===letters[i].toUpperCase()){cov_1rtpcx8cw8.b[7][0]++;cov_1rtpcx8cw8.s[19]++;this.durability-=2;}else{cov_1rtpcx8cw8.b[7][1]++;}}}}cov_1rtpcx8cw8.s[20]++;return availableLetters;}", "function setLeaderAdvantage() {\r\n // Reset all advantage\r\n attacker.leader_fire_advantage = 0;\r\n attacker.leader_shock_advantage = 0;\r\n defender.leader_fire_advantage = 0;\r\n defender.leader_shock_advantage = 0;\r\n // Sets fire advantage\r\n if (attacker.leader_fire_pip > defender.leader_fire_pip) {\r\n attacker.leader_fire_advantage = attacker.leader_fire_pip - defender.leader_fire_pip;\r\n } else {\r\n defender.leader_fire_advantage = defender.leader_fire_pip - attacker.leader_fire_pip;\r\n }\r\n\r\n // Sets shock advantage\r\n if (attacker.leader_shock_pip > defender.leader_shock_pip) {\r\n attacker.leader_shock_advantage = attacker.leader_shock_pip - defender.leader_shock_pip;\r\n } else {\r\n defender.leader_shock_advantage = defender.leader_shock_pip - attacker.leader_shock_pip;\r\n }\r\n}", "function getNewAiColor() {\n\tvar digit = getRandomColorDigit();\n\t\n\n\tvar oneHotVector = net.run(digit).map(function (score) {\n\t\treturn score.toFixed(4); // cull to 4 decimal places\n\t});\n\n $('.guess-ai').text(getLargestValueInIndex(oneHotVector));\n\t$('.mnist-one-hot-vector').text('[ ' + oneHotVector.join(' , ') + ' ]');\n}", "function gold(index)\n{\n var gold = 0;\n\n switch(index) {\n case 2://start\n case 3://towels\n gold = 200;\n break;\n\n case 27://Train compartments\n case 30://Cave boxes\n gold = Math.floor((Math.random() * 200) + 200)\n break;\n\n case 35://bushes\n gold = Math.floor((Math.random() * 300) + 300)\n break;\n\n case 41://chest\n gold = Math.floor((Math.random() * 400) + 600)\n break;\n\n default:\n }\n\n GainGold(gold);\n}", "function updateUnvisitedNeighbors(node, grid) {\n const unvisitedNeighbors = getUnvisitedNeighbors(node, grid);\n // calculateManhattanDistance(unvisitedNeighbors, grid);\n // console.log(unvisitedNeighbors);\n for (let neighbor of unvisitedNeighbors) {\n neighbor.distance = node.distance + 1;\n neighbor.totalDistance = node.distance + neighbor.heuristicDistance;\n\n neighbor.previousNode = node;\n }\n}", "function creditUpdateLoss(wager) {\n var removeWager = wager * -1;\n credits += removeWager;\n creditUpdate();\n}", "FindNeighbours()\n {\n var AllPlayers = ListMembers.GetAllMembers();\n\n for (var curPlyr = 0; curPlyr != AllPlayers.length; curPlyr++)\n {\n //first clear any current tag\n AllPlayers[curPlyr].Steering().UnTag();\n\n //work in distance squared to avoid sqrts\n var to = new Phaser.Point(AllPlayers[curPlyr].Pos().x - this.m_pPlayer.Pos().x,\n AllPlayers[curPlyr].Pos().y - this.m_pPlayer.Pos().y);\n\n if (to.getMagnitudeSq() < (this.m_dViewDistance * this.m_dViewDistance))\n {\n AllPlayers[curPlyr].Steering().Tag();\n }\n }//next\n }", "FindNeighbours()\n {\n var AllPlayers = ListMembers.GetAllMembers();\n\n for (var curPlyr = 0; curPlyr != AllPlayers.length; curPlyr++)\n {\n //first clear any current tag\n AllPlayers[curPlyr].Steering().UnTag();\n\n //work in distance squared to avoid sqrts\n var to = new Phaser.Point(AllPlayers[curPlyr].Pos().x - this.m_pPlayer.Pos().x,\n AllPlayers[curPlyr].Pos().y - this.m_pPlayer.Pos().y);\n\n if (to.getMagnitudeSq() < (this.m_dViewDistance * this.m_dViewDistance))\n {\n AllPlayers[curPlyr].Steering().Tag();\n }\n }//next\n }", "function degreesOfFreedom(p) {\n let onBoard = possibleMoves(p).filter(isOnBoard);\n let empties = onBoard.filter(isEmpty).length;\n let food = onBoard.filter(isFood).length;\n return empties + food; // could play with weights...\n }", "function getLewis() {\n let jump_reach_score = jump_height / 100;\n average_power = Math.sqrt(4.9) * body_mass * Math.sqrt(jump_reach_score) * 9.81;\n }", "function CalculateEncumberance() { // STR * 5, * 10\n\tOPC.encumberanceMax = OPC.abilityScores[0] * 10;\n\tOPC.encumberance = 0;\n// equipped gear\n\tswitch(OPC.mainHand[0]) { // whatever is in the main hand\n\t\tcase \"a\":\n\t\t\tOPC.encumberance += OPC.mainHand[6];\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\tcase \"s\":\n\t\t\tOPC.encumberance += OPC.mainHand[3];\n\t\t\tbreak;\n\t\tcase \"m\":\n\t\t\tOPC.encumberance += OPC.mainHand[2];\n\t\t\tbreak;\n\t\tcase \"w\":\n\t\t\tOPC.encumberance += OPC.mainHand[5];\n\t\t\tbreak;\n\t}\n\tswitch(OPC.offHand[0]) { // whatever is in the off hand\n\t\tcase \"a\":\n\t\t\tOPC.encumberance += OPC.offHand[6];\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\tcase \"s\":\n\t\t\tOPC.encumberance += OPC.offHand[3];\n\t\t\tbreak;\n\t\tcase \"m\":\n\t\t\tOPC.encumberance += OPC.offHand[2];\n\t\t\tbreak;\n\t\tcase \"w\":\n\t\t\tOPC.encumberance += OPC.offHand[5];\n\t\t\tbreak;\n\t}\n\tswitch(OPC.armor[0]) { // whatever is armor\n\t\tcase \"a\":\n\t\t\tOPC.encumberance += OPC.armor[6];\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\tcase \"s\":\n\t\t\tOPC.encumberance += OPC.armor[3];\n\t\t\tbreak;\n\t\tcase \"m\":\n\t\t\tOPC.encumberance += OPC.armor[2];\n\t\t\tbreak;\n\t\tcase \"w\":\n\t\t\tOPC.encumberance += OPC.armor[5];\n\t\t\tbreak;\n\t}\n// backpack\n\tfor(iE = 0; iE < OPC.backpack.length; iE++) { // go through all contents of the backpack\n\t\tswitch(OPC.backpack[iE][0]){\n\t\t\tcase \"a\":\n\t\t\t\tOPC.encumberance += OPC.backpack[iE][6];\n\t\t\t\tbreak;\n\t\t\tcase \"l\":\n\t\t\tcase \"s\":\n\t\t\t\tOPC.encumberance += OPC.backpack[iE][3];\n\t\t\t\tbreak;\n\t\t\tcase \"m\":\n\t\t\t\tOPC.encumberance += OPC.backpack[iE][2];\n\t\t\t\tbreak;\n\t\t\tcase \"w\":\n\t\t\t\tOPC.encumberance += OPC.backpack[iE][5];\n\t\t\t\tbreak;\t\t\t\n\t\t}\n\t}\n// coins\n\tcp = OPC.copper;\n\tpp = Math.floor(cp / 1000);\n\tcp -= pp * 1000;\n\tgp = Math.floor(cp / 100);\n\tcp -= gp * 100;\n\tsp = Math.floor(cp / 10);\n\tcp -= sp * 10;\n\tOPC.encumberance += Math.ceil((cp + sp + gp + pp) / 50);\n}", "function pogDetermineAIAction (player) {\n\t\tvar numCards = CARDS_PER_HAND;\n\t\t\n\t\tif (player.id === \"pot_of_greed\") {\n\t\t\tnumCards += 2;\n\t\t}\n\t\t\n\t\t/* determine the current hand */\n\t\tplayer.hand.determine();\n\t\t\n\t\t/* collect the ranks and suits of the cards */\n\t\tvar hand = player.hand.cards;\n\n\t\t/* Player tries hard to lose */\n\t\t/* NO NEED FOR POG SUPPORT - POG IS AVERAGE */\n\t\tif (player.intelligence == eIntelligence.THROW) {\n\t\t\tif (player.hand.strength == STRAIGHT || player.hand.strength == FLUSH || player.hand.strength >= STRAIGHT_FLUSH) {\n\t\t\t\tvar sortedRanks = hand.map(function(c) { return c.rank; }).sort();\n\t\t\t\t// Keep the two lowest cards.\n\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return c.rank != sortedRanks[0] && c.rank != sortedRanks[1]; })\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (player.id === \"pot_of_greed\") {\n\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false, false, false];\n\t\t\t} else {\n\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false];\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i = 0; i < hand.length; i++) {\n\t\t\t\tif (hand[i].rank >= 12) {\n\t\t\t\t\tplayer.hand.tradeIns[i] = true;\n\t\t\t\t} else if (player.hand.strength >= PAIR) {\n\t\t\t\t\tfor (var j = i + 1; j < hand.length; j++) {\n\t\t\t\t\t\tif (hand[i].rank == hand[j].rank) {\n\t\t\t\t\t\t\t// Discard this card if there's another card\n\t\t\t\t\t\t\t// of the same rank (keeping the last card of\n\t\t\t\t\t\t\t// each rank, as long as it's below queen.\n\t\t\t\t\t\t\tplayer.hand.tradeIns[i] = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*for low intelligence characters all trades are done at random. Technically this is the same as doing nothing but this way they won't always just do nothing.*/\n\t\t/* NO NEED FOR POG SUPPORT - POG IS AVERAGE */\n\t\t} else if (player.intelligence == eIntelligence.BAD) {\n\t\t\tif (player.id === \"pot_of_greed\") {\n\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false, false, false];\n\t\t\t} else {\n\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false];\n\t\t\t}\n\n\t\t\t/*choose number of cards to trade in*/\n\t\t\tvar toTrade = Math.floor((Math.random()) * 6);\n\n\t\t\t/*choose cards at random to get rid of*/\n\t\t\tfor (var i = 0; i < hand.length; i++) {\n\t\t\t/*set it to trade in cards randomly until we have to trade in cards*/\n\t\t\t\tif(Math.floor((Math.random()) * 2 )==1 || toTrade + i >= hand.length){\n\t\t\t\t\tplayer.hand.tradeIns[i] = true;\n\t\t\t\t\ttoTrade--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*for good intelligence characters only attempt to get pairs or improve on pairs*/\n\t\t/*for average intelligence characters use the standard algorithm. Average intelligence is also the default case*/\n\t\t} else {\n\t\t\t/* if the current hand is good enough, then take a pre-determined action */\n\t\t\tif (player.hand.strength >= STRAIGHT) {\n\t\t\t\t/* give up nothing */\n\t\t\t\tif (player.id === \"pot_of_greed\") {\n\t\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false, false, false];\n\t\t\t\t} else {\n\t\t\t\t\tplayer.hand.tradeIns = [false, false, false, false, false];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconsole.log(\"Hand is really good, will trade in nothing. \"+player.hand.tradeIns);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* if the current hand is good enough, then take a pre-determined action */\n\t\t\tif (player.hand.strength == THREE_OF_A_KIND) {\n\t\t\t\t/* Keep the three cards (rank value[0]) - discard the rest */\n\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return c.rank != player.hand.value[0]; });\n\t\t\t\tconsole.log(\"Hand is good, will trade in two cards. \"+player.hand.tradeIns);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* if the current hand is good enough, then take a pre-determined action */\n\t\t\tif (player.hand.strength == TWO_PAIR) {\n\t\t\t\t/* Discard the odd card (value[2]) */\n\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return c.rank != player.hand.value[0] && c.rank != player.hand.value[1]; });\n\t\t\t\tconsole.log(\"Hand is good, will trade in one card. \"+player.hand.tradeIns);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (player.intelligence == eIntelligence.AVERAGE) {\n\t\t\t\t/* Check for flush draw, even if holding a pair */\n\t\t\t\t/* CARDS_PER_HAND instead of numCards is not a mistake, since 5-flushes are possible */\n\t\t\t\tif (player.hand.suits.some(function(s) { return s == CARDS_PER_HAND - 1; })) {\n\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return player.hand.suits[c.suit] == 1; });\n\t\t\t\t\tconsole.log(\"Hand is \" + (player.hand.strength == PAIR ? \"okay\" : \"bad\") + \", going for a flush, trading in one card. \" + player.hand.tradeIns);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (var start_rank = 2; start_rank <= 10; start_rank++) {\n\t\t\t\t\t/* Outside straight draw - four ranks in a row */\n\t\t\t\t\tif (player.hand.ranks.slice(start_rank - 1, start_rank - 1 + 4).countTrue() == 4) {\n\t\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c, idx) {\n\t\t\t\t\t\t\treturn c.rank < start_rank || c.rank > start_rank + 3\n\t\t\t\t\t\t\t\t|| hand.slice(0, idx).some(function(c2) { return c2.rank == c.rank; });\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconsole.log(\"Hand is \" + (player.hand.strength == PAIR ? \"okay\" : \"bad\") + \", going for a straight, trading in one card. \"+player.hand.tradeIns);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (var start_rank = 10; start_rank >= 1; start_rank--) {\n\t\t\t\t\t/* Inside straight draw - four ranks out of five in a row */\n\t\t\t\t\tif (player.hand.ranks.slice(start_rank - 1, start_rank - 1 + 5).countTrue() == 4) {\n\t\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c, idx) {\n\t\t\t\t\t\t\treturn ((c.rank < start_rank || c.rank > start_rank + 4) && !(start_rank == 1 && c.rank == 14))\n\t\t\t\t\t\t\t\t|| hand.slice(0, idx).some(function(c2) { return c2.rank == c.rank; });\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconsole.log(\"Hand is \" + (player.hand.strength == PAIR ? \"okay\" : \"bad\") + \", going for a straight, trading in one card. \"+player.hand.tradeIns);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (player.hand.strength == PAIR) {\n\t\t\t\t/* Keep the pair (rank = value[0]), discard the rest */\n\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return c.rank != player.hand.value[0]; });\n\t\t\t\tconsole.log(\"Hand is okay, trading in three cards. \"+player.hand.tradeIns);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (player.intelligence == eIntelligence.AVERAGE) {\n\t\t\t\tfor (var start_rank = 2; start_rank <= 11; start_rank++) {\n\t\t\t\t\tif (player.hand.ranks.slice(start_rank - 1, start_rank - 1 + 3).countTrue() == 3) {\n\t\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c, idx) {\n\t\t\t\t\t\t\treturn c.rank < start_rank || c.rank > start_rank + 2;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconsole.log(\"Hand is bad, going for a straight, trading in two cards. \"+player.hand.tradeIns);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (player.hand.strength == HIGH_CARD) {\n\t\t\t\tif (player.intelligence == eIntelligence.AVERAGE) {\n\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return player.hand.value.slice(0, AVERAGE_KEEP_HIGH).indexOf(c.rank) < 0; });\n\t\t\t\t\tconsole.log(\"Hand is bad, trading in \"+ (numCards - AVERAGE_KEEP_HIGH) +\" cards. \"+player.hand.tradeIns);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (player.intelligence != eIntelligence.BEST || player.hand.value[0] >= 10) {\n\t\t\t\t\tplayer.hand.tradeIns = hand.map(function(c) { return c.rank != player.hand.value[0]; });\n\t\t\t\t\tconsole.log(\"Hand is bad, trading in four cards. \"+player.hand.tradeIns);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* end of function, otherwise just trade in everything */\n\t\t\tif (player.id === \"pot_of_greed\") {\n\t\t\t\tplayer.hand.tradeIns = [true, true, true, true, true, true, true];\n\t\t\t} else {\n\t\t\t\tplayer.hand.tradeIns = [true, true, true, true, true];\n\t\t\t}\n\t\t\t\n\t\t\tconsole.log(\"Hand is horrid, trading in everything. \"+player.hand.tradeIns);\n\t\t\treturn;\n\t\t}\n\t\n\t}", "function tallyNuclearLine(start, run) {\n switch (board[start] + board[start + run + run]) {\n case 'xx':\n case 'oo':\n ++scores[board[start]];\n }\n }" ]
[ "0.59386736", "0.57638013", "0.5651998", "0.56440765", "0.56169707", "0.56032073", "0.5602682", "0.5581515", "0.55715567", "0.5554654", "0.55492634", "0.5508127", "0.5486514", "0.54785466", "0.5474174", "0.5471805", "0.5466742", "0.5464912", "0.5459632", "0.54583615", "0.5443092", "0.54386955", "0.54083866", "0.5391967", "0.5380419", "0.5373031", "0.5361559", "0.5354883", "0.53517526", "0.53366005", "0.5330907", "0.53291535", "0.5328573", "0.53254604", "0.53243524", "0.53170055", "0.5312926", "0.5311895", "0.53094405", "0.5303015", "0.5294865", "0.5294161", "0.52879566", "0.5279294", "0.5279118", "0.52787083", "0.5273318", "0.5270141", "0.5264031", "0.5260661", "0.5258671", "0.52537185", "0.5253333", "0.5252356", "0.5252049", "0.5251079", "0.52495426", "0.52471733", "0.5223432", "0.52211857", "0.5216249", "0.52093434", "0.5207124", "0.5206422", "0.52051854", "0.5197733", "0.5197256", "0.519112", "0.5190087", "0.5189141", "0.51881874", "0.51849955", "0.5184162", "0.5182977", "0.5182472", "0.5182299", "0.5177712", "0.51759803", "0.51752865", "0.51739067", "0.517239", "0.5166151", "0.5165262", "0.5163638", "0.5163407", "0.5160351", "0.5158504", "0.5157188", "0.5156603", "0.5153536", "0.5147679", "0.5147259", "0.5144107", "0.5142511", "0.51330435", "0.51330435", "0.51319957", "0.51207334", "0.51187855", "0.5111344", "0.5109987" ]
0.0
-1
Creates an instance of ExtractionResultController.
constructor() { super(ExtractionResult); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actionCreateExpeditionCenter() {\n Action.call(this);\n\n this.minimum_elevation = 2;\n\n this.name = \"expedition-center\";\n this.type = \"target\";\n this.target = \"land\";\n this.new_unit_type = 'expedition-center';\n\n this.nextSelection = \"target\";\n this.min_distance = 1;\n this.max_distance = 1;\n this.hover_radius = 0;\n\n this.free_pop_cost = 4;\n\n this.cloud_clear = 5;\n\n this.description = \"Expedition Center (-4)\";\n this.extra_description = \"Explore the area 10 tiles away.<br>Can create cities further away.\";\n\n this.targetFilterFunction = function(world, actor, position, target) {\n return !world.unitAtLocation(target) && !world.noCitiesInArea(target,1);\n }\n this.activation = function(world, actor, position) {\n return !world.countUnits(Hex.circle(position, 1), 'expedition-center', 1);\n }\n this.requirement = function(world, actor, position) {\n return world.getPopulation() >= 8;\n }\n}", "function instantiateController() {\n return new PaneController(\n mockScope,\n mockAgentService,\n mockWindow,\n mockLocation,\n mockAttrs\n );\n }", "constructor() {\n\n\t\tsuper(Action.EXTRACT);\n\n\t}", "async retrieveController() {\n this.contr = await Controller.createController();\n }", "function calculationController(localAvailable, remoteAvailable) {\n if ( typeof calculationController.instance === 'object' ){\n\t return calculationController.instance;\n };\n\n // TODO: Don't hard-code these\n this.methods = [\n {\n name: 'remoteDefault',\n displayName: 'Remote Default',\n help: 'Remote Default Method',\n repos: 'remote'\n },\n {\n name: 'localDefault',\n displayName: 'Local Default',\n help: 'Local Default Method',\n repos: 'KStest'\n },\n {\n name: 'localWilcoxon',\n displayName: 'Local Wilcoxon',\n help: 'Local Wilcoxon Method',\n repos: 'wilcoxon',\n },\n /*{\n name: 'localTtest',\n displayName: 'Local Ttest',\n help: 'Local T-test Method',\n repos: 't_test',\n }*/\n ];\n\n this.localWorker;\n calculationController.instance = this;\n return this;\n}", "function resultsController($scope, ResultsFactory) {\n $scope.input;\n // takes input and passes it through stringifyFunction and codeParser, and testing suite, and pushes all to database\n // all into database\n\n}", "function createController() {\n if (!_options || !_options.controllerDivId || !_options.playAndPauseDivId) {\n throw \"ERROR: Options or properties missing for controller!\";\n }\n\n // Do not create controller if animation has not defined any time period for frames.\n // If no period is given, then only show currently given layers.\n if (getBeginDate() !== undefined && getEndDate() !== undefined) {\n var ctrlSelector = \"#\" + _options.controllerDivId;\n var ctrls = jQuery(ctrlSelector);\n if (ctrls.length) {\n var currentTime = (new Date()).getTime();\n var startTime = getBeginDate().getTime();\n var endTime = getEndDate().getTime();\n // Forecast start time.\n var fctStart = getForecastBeginDate().getTime();\n // If end time is less than forecast time, then forecast is not used and value is left undefined.\n if (endTime < fctStart) {\n fctStart = undefined;\n }\n var timePeriodListeners = [];\n var timeSelectionListeners = [];\n var fctStartTimeListeners = [];\n var tickIntervalListeners = [];\n\n // Model is used by animation controller to setup slider according to the animation settings.\n var timeModel = {\n getStartTime : function() {\n return startTime;\n },\n getEndTime : function() {\n return endTime;\n },\n getResolution : function() {\n return getResolution();\n },\n getForecastStartTime : function() {\n return fctStart;\n },\n addTimePeriodChangeListener : function(l) {\n timePeriodListeners.push(l);\n },\n addTimeSelectionChangeListener : function(l) {\n timeSelectionListeners.push(l);\n },\n addAnimationEventsListener : function(l) {\n _animationEventsListeners.push(l);\n },\n addForecastStartTimeChangeListener : function(l) {\n fctStartTimeListeners.push(l);\n },\n addTickIntervalChangeListener : function(l) {\n tickIntervalListeners.push(l);\n }\n };\n\n // Animation controller may use these callback functions to inform\n // if animation state should be changed because of the actions in the slider.\n var timeController = {\n proposeTimePeriodChange : function(startTime, endTime) {\n\n },\n proposeTimeSelectionChange : function(time) {\n if ((time >= startTime) && (time <= endTime)) {\n // Make sure steps are in given resolutions.\n time = time - time % getResolution();\n fireSelectedTimeChanged(time, timeSelectionListeners);\n }\n },\n proposeNextFrame : function() {\n fireNextFrame();\n },\n proposePreviousFrame : function() {\n firePreviousFrame();\n },\n proposePause : function() {\n firePause();\n }\n };\n\n _animationController = createCtrl(ctrls, timeModel, timeController);\n\n // Bind to listen for width changes in element to update\n // controller if necessary. Width is defined as relative\n // in CSS but height is static.\n var width = ctrls.width();\n // Notice, the window resize listener has already been set during animator construction.\n // Use debounce to limit frequency of component redraw operations.\n _animationControllerResize = createDebounce(function() {\n var currentWidth = jQuery(ctrlSelector).width();\n if (currentWidth !== width) {\n width = currentWidth;\n // Simply replace old with a new controller.\n _animationController.remove();\n _animationController = createCtrl(ctrls, timeModel, timeController);\n }\n });\n\n setPlayAndPause();\n }\n }\n }", "function createController() {\n if (!_options || !_options.controllerDivId || !_options.playAndPauseDivId) {\n throw \"ERROR: Options or properties missing for controller!\";\n\n } else {\n // Do not create controller if animation has not defined any time period for frames.\n // If no period is given, then only show currently given layers.\n if (getBeginDate() !== undefined && getEndDate() !== undefined) {\n var ctrlSelector = \"#\" + _options.controllerDivId;\n var ctrls = jQuery(ctrlSelector);\n if (ctrls.length) {\n var animationShowUtc = getAnimationShowUtc();\n var currentTime = (new Date()).getTime();\n var startTime = getBeginDate().getTime();\n var endTime = getEndDate().getTime();\n // Forecast start time.\n var fctStart = getForecastBeginDate().getTime();\n // If end time is less than forecast time, then forecast is not used and value is left undefined.\n if (endTime < fctStart) {\n fctStart = undefined;\n }\n var timePeriodListeners = [];\n var timeSelectionListeners = [];\n var fctStartTimeListeners = [];\n var tickIntervalListeners = [];\n\n // Model is used by animation controller to setup slider according to the animation settings.\n var timeModel = {\n getStartTime : function() {\n return startTime;\n },\n getEndTime : function() {\n return endTime;\n },\n getResolution : function() {\n return getResolution();\n },\n getForecastStartTime : function() {\n return fctStart;\n },\n getAnimationShowUtc : function() {\n return animationShowUtc;\n },\n addTimePeriodChangeListener : function(l) {\n timePeriodListeners.push(l);\n },\n addTimeSelectionChangeListener : function(l) {\n timeSelectionListeners.push(l);\n },\n addAnimationEventsListener : function(l) {\n _animationEventsListeners.push(l);\n },\n addForecastStartTimeChangeListener : function(l) {\n fctStartTimeListeners.push(l);\n },\n addTickIntervalChangeListener : function(l) {\n tickIntervalListeners.push(l);\n }\n };\n\n // Animation controller may use these callback functions to inform\n // if animation state should be changed because of the actions in the slider.\n var timeController = {\n proposeTimePeriodChange : function(startTime, endTime) {\n\n },\n proposeTimeSelectionChange : function(time) {\n var resolution = getResolution();\n if (resolution && undefined !== time && null !== time) {\n // Force the time to be inside accepted range.\n if (time < startTime) {\n // Notice, time may be almost one resolution less than startTime\n // because the time is ceiled on the resolution and the time step\n // describes the time resolution before the given time.\n time = startTime;\n\n } else if (time > endTime) {\n time = endTime;\n\n } else {\n // Make sure steps are in given resolutions.\n var reminder = time % resolution;\n if (reminder) {\n // Time is ceiled on the resolution.\n time = time - reminder + resolution;\n }\n }\n fireSelectedTimeChanged(time, timeSelectionListeners);\n }\n },\n proposeNextFrame : function() {\n fireNextFrame();\n },\n proposePreviousFrame : function() {\n firePreviousFrame();\n },\n proposePause : function() {\n firePause();\n }\n };\n\n setPlayAndPause();\n\n _animationController = createCtrl(ctrls, timeModel, timeController);\n\n // Bind to listen for width changes in element to update\n // controller if necessary. Width is defined as relative\n // in CSS but height is static.\n var width = ctrls.width();\n // Notice, the window resize listener has already been set during animator construction.\n _animationControllerResize = function() {\n var currentWidth = jQuery(ctrlSelector).width();\n if (currentWidth !== width) {\n width = currentWidth;\n // Simply replace old with a new controller.\n _animationController.remove();\n _animationController = createCtrl(ctrls, timeModel, timeController);\n }\n };\n }\n }\n }\n }", "getExtractor(extractorName) {\n try {\n let Extractor = require('./' + extractorName);\n return new Extractor();\n } catch (e) {\n let BaseExtractor = require('./baseExtractor/BaseExtractor');\n return new BaseExtractor();\n }\n }", "function PurchaseController() {\n this.controllerAsName = \"purchaseCntrl\";\n this.printSomething = function () {\n console.log(\"Purchase works\");\n };\n }", "setupController(controller , model ){ \n controller.set('webapidataf2',model.resultA); \n }", "function new_Controller(model, view) {\n var ret = new Object();\n\n // protected data\n ret.model = model;\n ret.view = view;\n ret.ignoreNotifications = false;\n\n // public methods\n ret.initializeModel = Controller_InitializeModel;\n ret.notifyCellValue = Controller_NotifyCellValue;\n ret.propagateCellChoice = Controller_PropagateCellChoice;\n ret.eliminateSets = Controller_EliminateSets;\n ret.solve = Controller_Solve;\n ret.workHarder = Controller_WorkHarder;\n ret.findValuesWithOnlyOnePossibleCell = \n Controller_FindValuesWithOnlyOnePossibleCell;\n ret.eliminateByLineIntersection = Controller_EliminateByLineIntersection;\n\n // initialization code \n\n // when created, tell the model that we are the controller\n model.setController(ret);\n\n return ret;\n}", "function ResultsController($scope, matchmedia, ChallengeService, Utils, ConfigService, resolvedChallengeResults, resolvedCurrentChallenge) {\n var vm = this;\n vm.results = resolvedChallengeResults.content;\n vm.totalCount = resolvedChallengeResults.metadata.totalCount;\n vm.challenge = resolvedCurrentChallenge;\n vm.tcChallengeDetailsUrl = tcChallengeDetailsUrl;\n vm.tcMemberProfileUrl = tcMemberProfileUrl;\n vm.download = download;\n\n //user-agent stuff\n vm.browser = Utils.getBrowser();\n vm.phone = matchmedia.isPhone();\n\n activate();\n\n function activate() {\n //TODO(DG: 10/15/2014): replace w/ ng-grid\n //table stuff\n var headers = [\n {\n \"colName\": \"Place\",\n \"col\": \"scorecard.place\"\n },\n {\n \"colName\": \"Prize\",\n \"col\": \"scorecard.prize\"\n },\n {\n \"colName\": \"Submitter\",\n \"col\": \"submitterId\"\n },\n {\n \"colName\": \"Score\",\n \"col\": \"scorecard.scoreSum\"\n }\n ];\n\n var sort = {'scorecard.place': 'asc'};\n Utils.handleTable(vm, $scope, headers, vm.results, vm.totalCount, sort);\n }\n\n //helper functions\n function tcChallengeDetailsUrl(challenge) {\n return ConfigService.getBaseChallengeDetailsUrl() + challenge.id + '?type=develop&lc=true';\n }\n\n function tcMemberProfileUrl(memberHandle) {\n return ConfigService.getBaseMemberProfileUrl() + memberHandle;\n }\n\n function download(fileDownloadUrl) {\n ChallengeService.getSignedUrl(fileDownloadUrl).then(function(url) {\n window.location = url;\n })\n }\n\n }", "function Controller() { }", "static getInstance(controller) {\n\t\tif (!this._instance) this._instance = new ActionsWinEdit({ controller: controller });\n\t\tthis._instance.controller = controller;\n\t\treturn this._instance;\n\t}", "get actionSheetController() {\n return getOrCreateController('ion-action-sheet-controller')\n }", "setupController(controller , model ){ \n controller.set('webapidata4',model.resultO);\n }", "function ViewController() {}", "static initialResult(actionContext) {\n return {\n nextContext: actionContext,\n resultOps: [],\n scheduledActions: []\n };\n }", "_constructControllers() {\n this.accountsController = new AccountsController(this.registration);\n this.clientsController = new ClientController();\n this.authorityController = new AuthorityController();\n this.errorsController = new ErrorController();\n this.tokenController = new TokenController();\n }", "function Controller () {\n this.ui = new UI()\n this.answers = {}\n}", "function create() {\n return new Response();\n}", "function YieldController() {\n\tthis.jobsToYield = {};\n}", "constructor() {\n super(\"extractor\");\n }", "function createExport() {\n return apiCrowdin.createExport();\n}", "function createResultObject(testObj) {\n return {\n \"title\": testObj.title\n , \"index\": testObj.index\n , \"iterations\": []\n };\n }", "showResult(apiResponse){\n // using promise to call the result view function\n return new Promise( ( resolve, reject) => {\n // resgistered uri of the result view\n uri = 'atom://evaluator-package-result'\n // open the editor\n atom.workspace.open(uri, split= 'right', searchAllPanes= true).then( evaluatorPackageView => {\n if (evaluatorPackageView instanceof EvaluatorPackageView)\n {\n // call to method of result view class\n evaluatorPackageView.renderAnswer(apiResponse);\n resolve('view created');\n }\n else {\n // resturn error object for error\n reject({\n reason: 'Unable to create page view'\n });\n }\n });\n });\n }", "function create_dataset_detail_controller() {\n var buildings_payload = {\n buildings: [\n {\n pm_property_id: 1,\n tax_lot_id: null,\n custom_id_1: 2,\n gross_floor_area: 111,\n matched: true,\n id: 1,\n children: [3],\n coparent: {\n pm_property_id: null,\n tax_lot_id: 2,\n custom_id_1: null,\n gross_floor_area: 111,\n id: 2,\n children: [3]\n }\n }\n ],\n number_matching_search: 1,\n number_returned: 1\n };\n matching_controller = controller('matching_controller', {\n $scope: matching_controller_scope,\n buildings_payload: buildings_payload,\n all_columns: {\n fields: [{sort_column: 'pm_property_id'}]\n },\n default_columns: {\n columns: ['pm_property_id']\n },\n import_file_payload: {\n import_file: {\n id: 1,\n dataset: {\n importfiles: [{\n id: 1,\n name: 'file_1.csv'\n }, {\n id: 2,\n name: 'file_2.csv'\n }]\n }\n }\n }\n });\n }", "createAction() {}", "function FileDownloadController() {\n var vm = this;\n\n vm.getZipFile = function (id) {\n var iFrameId = 'hiddenDownloader';\n var hiddenIFrame = document.getElementById(iFrameId);\n if (hiddenIFrame === null) {\n hiddenIFrame = document.createElement('iframe');\n hiddenIFrame.id = iFrameId;\n hiddenIFrame.style.display = 'none';\n document.body.appendChild(hiddenIFrame);\n }\n hiddenIFrame.src = page.URLS.download + id + '?dandelionAssetFilterState=false';\n };\n }", "function Reviews_PresentationController() {\n kony.mvc.Presentation.BasePresenter.call(this);\n }", "function Controler() {\n this.request = new XMLHttpRequest();\n }", "function initilizeController(){\n }", "function Controller() {\n\n }", "function Controller() {\n \n }", "function Controller() {\n \n }", "detailAction() {}", "async create({ request, response, view }) {}", "function actionCreator() {\n return action\n }", "function actionCreator() {\n return action;\n }", "function InvoiceController(currencyConverter) {\n // Binding members defined/declared up top and alphabetically\n var vm = this; // ViewModel: use instead of this to avoid scope rules inside functions\n vm.cost = 2;\n vm.inCurr = 'EUR';\n vm.pay = pay;\n vm.qty = 1;\n vm.total = total;\n vm.currencies = currencyConverter.currencies;\n \n // Function implementations below\n\n function pay() {\n window.alert('Thanks!');\n };\n\n function total(outCurr) {\n return currencyConverter.convert(vm.qty * vm.cost, vm.inCurr, outCurr);\n };\n}", "function CasperVoidController() {\n\n this.init = function() {}\n \n /* methods related to page events */\n this.onPageLoad = function() {}\n this.onPageUnload = function() {}\n \n /* methods related to records listing events */\n this.onSearch = function() {}\n this.afterSearch = function() {}\n this.onClear = function() {}\n this.afterClear = function() {}\n this.onRefresh = function() {}\n this.afterRefresh = function() {}\n this.onPaging = function(page) {}\n this.afterPaging = function(page) {}\n \n /* methods related to single record events */\n this.onNew = function() {}\n this.afterNew = function() {}\n this.onView = function(id) {}\n this.afterView = function(id,data) {}\n this.onEdit = function(id) {}\n this.afterEdit = function(id,data) {}\n this.onDelete = function(id) {}\n this.afterDelete = function(id) {}\n this.onCancel = function() {}\n this.afterCancel = function() {}\n this.onSave = function() {}\n this.afterSave = function() {}\n}", "function ApprovalsReqModule_PresentationController() {\n kony.mvc.Presentation.BasePresenter.call(this);\n this.initializePresentationController();\n }", "function getController() {\n return controller;\n}", "function AccountsPresentationController() {\n kony.mvc.Presentation.BasePresenter.call(this);\n }", "function createIterationResultObject(testObj, iteration) {\n return {\n \"index\": testObj.index\n , \"iteration\": iteration\n };\n }", "constructor(modalController, resources, storage, actionSheetController, restService) {\n this.modalController = modalController;\n this.resources = resources;\n this.storage = storage;\n this.actionSheetController = actionSheetController;\n this.restService = restService;\n }", "construct(inSearchRequest : ISOClaimSearchRequest, inExposure : Exposure) {\n super(inSearchRequest, inExposure)\n }", "function PdfAction() {\n /**\n * Specifies the Next `action` to perform.\n * @private\n */\n this.action = null;\n /**\n * Specifies the Internal variable to store `dictionary properties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n // super(); -> Object()\n this.initialize();\n }", "function Extraction( isAsync, reject, str, brackets ){\n\t\t\t\t//initialize some values from the input\n\t\t\t\tthis.isAsync = isAsync;\n\t\t\t\tthis.reject = reject;\n\t\t\t\tthis.remainingString = str;\n\t\t\t\tthis.WordBoundaryManager = brackets.wordBoundaryManager;\n\t\t\t\t\n\t\t\t\t//initialize other arguments\n\t\t\t\tthis.Location = buildLocation();\n\t\t\t\t\n\t\t\t\tthis.Nest = new Nest( brackets, this );\n\t\t\t}", "function n(e){return new n.Viewer(e)}", "function actionCreator() {\n return action\n}", "extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => node.visit(this, null));\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n }", "extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => node.visit(this, null));\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n }", "extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => node.visit(this, null));\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n }", "extract(nodes, interpolationConfig) {\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(node => node.visit(this, null));\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n }", "function ProcessController() {}", "function initController() {\n }", "function createCtrlWithExpiration(date) {\n var ctrl = undefined;\n cert.expiration = date;\n ctrl = createController();\n $rootScope.$apply();\n return ctrl;\n }", "function createResultsPanel(permalinkProvider) {\n metadataResultsView = new GeoNetwork.MetadataResultsView({\n catalogue: catalogue,\n displaySerieMembers: true,\n autoScroll: true,\n tpl: GeoNetwork.Templates.FULL,\n featurecolor: GeoNetwork.Settings.results.featurecolor,\n colormap: GeoNetwork.Settings.results.colormap,\n featurecolorCSS: GeoNetwork.Settings.results.featurecolorCSS\n });\n \n catalogue.resultsView = metadataResultsView;\n \n tBar = new GeoNetwork.MetadataResultsToolbar({\n catalogue: catalogue,\n searchFormCmp: Ext.getCmp('searchForm'),\n sortByCmp: Ext.getCmp('E_sortBy'),\n metadataResultsView: metadataResultsView,\n permalinkProvider: permalinkProvider,\n withPaging: true,\n searchCb: search\n });\n \n \n var resultPanel = new Ext.Panel({\n id: 'resultsPanel',\n border: false,\n hidden: true,\n bodyCssClass: 'md-view',\n autoWidth: true,\n layout: 'fit',\n tbar: tBar,\n items: metadataResultsView\n });\n return resultPanel;\n }", "function MainController() {\n\n var self = this;\n\n //\n _.extend(self, {\n });\n\n\n }", "extract() {\n throw new Error('Missing _extract_ method on extractor');\n }", "constructor() {\n this.controller = new Controller();\n this._initialized = false;\n }", "function createCesiumController( $timeout, icrfPreloader, constants ) {\n var vm = this;\n\n // Test whether initialDates has a value at the time that this\n // component is created. If not, this value will be set to\n // true later, once they have been received.\n var initialDatesReceived =\n vm.initialDates &&\n vm.initialDates.start &&\n vm.initialDates.end;\n\n // If we have initialDates, use them to initialize the\n // Cesium viewer.\n vm.$onInit = function() {\n if( initialDatesReceived ) {\n $timeout(function() {\n initCesium( vm.initialDates );\n }, 0, false);\n }\n };\n\n vm.$onChanges = function( changesObj ) {\n\n // If we didn't receive initialDates at creation time,\n // and this is the first time we've received them, then\n // initialize the Cesium viewer and set\n // initialDatesReceived to true.\n if(\n !initialDatesReceived &&\n changesObj.initialDates &&\n changesObj.initialDates.currentValue &&\n changesObj.initialDates.currentValue.start &&\n changesObj.initialDates.currentValue.end\n )\n {\n // Make sure to preload ICRF data for this time range. This is needed\n // so that we can compute the sub-solar point.\n icrfPreloader.preloadIcrf( vm.initialDates.start, vm.initialDates.end ).then(function() {\n initCesium( changesObj.initialDates.currentValue );\n });\n initialDatesReceived = true;\n }\n };\n\n // Initialize the Cesium viewer and configure it as appropriate\n var initCesiumHasBeenCalled = false;\n function initCesium( timeframe ) {\n if( initCesiumHasBeenCalled ) { return; }\n initCesiumHasBeenCalled = true;\n\n var viewer = vm.cesium.makeViewer(\n timeframe.start,\n timeframe.end,\n function( config ) {\n return angular.extend(\n {},\n config,\n {\n geocoder: false,\n homeButton: false,\n sceneModePicker: false,\n infoBox: false,\n navigationHelpButton: false\n }\n );\n }\n );\n\n // Render shadows on the night side\n viewer.scene.globe.enableLighting = true;\n\n var sunPositionLatLng = getSubsolarPoint(timeframe.start);\n\n // empirically a good height - usually fits most/all of the orbit\n // inside the viewport\n var cameraHeight = constants.EARTH_RADIUS_METERS * 30;\n\n // Make sure the frustum is large enough to accommodate\n // the MMS orbit when zooming out.\n // 1e15 is just an arbitrary value that happens to\n // be sufficiently large.\n viewer.camera.frustum.far = 1e15;\n\n // Viewer clock settings\n viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;\n viewer.clock.multiplier = 1000;\n\n // Fly the camera to a default starting location. For MMS, the apogee\n // is typically \"pointed\" at the Sun, so we compute the subsolar\n // lat/lng and fly to a point based on that.\n viewer.camera.flyTo({\n destination: Cesium.Cartesian3.fromDegrees(\n Cesium.Math.toDegrees(sunPositionLatLng.longitude),\n 0, // puts the camera at the equator - looks a little better IMO\n cameraHeight\n )\n });\n\n //This fixes a bug where, upon the double-click of a page element, the\n //camera zooms to inside the planet. This same bug would occur using an\n //infobox that came up on a single click, and that infobox was removed\n //in the initialization of the Cesium viewer above.\n viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);\n }\n\n // Use Cesium data to get the subsolar point. Requires ICRF data to be\n // preloaded (see https://cesiumjs.org/Cesium/Build/Documentation/Transforms.html#.preloadIcrfFixed)\n function getSubsolarPoint(date) {\n var julianDate = Cesium.JulianDate.fromDate(date);\n\n var sunPosition = Cesium.Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(\n Cesium.JulianDate.fromDate(date)\n );\n\n var icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(julianDate);\n\n Cesium.Matrix3.multiplyByVector(icrfToFixed, sunPosition, sunPosition);\n\n var sunPositionLatLng = Cesium.Cartographic.fromCartesian(sunPosition);\n sunPositionLatLng.height = 0; // right on surface\n\n return sunPositionLatLng;\n }\n\n\n}", "constructor() {\n this.format = \"json\";\n this.action = \"query\";\n this.prop = \"extracts\";\n this.onlyBeforeFirstSection = true;\n this.extractPlainText = true;\n }", "function ExposureFx () { \n\tif (!(this instanceof ExposureFx)) return new ExposureFx();\t\n}", "function actionEmpleadoController() {\n if (vm.empleadoCreate && vm.empleadoCreate._id) {\n updateEmpleadoController()\n } else {\n createEmpleadoController()\n }\n }", "function main() {\n ObjPortfolioController = new PortfolioController();\n ObjPortfolioController.ocultarElemento(\"formulario\");\n ObjPortfolioController.getTodosTable(divPortfolios);\n ObjPortfolioController.registrarEvento()\n}", "function actionCreator(){\n return action;\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "function create(config){\n\n config = config || {};\n // TODO - default config object\n config.actions = config.actions || [];\n config.onShow = config.onShow || function(){};\n config.onHide = config.onHide || function(){};\n var model = config.model || {};\n\n // if the template was provided, use that\n if(config.template){\n _create(config.template, model, config);\n\n // otherwise, request the template\n // TODO - pop a modal with load spinner?\n } else {\n fetchModalTemplate(config.templateUrl).then(function(res){\n _create(res.data, model, config);\n });\n }\n }", "function createTaskController(parent, id) {\n let controller = createElement({ class: 'control-panel' });\n\n // Create palette\n let colorPalette = createColorPalette(parent, id);\n controller.appendChild(colorPalette);\n\n // Edit button\n let editBtn = createEditBtn(parent, id);\n controller.appendChild(editBtn);\n\n return controller;\n}", "function createFinalResult(testResults) {\n return testResultProcessor(testResults);\n }", "function Controller(){} //Extends Class (at bottom of page).", "function actionCreator(payloadValue) {\n //a.1. return action object\n return {\n //a.2. action type(NEEDED)\n type: 'ACTION_TYPE',\n //a.3. payload and any other key needed only based on what you want to do\n payload: payloadValue\n }\n }", "function prescription() {\n var directive = {\n bindToController: true,\n controller: PrescriptionController,\n controllerAs: 'vm',\n restrict: 'E',\n scope: {\n retrospectiveMode: '='\n },\n templateUrl: '../common/prescription/directives/prescription.html'\n };\n return directive;\n }", "function createPreview() { \n\t\tvar alt = $(this).attr('alt');\n\t\tvar src = $(this).attr('src');\n\t\tvar newsrc = src.replace(\"square-medium\",\"average\");\n\n\t\tvar preview = $('<div id=\"preview\"></div>');\n\t\tvar header = $('<h1>Preview: </h1>');\n\t\tvar image = $('<img src=\"' + newsrc + '\">');\n\t\tpreview.append(header);\n\t\tpreview.append(image);\n\t\t$('main').append(preview);\n\n\t\t$(this).addClass(\"gray\");\n\t\t$('#preview h1').css(\"color\", \"white\");\n\t\t$(\"#preview\").fadeIn(1000);\n }", "get alertController() {\n return getOrCreateController('ion-alert-controller')\n }", "function instantiate(accessorName, accessorClass) {\n // The instantiate() function must be defined in\n // web/hosts/nodeHost/nodeHost.js so that require() knows to look\n // in the web/hosts/nodeHost/node_modules.\n\n // FIXME: The bindings should be a bindings object where require == a requireLocal\n // function that searches first for local modules.\n var bindings = {\n 'getResource': getResource,\n 'require': require,\n };\n var instance = commonHost.instantiateAccessor(\n accessorName, accessorClass, getAccessorCode, bindings);\n //console.log('nodeHost.js: Instantiated accessor ' + accessorName + ' with class ' + accessorClass);\n return instance;\n}", "function DemandController () {\n\t\t\t// user submits zip code\n\t\t\t$(\"form#zip-search-demand\").submit(this.searchZip.bind(this));\n\t\t\t// user chooses targets\n\t\t\t// user removes targets\n\t\t\t// user sends message\n\t\t}", "constructor() {\n this.dispatcher = Dispatcher.getInstance();\n this.view = ControllerView;\n this.lastInputType = '';\n this.lastAction = '';\n this.operands = new Stack();\n this.operators = new Stack();\n this._registerToDispatcher();\n }", "constructor(actionRecord, view) {\n this.view = view;\n this.actions = actionRecord;\n this.running = false;\n this.currentAction = null;\n }", "function EmailController(model, view) {\n\n // Store the provided Model and View objects\n this.model = model;\n this.view = view;\n}", "function createEnigma(){\n var enigmaApp = new Enigma();\n enigmaApp.init()\n .startApp();\n return enigmaApp;\n}", "function createResultsArea() {\n const playerResult = document.createElement('div');\n playerResult.classList.add('playerResult');\n playerResult.innerHTML = `0`;\n const croupierResult = document.createElement('div');\n croupierResult.classList.add('croupierResult');\n croupierResult.innerHTML = `0`;\n getDivTransparent().appendChild(playerResult);\n getDivTransparent().appendChild(croupierResult);\n}", "function Searcher(iLogger, iDisplayResult) {\r\n this.url = \"https://pbparser.appspot.com/search/main/\";\r\n this.logger = iLogger;\r\n this.result = iDisplayResult;\r\n}", "function actionCreator(action) {\n return action\n}", "function initController(){\n var home=document.querySelector(\".home\");\n controller=Controller(home);\n controller.init();\n controller.setOnButtonClickedListener(onButtonClicked);\n }", "function DialogController(renderer, settings, resolve, reject) {\n this.resolve = resolve;\n this.reject = reject;\n this.settings = settings;\n this.renderer = renderer;\n }", "function TvShowController(AnswersService, Constants, MovieApiService, $mdDialog) {\r\n\t\t\r\n\t\t//Sets the tvShow variable to the current instance of the controller\r\n\t\tvar tvShow = this;\r\n\r\n tvShow.answer = AnswersService;\r\n\r\n //Call to the MovieApiService passing the Tv Show defined in the constants\r\n //The name of the Tv Show is passed in the \"T\" parameter for TITLE\r\n //Addtional information about the available types of parameters can be\r\n //found at http://www.omdbapi.com/\r\n MovieApiService({t:Constants.TV_SHOW}).then(function (response) {\r\n\r\n //Sets the object returned in the data\r\n //to the selected property of the controller\r\n tvShow.selected = response.data;\r\n })\r\n\r\n tvShow.getEpisodes = function (season) {\r\n\r\n //Call to the MovieApiService passing the Tv Show defined in the constants\r\n //The name of the Tv Show is passed in the \"T\" parameter for TITLE\r\n //and the Season parameter for the season number\r\n //Addtional information about the available types of parameters can be\r\n //found at http://www.omdbapi.com/\r\n MovieApiService({\r\n t:Constants.TV_SHOW,\r\n Season:season\r\n })\r\n .then(function (response) {\r\n\r\n //Sets the object returned in the data\r\n //to the selected property of the controller\r\n tvShow.seasonEpisodes = response.data.Episodes;\r\n })\r\n }\r\n\r\n\t\t//Function that returns an array of numbers representing the seasons\r\n\t\t//of the selected tv show based on the number of seasons in the selected tv show\r\n\t\ttvShow.seasons = function () {\r\n\t\t\t\r\n\t\t\t//Initializes the seasons collection with an empty array\r\n\t\t\tvar seasons = [];\r\n\r\n //If the selected tv show is alredy set counts the seasons\r\n if (tvShow.selected) {\r\n\r\n //Runs a loop going from 1 to the total number of seasons of the selected tv show.\r\n for (var i = 1; i <= tvShow.selected.totalSeasons; i++) {\r\n\r\n //Adds the number representing the season to the seasons collection\r\n seasons.push(i);\r\n }\r\n }\t\t\t\r\n\r\n\t\t\t//Returns the seasons collection\r\n\t\t\treturn seasons;\r\n\t\t}\r\n\r\n //Shows the info about a particular episode in a modal windpw\r\n tvShow.info = function (episode, ev) {\r\n\r\n //Shows an Dialog window with the info about a particular episode\r\n $mdDialog.show({\r\n\r\n //Controller of the dialog window injecting the local variable episode \r\n //and the $mdDialog service\r\n controller: ['episode','$mdDialog', function (episode, $mdDialog) {\r\n\r\n //Sets the episode object in the episode property\r\n //on the controller so it can be used in the html\r\n this.episode = episode;\r\n\r\n //Function to close the dialog \r\n this.close=function () {\r\n $mdDialog.hide();\r\n }\r\n }],//Controller of the Dialog\r\n controllerAs: 'info',\r\n templateUrl: 'tv-show-info.html',//Template of the dialog\r\n parent: angular.element(document.body),//Parent element where the dialog will be inserted\r\n targetEvent: ev,//Event the started the action\r\n clickOutsideToClose: true, //Click out of the dialog behavior\r\n fullscreen: false, //Full screen behavior\r\n locals: {\r\n episode: episode//local variables passed to the controller\r\n }\r\n });\r\n }\r\n\r\n\t}", "static factory() {\n return new Progress().init();\n }", "function MovieController() {\n let vm = this;\n vm.newMovie = {}\n vm.movies = [\n { title: \"Dope-ass movie\", releaseYear: 2017, genreId: 1 }\n ];\n\n /**\n * Add movie to list of favorite movies\n * @param {Object} movie An object that contains a title, releaseYear, and genreId representing a movie\n */\n vm.addMovie = function addMovie(movie) {\n if (typeof movie !== 'object' || typeof movie.title !== 'string') {\n return;\n }\n\n vm.movies.push({\n title: movie.title,\n releaseYear: movie.releaseYear,\n genreId: movie.genreId\n })\n\n vm.newMovie = {};\n };\n }", "constructor() {\n // Run super\n super();\n\n // Bind public methods\n this.indexAction = this.indexAction.bind(this);\n }", "constructor() {\n // Run super\n super();\n\n // Bind public methods\n this.indexAction = this.indexAction.bind(this);\n }" ]
[ "0.48591992", "0.47696862", "0.4694689", "0.4559893", "0.45272592", "0.44371143", "0.43934274", "0.43888316", "0.43568876", "0.431687", "0.43167228", "0.42791232", "0.42293522", "0.4225217", "0.4185911", "0.4179992", "0.41760424", "0.41551647", "0.41475797", "0.41450208", "0.41323638", "0.41241166", "0.40951434", "0.40836164", "0.4076327", "0.40607843", "0.40464765", "0.4043468", "0.40408817", "0.40188867", "0.399871", "0.3998648", "0.3972685", "0.3971562", "0.3947402", "0.3947402", "0.39402258", "0.3940177", "0.3925278", "0.39221877", "0.3900105", "0.38887206", "0.3881208", "0.38752154", "0.38749787", "0.38672602", "0.3853155", "0.38502264", "0.38495654", "0.38491824", "0.3844937", "0.3823757", "0.3818361", "0.3818361", "0.3818361", "0.3818361", "0.38141835", "0.3810893", "0.38060063", "0.37849057", "0.3763511", "0.3752192", "0.37501228", "0.37386054", "0.3715825", "0.37146726", "0.37146077", "0.37087336", "0.37081924", "0.37072447", "0.37072447", "0.37072447", "0.37072447", "0.37072447", "0.37072447", "0.37072447", "0.37057242", "0.37047064", "0.3694886", "0.3690788", "0.3684824", "0.36822262", "0.3675754", "0.36737967", "0.36725265", "0.3665388", "0.36619648", "0.36475965", "0.36356008", "0.36320484", "0.36271882", "0.36224613", "0.36170107", "0.36145037", "0.3614261", "0.36132908", "0.3610649", "0.36095074", "0.35939938", "0.35939938" ]
0.51233536
0
Return a firebase namespace object. In production, this will be called exactly once and the result assigned to the 'firebase' global. It may be called multiple times in unit tests.
function createFirebaseNamespace() { var apps_ = {}; var factories = {}; var appHooks = {}; // A namespace is a plain JavaScript Object. var namespace = { // Hack to prevent Babel from modifying the object returned // as the firebase namespace. __esModule: true, initializeApp: initializeApp, app: app, apps: null, Promise: Promise, SDK_VERSION: '5.8.3', INTERNAL: { registerService: registerService, createFirebaseNamespace: createFirebaseNamespace, extendNamespace: extendNamespace, createSubscribe: util.createSubscribe, ErrorFactory: util.ErrorFactory, removeApp: removeApp, factories: factories, useAsService: useAsService, Promise: Promise, deepExtend: util.deepExtend } }; // Inject a circular default export to allow Babel users who were previously // using: // // import firebase from 'firebase'; // which becomes: var firebase = require('firebase').default; // // instead of // // import * as firebase from 'firebase'; // which becomes: var firebase = require('firebase'); util.patchProperty(namespace, 'default', namespace); // firebase.apps is a read-only getter. Object.defineProperty(namespace, 'apps', { get: getApps }); /** * Called by App.delete() - but before any services associated with the App * are deleted. */ function removeApp(name) { var app = apps_[name]; callAppHooks(app, 'delete'); delete apps_[name]; } /** * Get the App object for a given name (or DEFAULT). */ function app(name) { name = name || DEFAULT_ENTRY_NAME; if (!contains(apps_, name)) { error('no-app', { name: name }); } return apps_[name]; } util.patchProperty(app, 'App', FirebaseAppImpl); function initializeApp(options, rawConfig) { if (rawConfig === void 0) { rawConfig = {}; } if ((typeof rawConfig === 'undefined' ? 'undefined' : _typeof(rawConfig)) !== 'object' || rawConfig === null) { var name_1 = rawConfig; rawConfig = { name: name_1 }; } var config = rawConfig; if (config.name === undefined) { config.name = DEFAULT_ENTRY_NAME; } var name = config.name; if (typeof name !== 'string' || !name) { error('bad-app-name', { name: name + '' }); } if (contains(apps_, name)) { error('duplicate-app', { name: name }); } var app = new FirebaseAppImpl(options, config, namespace); apps_[name] = app; callAppHooks(app, 'create'); return app; } /* * Return an array of all the non-deleted FirebaseApps. */ function getApps() { // Make a copy so caller cannot mutate the apps list. return Object.keys(apps_).map(function (name) { return apps_[name]; }); } /* * Register a Firebase Service. * * firebase.INTERNAL.registerService() * * TODO: Implement serviceProperties. */ function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) { // Cannot re-register a service that already exists if (factories[name]) { error('duplicate-service', { name: name }); } // Capture the service factory for later service instantiation factories[name] = createService; // Capture the appHook, if passed if (appHook) { appHooks[name] = appHook; // Run the **new** app hook on all existing apps getApps().forEach(function (app) { appHook('create', app); }); } // The Service namespace is an accessor function ... var serviceNamespace = function serviceNamespace(appArg) { if (appArg === void 0) { appArg = app(); } if (typeof appArg[name] !== 'function') { // Invalid argument. // This happens in the following case: firebase.storage('gs:/') error('invalid-app-argument', { name: name }); } // Forward service instance lookup to the FirebaseApp. return appArg[name](); }; // ... and a container for service-level properties. if (serviceProperties !== undefined) { util.deepExtend(serviceNamespace, serviceProperties); } // Monkey-patch the serviceNamespace onto the firebase namespace namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype FirebaseAppImpl.prototype[name] = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var serviceFxn = this._getService.bind(this, name); return serviceFxn.apply(this, allowMultipleInstances ? args : []); }; return serviceNamespace; } /** * Patch the top-level firebase namespace with additional properties. * * firebase.INTERNAL.extendNamespace() */ function extendNamespace(props) { util.deepExtend(namespace, props); } function callAppHooks(app, eventName) { Object.keys(factories).forEach(function (serviceName) { // Ignore virtual services var factoryName = useAsService(app, serviceName); if (factoryName === null) { return; } if (appHooks[factoryName]) { appHooks[factoryName](eventName, app); } }); } // Map the requested service to a registered service name // (used to map auth to serverAuth service when needed). function useAsService(app, name) { if (name === 'serverAuth') { return null; } var useService = name; var options = app.options; return useService; } return namespace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.8.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.1',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.2',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '${JSCORE_VERSION}',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"J\" /* createSubscribe */],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"K\" /* ErrorFactory */],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n\t var apps_ = {};\n\t var factories = {};\n\t var appHooks = {};\n\t // A namespace is a plain JavaScript Object.\n\t var namespace = {\n\t // Hack to prevent Babel from modifying the object returned\n\t // as the firebase namespace.\n\t __esModule: true,\n\t initializeApp: initializeApp,\n\t app: app,\n\t apps: null,\n\t Promise: _promise.PromiseImpl,\n\t SDK_VERSION: '4.4.0',\n\t INTERNAL: {\n\t registerService: registerService,\n\t createFirebaseNamespace: createFirebaseNamespace,\n\t extendNamespace: extendNamespace,\n\t createSubscribe: _subscribe.createSubscribe,\n\t ErrorFactory: _errors.ErrorFactory,\n\t removeApp: removeApp,\n\t factories: factories,\n\t useAsService: useAsService,\n\t Promise: _promise.PromiseImpl,\n\t deepExtend: _deep_copy.deepExtend\n\t }\n\t };\n\t // Inject a circular default export to allow Babel users who were previously\n\t // using:\n\t //\n\t // import firebase from 'firebase';\n\t // which becomes: var firebase = require('firebase').default;\n\t //\n\t // instead of\n\t //\n\t // import * as firebase from 'firebase';\n\t // which becomes: var firebase = require('firebase');\n\t (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n\t // firebase.apps is a read-only getter.\n\t Object.defineProperty(namespace, 'apps', {\n\t get: getApps\n\t });\n\t /**\n\t * Called by App.delete() - but before any services associated with the App\n\t * are deleted.\n\t */\n\t function removeApp(name) {\n\t var app = apps_[name];\n\t callAppHooks(app, 'delete');\n\t delete apps_[name];\n\t }\n\t /**\n\t * Get the App object for a given name (or DEFAULT).\n\t */\n\t function app(name) {\n\t name = name || DEFAULT_ENTRY_NAME;\n\t if (!contains(apps_, name)) {\n\t error('no-app', { name: name });\n\t }\n\t return apps_[name];\n\t }\n\t (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n\t /**\n\t * Create a new App instance (name must be unique).\n\t */\n\t function initializeApp(options, name) {\n\t if (name === undefined) {\n\t name = DEFAULT_ENTRY_NAME;\n\t } else {\n\t if (typeof name !== 'string' || name === '') {\n\t error('bad-app-name', { name: name + '' });\n\t }\n\t }\n\t if (contains(apps_, name)) {\n\t error('duplicate-app', { name: name });\n\t }\n\t var app = new FirebaseAppImpl(options, name, namespace);\n\t apps_[name] = app;\n\t callAppHooks(app, 'create');\n\t return app;\n\t }\n\t /*\n\t * Return an array of all the non-deleted FirebaseApps.\n\t */\n\t function getApps() {\n\t // Make a copy so caller cannot mutate the apps list.\n\t return Object.keys(apps_).map(function (name) {\n\t return apps_[name];\n\t });\n\t }\n\t /*\n\t * Register a Firebase Service.\n\t *\n\t * firebase.INTERNAL.registerService()\n\t *\n\t * TODO: Implement serviceProperties.\n\t */\n\t function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n\t // Cannot re-register a service that already exists\n\t if (factories[name]) {\n\t error('duplicate-service', { name: name });\n\t }\n\t // Capture the service factory for later service instantiation\n\t factories[name] = createService;\n\t // Capture the appHook, if passed\n\t if (appHook) {\n\t appHooks[name] = appHook;\n\t // Run the **new** app hook on all existing apps\n\t getApps().forEach(function (app) {\n\t appHook('create', app);\n\t });\n\t }\n\t // The Service namespace is an accessor function ...\n\t var serviceNamespace = function serviceNamespace(appArg) {\n\t if (appArg === void 0) {\n\t appArg = app();\n\t }\n\t if (typeof appArg[name] !== 'function') {\n\t // Invalid argument.\n\t // This happens in the following case: firebase.storage('gs:/')\n\t error('invalid-app-argument', { name: name });\n\t }\n\t // Forward service instance lookup to the FirebaseApp.\n\t return appArg[name]();\n\t };\n\t // ... and a container for service-level properties.\n\t if (serviceProperties !== undefined) {\n\t (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n\t }\n\t // Monkey-patch the serviceNamespace onto the firebase namespace\n\t namespace[name] = serviceNamespace;\n\t // Patch the FirebaseAppImpl prototype\n\t FirebaseAppImpl.prototype[name] = function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var serviceFxn = this._getService.bind(this, name);\n\t return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n\t };\n\t return serviceNamespace;\n\t }\n\t /**\n\t * Patch the top-level firebase namespace with additional properties.\n\t *\n\t * firebase.INTERNAL.extendNamespace()\n\t */\n\t function extendNamespace(props) {\n\t (0, _deep_copy.deepExtend)(namespace, props);\n\t }\n\t function callAppHooks(app, eventName) {\n\t Object.keys(factories).forEach(function (serviceName) {\n\t // Ignore virtual services\n\t var factoryName = useAsService(app, serviceName);\n\t if (factoryName === null) {\n\t return;\n\t }\n\t if (appHooks[factoryName]) {\n\t appHooks[factoryName](eventName, app);\n\t }\n\t });\n\t }\n\t // Map the requested service to a registered service name\n\t // (used to map auth to serverAuth service when needed).\n\t function useAsService(app, name) {\n\t if (name === 'serverAuth') {\n\t return null;\n\t }\n\t var useService = name;\n\t var options = app.options;\n\t return useService;\n\t }\n\t return namespace;\n\t}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.9.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.5.0',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.0.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.9',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.0.4',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!index_esm_contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', index_esm_FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (index_esm_contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new index_esm_FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.9.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespaceCore(firebaseAppImpl) {\n var apps = {};\n var factories = {};\n var appHooks = {}; // A namespace is a plain JavaScript Object.\n\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n // @ts-ignore\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n SDK_VERSION: version,\n INTERNAL: {\n registerService: registerService,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService\n }\n }; // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n\n util.patchProperty(namespace, 'default', namespace); // firebase.apps is a read-only getter.\n\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n\n function removeApp(name) {\n var app = apps[name];\n callAppHooks(app, 'delete');\n delete apps[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n\n\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n name: name\n });\n }\n\n return apps[name];\n }\n\n util.patchProperty(app, 'App', firebaseAppImpl);\n\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = {\n name: name_1\n };\n }\n\n var config = rawConfig;\n\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n\n var name = config.name;\n\n if (typeof name !== 'string' || !name) {\n throw ERROR_FACTORY.create(\"bad-app-name\"\n /* BAD_APP_NAME */\n , {\n name: String(name)\n });\n }\n\n if (contains(apps, name)) {\n throw ERROR_FACTORY.create(\"duplicate-app\"\n /* DUPLICATE_APP */\n , {\n name: name\n });\n }\n\n var app = new firebaseAppImpl(options, config, namespace);\n apps[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n\n\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n\n\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n if (allowMultipleInstances === void 0) {\n allowMultipleInstances = false;\n } // Cannot re-register a service that already exists\n\n\n if (factories[name]) {\n throw ERROR_FACTORY.create(\"duplicate-service\"\n /* DUPLICATE_SERVICE */\n , {\n name: name\n });\n } // Capture the service factory for later service instantiation\n\n\n factories[name] = createService; // Capture the appHook, if passed\n\n if (appHook) {\n appHooks[name] = appHook; // Run the **new** app hook on all existing apps\n\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n } // The Service namespace is an accessor function ...\n\n\n function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.\n\n\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n } // Monkey-patch the serviceNamespace onto the firebase namespace\n\n\n namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n\n firebaseAppImpl.prototype[name] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, name);\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n\n return serviceNamespace;\n }\n\n function callAppHooks(app, eventName) {\n for (var _i = 0, _a = Object.keys(factories); _i < _a.length; _i++) {\n var serviceName = _a[_i]; // Ignore virtual services\n\n var factoryName = useAsService(app, serviceName);\n\n if (factoryName === null) {\n return;\n }\n\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n }\n } // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n\n\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }\n\n return namespace;\n}", "function FirebaseService(firebase) {\n this._firebase = firebase;\n }", "getFirebaseServiceAccount() {\n return this.firebaseServiceAccount\n }", "function getProjectRef() {\n var prodFirebaseUrl = 'https://luminous-heat-2841.firebaseio.com/';\n var firebaseUrl = process.env.FIREBASE_URL || prodFirebaseUrl;\n return new Firebase(firebaseUrl + 'project/');\n}", "function FirebaseApp(config) {\n // Re-uses app instance and config object if they exist\n // Otherwise creates new instance and stores it on window\n const initializeApp = config => {\n let configChanged = false\n\n // checks to see if config has changed\n if (window.$$FirebaseDataConfig) {\n configChanged = !objCompare(config, window.$$FirebaseDataConfig)\n if (configChanged) {\n window.$$FirebaseDataConfig = config\n if (window.$$FirebaseDataInstance)\n window.$$FirebaseDataInstance.delete()\n }\n } else window.$$FirebaseDataConfig = config\n\n if (!window.$$FirebaseDataInstance || configChanged)\n window.$$FirebaseDataInstance = firebase_app__WEBPACK_IMPORTED_MODULE_1__[\"initializeApp\"](config)\n\n return window.$$FirebaseDataInstance\n }\n\n // The Firebase app object\n // https://firebase.google.com/docs/reference/js/firebase.app.App\n const app = initializeApp(config)\n\n // The actual database object\n // https://firebase.google.com/docs/reference/js/firebase.database.Database\n const database = app.database()\n\n // The root ref of the database (top-level)\n // https://firebase.google.com/docs/reference/js/firebase.database.Reference\n const rootRef = database.ref()\n\n // Returns the value of a certain ref in the database\n const getRef = ref =>\n new Promise((resolve, reject) => {\n database.ref(ref).once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n // Returns the value of the root ref\n const getRootRef = () =>\n new Promise((resolve, reject) => {\n rootRef.once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n return { app, database, getRootRef, getRef }\n}", "function FirebaseApp(config) {\n // Re-uses app instance and config object if they exist\n // Otherwise creates new instance and stores it on window\n const initializeApp = config => {\n let configChanged = false\n\n // checks to see if config has changed\n if (window.$$FirebaseDataConfig) {\n configChanged = !objCompare(config, window.$$FirebaseDataConfig)\n if (configChanged) {\n window.$$FirebaseDataConfig = config\n if (window.$$FirebaseDataInstance)\n window.$$FirebaseDataInstance.delete()\n }\n } else window.$$FirebaseDataConfig = config\n\n if (!window.$$FirebaseDataInstance || configChanged)\n window.$$FirebaseDataInstance = firebase.initializeApp(config)\n\n return window.$$FirebaseDataInstance\n }\n\n // The Firebase app object\n // https://firebase.google.com/docs/reference/js/firebase.app.App\n const app = initializeApp(config)\n\n // The actual database object\n // https://firebase.google.com/docs/reference/js/firebase.database.Database\n const database = app.database()\n\n // The root ref of the database (top-level)\n // https://firebase.google.com/docs/reference/js/firebase.database.Reference\n const rootRef = database.ref()\n\n // Returns the value of a certain ref in the database\n const getRef = ref =>\n new Promise((resolve, reject) => {\n database.ref(ref).once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n // Returns the value of the root ref\n const getRootRef = () =>\n new Promise((resolve, reject) => {\n rootRef.once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n return { app, database, getRootRef, getRef }\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "static db() {\n return firebase.firestore();\n }", "function FirebaseApp(config) {\n // Re-uses app instance and config object if they exist\n // Otherwise creates new instance and stores it on window\n const initializeApp = config => {\n let configChanged = false\n // Helper function for comparing config objects\n const objCompare = (obj1, obj2) =>\n Object.keys(obj1).length === Object.keys(obj2).length &&\n Object.keys(obj1).every(\n key => obj2.hasOwnProperty(key) && obj1[key] === obj2[key]\n )\n\n // checks to see if config has changed\n if (window.$$FirebaseDataConfig) {\n configChanged = !objCompare(config, window.$$FirebaseDataConfig)\n if (configChanged) {\n window.$$FirebaseDataConfig = config\n if (window.$$FirebaseDataInstance)\n window.$$FirebaseDataInstance.delete()\n }\n } else window.$$FirebaseDataConfig = config\n\n if (!window.$$FirebaseDataInstance || configChanged)\n window.$$FirebaseDataInstance = firebase_app__WEBPACK_IMPORTED_MODULE_1__[\"initializeApp\"](config)\n\n return window.$$FirebaseDataInstance\n }\n\n // The Firebase app object\n // https://firebase.google.com/docs/reference/js/firebase.app.App\n const app = initializeApp(config)\n\n // The actual database object\n // https://firebase.google.com/docs/reference/js/firebase.database.Database\n const database = app.database()\n\n // The root ref of the database (top-level)\n // https://firebase.google.com/docs/reference/js/firebase.database.Reference\n const rootRef = database.ref()\n\n // Returns the value of a certain ref in the database\n const getRef = ref =>\n new Promise((resolve, reject) => {\n database.ref(ref).once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n // Returns the value of the root ref\n const getRootRef = () =>\n new Promise((resolve, reject) => {\n rootRef.once(\"value\", snapshot => {\n resolve(snapshot.val())\n })\n })\n\n return { app, database, getRootRef, getRef }\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"a\" /* Firestore */](app); }, Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"f\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function initializeFirebase() {\n firebase.initializeApp(getFirebaseConfig(inProduction()));\n}", "get namespaceLookup() {\n return this.cache.getOrAdd('namespaceLookup', () => this.buildNamespaceLookup());\n }", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) {\n return new Firestore(app);\n }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "get namespace() {\n return this._namespace\n }", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "function stubFirebase() {\n\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n\n var originalSet = _firebase['default'].prototype.set;\n var originalUpdate = _firebase['default'].prototype.update;\n var originalRemove = _firebase['default'].prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].prototype.set = originalSet;\n _firebase['default'].prototype.update = originalUpdate;\n _firebase['default'].prototype.remove = originalRemove;\n };\n\n _firebase['default'].prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function configureForFirebase(firebase$$1){firebase$$1.INTERNAL.registerService('firestore',function(app){return new index_esm_Firestore(app);},shallowCopy(firestoreNamespace));}", "function firebaseInit()\n{\n var firebaseConfig = {\n\tapiKey: \"AIzaSyDz4KVH1_aoVs0tcofy1cxHkI05AIP0PCY\",\n\tauthDomain: \"robox-3666f.firebaseapp.com\",\n\tdatabaseURL: \"https://robox-3666f.firebaseio.com\",\n\tprojectId: \"robox-3666f\",\n\tstorageBucket: \"robox-3666f.appspot.com\",\n\tmessagingSenderId: \"356472837055\",\n\tappId: \"1:356472837055:web:3491df60bef9212534470a\"\n };\n\n firebase.initializeApp(firebaseConfig);\n}", "function namespace(b){var g=b.split(\".\"),d=window,a=\"\";for(var c=0,f=g.length;c<f;c++){a=g[c];d[a]=d[a]||{};d=d[a]}return d}", "function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.", "static createConection() {\n try {\n //if (this._db && this._storageFirebase && this._auth) {\n if (this._auth) { \n return Firebase.getConection();\n }\n\n // initialize firebase\n// admin.initializeApp({\n// credential: admin.credential.cert(serviceAccount),\n// apiKey: SDK_Firebase.apiKey,\n// projectId: SDK_Firebase.projectId,\n// storageBucket: SDK_Firebase.storageBucket\n// });\n console.log(\"llamo a admin.initializeApp()\");\n admin.initializeApp({\n credential: admin.credential.cert(serviceAccount),\n });\n\n const settings = { timestampsInSnapshots: true };\n admin.firestore().settings(settings);\n\n // fireStore DB\n this._db = admin.firestore();\n\n // auth object\n this._auth = admin.auth();\n\n return {\n auth: this._auth\n };\n } catch (e) {\n throw customError(\"Error Firebase\", \"createConection\", 500, e);\n }\n }", "function registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) {\n return __WEBPACK_IMPORTED_MODULE_5__src_core_RepoManager__[\"a\" /* RepoManager */].getInstance().databaseFromApp(app, url);\n },\n // firebase.database namespace properties\n {\n Reference: __WEBPACK_IMPORTED_MODULE_3__src_api_Reference__[\"a\" /* Reference */],\n Query: __WEBPACK_IMPORTED_MODULE_2__src_api_Query__[\"a\" /* Query */],\n Database: __WEBPACK_IMPORTED_MODULE_1__src_api_Database__[\"a\" /* Database */],\n enableLogging: __WEBPACK_IMPORTED_MODULE_4__src_core_util_util__[\"a\" /* enableLogging */],\n INTERNAL: __WEBPACK_IMPORTED_MODULE_6__src_api_internal__,\n ServerValue: __WEBPACK_IMPORTED_MODULE_1__src_api_Database__[\"a\" /* Database */].ServerValue,\n TEST_ACCESS: __WEBPACK_IMPORTED_MODULE_7__src_api_test_access__\n }, null, true);\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__firebase_util__[\"a\" /* isNodeSdk */])()) {\n module.exports = namespace;\n }\n}", "function firebaseInit() {\n if (!$window.firebase.apps.length) {\n var firebaseConfig = {\n apiKey: 'AIzaSyBGm_Gwo7zUW3TjAKkVoODZ6g6n4Jx6z9w',\n authDomain: 'flh-pvstation.firebaseapp.com',\n databaseURL: 'https://flh-pvstation.firebaseio.com',\n storageBucket: 'flh-pvstation.appspot.com'\n };\n $window.firebase.initializeApp(firebaseConfig);\n }\n }", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\n var app = container.getProvider('app').getImmediate();\n return new Firestore(app, container.getProvider('auth-internal'));\n }, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(shallowCopy(firestoreNamespace)));\n }", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\r\n var app = container.getProvider('app').getImmediate();\r\n return new Firestore(app, container.getProvider('auth-internal'));\r\n }, \"PUBLIC\" /* PUBLIC */).setServiceProps(shallowCopy(firestoreNamespace)));\r\n}", "function _getAngularFireDatabase(app) {\n return new __WEBPACK_IMPORTED_MODULE_3__database__[\"a\" /* AngularFireDatabase */](app);\n}", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n var originalSet = _firebase['default'].database.Reference.prototype.set;\n var originalUpdate = _firebase['default'].database.Reference.prototype.update;\n var originalRemove = _firebase['default'].database.Reference.prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].database.Reference.prototype.set = originalSet;\n _firebase['default'].database.Reference.prototype.update = originalUpdate;\n _firebase['default'].database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase['default'].database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n var originalSet = _firebase['default'].database.Reference.prototype.set;\n var originalUpdate = _firebase['default'].database.Reference.prototype.update;\n var originalRemove = _firebase['default'].database.Reference.prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].database.Reference.prototype.set = originalSet;\n _firebase['default'].database.Reference.prototype.update = originalUpdate;\n _firebase['default'].database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase['default'].database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }", "function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }", "function FirebaseAuthService(firebase) {\n this._firebase = firebase;\n }", "function initializeFirebase(){\n var config = {\n apiKey: \"AIzaSyAg4AuCkuiw4VgVIYtFKU4JQgF0PzfzlTA\",\n authDomain: \"memoize-216516.firebaseapp.com\",\n databaseURL: \"https://memoize-216516.firebaseio.com\",\n projectId: \"memoize-216516\",\n storageBucket: \"memoize-216516.appspot.com\",\n messagingSenderId: \"889544015679\"\n };\n firebase.initializeApp(config);\n \n\n var db = firebase.firestore();\n var storage = firebase.storage();\n return [db,storage];\n\n}", "static getConfig() {\n return {\n apiKey: Firebase.apiKey,\n appId: Firebase.appId,\n authDomain: Firebase.authDomain,\n databaseURL: Firebase.databaseURL,\n projectId: Firebase.projectId,\n messagingSenderId: Firebase.messagingSenderId,\n };\n }", "function initialize_firebase() {\n // Initialize Firebase\n\n firebase.initializeApp(firebase_configuration);\n firebase_ref = firebase;\n firebase_database = firebase.database();\n firebase_authentication = firebase.auth();\n firebase_storage = firebase.storage();\n console.log(\"Firebase Initialized\");\n\n // Setup authentiation state change action\n firebase_authentication.onAuthStateChanged(on_authentication_state_changed);\n\n // Setup sign-in Page\n setup_sign_in_controls();\n}", "function firebase_setup(){\n /*\n var firebaseConfig = {\n apiKey: \"AIzaSyB0ZY93KxJK4UIRVnyXWqNm2V1l1M-4j_4\",\n authDomain: \"office-inventory-12f99.firebaseapp.com\",\n databaseURL: \"https://office-inventory-12f99.firebaseio.com\",\n projectId: \"office-inventory-12f99\",\n storageBucket: \"office-inventory-12f99.appspot.com\",\n messagingSenderId: \"147848186588\",\n appId: \"1:147848186588:web:33dbc8d727af1de4\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n db = firebase.firestore();\n */\n}", "function getLogger() {\n if (logger) return logger;\n var ccLogger = ccHandler(serializer);\n logger = new logger$1.Logger('@firebase/performance/cc');\n logger.logHandler = ccLogger;\n return logger;\n}", "function getLogger() {\r\n if (logger) {\r\n return logger;\r\n }\r\n var ccLogger = ccHandler(serializer);\r\n logger = new logger$1.Logger('@firebase/performance/cc');\r\n logger.logHandler = ccLogger;\r\n return logger;\r\n}", "function firebaseConfigModule(firebase){\n\n //firebase cfg\n const config = {\n apiKey: \"AIzaSyC0G_puVkQgwqL1wICl4TuQigccVJ2u7xw\",\n authDomain: \"scakapo-2f1c6.firebaseapp.com\",\n databaseURL: \"https://scakapo-2f1c6.firebaseio.com\",\n storageBucket: \"scakapo-2f1c6.appspot.com\",\n messagingSenderId: \"656327460988\"\n };\n\n //init firebase app\n firebase.initializeApp(config);\n}", "function getTTT(){\n //ref equates to the Firebase database\n var ref = new Firebase(\"https://tic-tac-toe-sfs.firebaseio.com\");\n //ttt refers itself to the firebase object\n var ttt = $firebaseObject(ref);\n return ttt;\n }", "getNamespace(name, containingNamespace) {\n const nameLower = name === null || name === void 0 ? void 0 : name.toLowerCase();\n const lookup = this.namespaceLookup;\n let ns;\n if (containingNamespace) {\n ns = lookup.get(`${containingNamespace === null || containingNamespace === void 0 ? void 0 : containingNamespace.toLowerCase()}.${nameLower}`);\n }\n //if we couldn't find the namespace by its full namespaced name, look for a global version\n if (!ns) {\n ns = lookup.get(nameLower);\n }\n return ns;\n }", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase.default._unStub) {\n var originalSet = _firebase.default.database.Reference.prototype.set;\n var originalUpdate = _firebase.default.database.Reference.prototype.update;\n var originalRemove = _firebase.default.database.Reference.prototype.remove;\n\n _firebase.default._unStub = function () {\n _firebase.default.database.Reference.prototype.set = originalSet;\n _firebase.default.database.Reference.prototype.update = originalUpdate;\n _firebase.default.database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase.default.database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase.default.database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase.default.database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function registerFirestore(instance){configureForFirebase(instance);}", "function getNamespace (namespace) {\n let namespaces = namespace.split(\".\");\n let parent = chrome;\n for (let name of namespaces) {\n parent[name] = parent[name] || createObjectIn(unsafeWindow);\n parent = parent[name];\n }\n return parent;\n}", "function registerFirestore(instance) {\n Object(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function getNamespace() {\n\tvar ns = '';\n\tvar fileExists = fs.existsSync(path.dirname(require.main.filename) + '/package.json');\n\tif(fileExists) {\n\t\tvar projectName = require(path.dirname(require.main.filename) + '/package.json').name;\n\t\tif(projectName.indexOf('-') !== -1) {\n\t\t\tvar splitName = projectName.split('-');\n\t\t\tvar len = splitName.length >= 3 ? 3 : splitName.length;\n\t\t\tfor(var i = 0; i < len; i++) {\n\t\t\t\t\tns += splitName[i][0];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tns = projectName.slice(0, 3);\n\t\t}\n\t}\n\telse {\n\t\tns = 'app'\n\t}\n\treturn ns.toUpperCase();\n}", "function Auth_GetUser() {\n return firebase.auth().currentUser;\n}", "static hd() {\n return firebase.storage();\n }", "static getFirebaseAppData(firebaseApp,googleUserId){\n //console.log('FirebaseUtil.util:getFirebaseAppData:');\n var result = null;\n //\n const firebaseDB = firebaseApp.database();\n const loggedInUserDB_path_paid = 'paid/'+googleUserId;\n const loggedInUserDB_path_received = 'received/'+googleUserId;\n const dbRefPaid = firebaseDB.ref(loggedInUserDB_path_paid);\n const dbRefReceived = firebaseDB.ref(loggedInUserDB_path_received)\n //console.log(loggedInUserDB_path_paid,':',dbRefPaid);\n //console.log(loggedInUserDB_path_received,':',dbRefReceived);\n var result = {\n dbRefPaid:{ \n path:loggedInUserDB_path_paid,\n db:dbRefPaid\n },\n dbRefReceived:{\n path:loggedInUserDB_path_received,\n db:dbRefReceived\n },\n }\n //\n return result\n }", "function getFirebaseRef(path){\n\n return firebase.database().ref(path);\n}", "get UseGlobal() {}", "constructor() {\n app.initializeApp(config);\n this.appAuth = app.auth();\n this.googleProvider = new firebase.auth.GoogleAuthProvider();\n this.db = firebase.firestore();\n this.functions = firebase.functions();\n this.rdb = firebase.database().ref(); //Real time database\n }", "function initializeFirebase() {\n const firebaseConfig = {\n apiKey: \"AIzaSyD1DP3Fg9S8UEKKpyt7XknY6vickoJ3eFs\",\n authDomain: \"instyle-3f5f5.firebaseapp.com\",\n databaseURL:\n \"https://instyle-3f5f5-default-rtdb.europe-west1.firebasedatabase.app\",\n projectId: \"instyle-3f5f5\",\n storageBucket: \"instyle-3f5f5.appspot.com\",\n messagingSenderId: \"8399215605\",\n appId: \"1:8399215605:web:09ba5877b522ef0abe5ebc\",\n };\n //initialize firebase\n if (firebase.apps.length === 0) {\n firebase.initializeApp(firebaseConfig);\n }\n }", "function namespace(ns) {\n 'use strict';\n \n if (namespaces.indexOf(ns) === -1) {\n var segments = ns.split(\".\").reverse(),\n /*\n Inner recursive function to add a new object if not defined\n */\n createSegment = function (segments, currentSegment) {\n if (segments.length === 0) {\n return;\n }\n var segment = segments.pop();\n // prevent overwriting of existing segment\n if(currentSegment[segment] === undefined) {\n currentSegment[segment] = {};\n }\n createSegment(segments, currentSegment[segment]);\n };\n namespaces.push(ns);\n createSegment(segments, window);\n }\n}", "function initFirebase () {\n firebase.initializeApp(firebaseConfig);\n return new Promise((resolve, reject) => {\n firebase.firestore().enablePersistence()\n .then(resolve)\n .catch(err => {\n if (err.code === 'failed-precondition') {\n reject(err)\n // Multiple tabs open, persistence can only be\n // enabled in one tab at a a time.\n } else if (err.code === 'unimplemented') {\n reject(err)\n // The current browser does not support all of\n // the features required to enable persistence\n }\n })\n })\n}", "function resolveGlobalNamespace(s) {\n s = s.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n s = s.replace(/^\\./, ''); // strip a leading dot\n var a = s.split('.');\n var o = window;\n for (var i = 0, n = a.length; i < n; ++i) {\n var k = a[i];\n if (k in o) {\n o = o[k];\n } else {\n return;\n }\n }\n return o;\n }", "static getAuth() {\n try {\n return firebase.auth().currentUser;\n } catch(err) {\n return null;\n }\n }", "function mockFirebaseService() {\n\treturn new Promise(resolve => resolve(true));\n }", "function startFirebase() {\n// Initialize Firebase\n var config = {\n apiKey: \"AIzaSyDAraVHUUUkR4L0yNE3P2n2jiF2jTNy6Kg\",\n authDomain: \"rps-multiplayer-e8125.firebaseapp.com\",\n databaseURL: \"https://rps-multiplayer-e8125.firebaseio.com\",\n projectId: \"rps-multiplayer-e8125\",\n storageBucket: \"rps-multiplayer-e8125.appspot.com\",\n messagingSenderId: \"763015821378\"\n };\n\n firebase.initializeApp(config);\n\n}", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "static getInstance(){\n firebaseContainer.getInstance().justStart();\n if (this._managePart == null){\n this._managePart = new CommunityModelManage();\n }\n return this._managePart;\n }", "static signOut() {\n if (!isInitialized)\n throw new Error('Firebase service is not initialized. Call FirebaseServices.initialize() to initialize it prior to calling any other service methods.');\n\n return firebase.auth().signOut();\n }", "function namespace(name) {\n var Cache = name ? CacheBase.namespace(name) : CacheBase;\n var fns = [];\n /**\n * Create an instance of `Base` with the given `config` and `options`.\n *\n * ```js\n * // initialize with `config` and `options`\n * var app = new Base({isApp: true}, {abc: true});\n * app.set('foo', 'bar');\n *\n * // values defined with the given `config` object will be on the root of the instance\n * console.log(app.baz); //=> undefined\n * console.log(app.foo); //=> 'bar'\n * // or use `.get`\n * console.log(app.get('isApp')); //=> true\n * console.log(app.get('foo')); //=> 'bar'\n *\n * // values defined with the given `options` object will be on `app.options\n * console.log(app.options.abc); //=> true\n * ```\n *\n * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.\n * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.\n * @api public\n */\n\n function Base(config, options) {\n if (!(this instanceof Base)) {\n return new Base(config, options);\n }\n\n Cache.call(this, config);\n this.is('base');\n this.initBase(config, options);\n }\n /**\n * Inherit cache-base\n */\n\n\n util.inherits(Base, Cache);\n /**\n * Add static emitter methods\n */\n\n Emitter(Base);\n /**\n * Initialize `Base` defaults with the given `config` object\n */\n\n Base.prototype.initBase = function (config, options) {\n this.options = merge({}, this.options, options);\n this.cache = this.cache || {};\n this.define('registered', {});\n if (name) this[name] = {}; // make `app._callbacks` non-enumerable\n\n this.define('_callbacks', this._callbacks);\n\n if (isObject(config)) {\n this.visit('set', config);\n }\n\n Base.run(this, 'use', fns);\n };\n /**\n * Set the given `name` on `app._name` and `app.is*` properties. Used for doing\n * lookups in plugins.\n *\n * ```js\n * app.is('foo');\n * console.log(app._name);\n * //=> 'foo'\n * console.log(app.isFoo);\n * //=> true\n * app.is('bar');\n * console.log(app.isFoo);\n * //=> true\n * console.log(app.isBar);\n * //=> true\n * console.log(app._name);\n * //=> 'bar'\n * ```\n * @name .is\n * @param {String} `name`\n * @return {Boolean}\n * @api public\n */\n\n\n Base.prototype.is = function (name) {\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string');\n }\n\n this.define('is' + pascal(name), true);\n this.define('_name', name);\n this.define('_appname', name);\n return this;\n };\n /**\n * Returns true if a plugin has already been registered on an instance.\n *\n * Plugin implementors are encouraged to use this first thing in a plugin\n * to prevent the plugin from being called more than once on the same\n * instance.\n *\n * ```js\n * var base = new Base();\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin')) return;\n * // do stuff to `app`\n * });\n *\n * // to also record the plugin as being registered\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin', true)) return;\n * // do stuff to `app`\n * });\n * ```\n * @name .isRegistered\n * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.\n * @param {String} `name` The plugin name.\n * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.\n * @return {Boolean} Returns true if a plugin is already registered.\n * @api public\n */\n\n\n Base.prototype.isRegistered = function (name, register) {\n if (this.registered.hasOwnProperty(name)) {\n return true;\n }\n\n if (register !== false) {\n this.registered[name] = true;\n this.emit('plugin', name);\n }\n\n return false;\n };\n /**\n * Define a plugin function to be called immediately upon init. Plugins are chainable\n * and expose the following arguments to the plugin function:\n *\n * - `app`: the current instance of `Base`\n * - `base`: the [first ancestor instance](#base) of `Base`\n *\n * ```js\n * var app = new Base()\n * .use(foo)\n * .use(bar)\n * .use(baz)\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @return {Object} Returns the item instance for chaining.\n * @api public\n */\n\n\n Base.prototype.use = function (fn) {\n fn.call(this, this);\n return this;\n };\n /**\n * The `.define` method is used for adding non-enumerable property on the instance.\n * Dot-notation is **not supported** with `define`.\n *\n * ```js\n * // arbitrary `render` function using lodash `template`\n * app.define('render', function(str, locals) {\n * return _.template(str)(locals);\n * });\n * ```\n * @name .define\n * @param {String} `key` The name of the property to define.\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n\n Base.prototype.define = function (key, val) {\n if (isObject(key)) {\n return this.visit('define', key);\n }\n\n define(this, key, val);\n return this;\n };\n /**\n * Mix property `key` onto the Base prototype. If base is inherited using\n * `Base.extend` this method will be overridden by a new `mixin` method that will\n * only add properties to the prototype of the inheriting application.\n *\n * ```js\n * app.mixin('foo', function() {\n * // do stuff\n * });\n * ```\n * @name .mixin\n * @param {String} `key`\n * @param {Object|Array} `val`\n * @return {Object} Returns the `base` instance for chaining.\n * @api public\n */\n\n\n Base.prototype.mixin = function (key, val) {\n Base.prototype[key] = val;\n return this;\n };\n /**\n * Non-enumberable mixin array, used by the static [Base.mixin]() method.\n */\n\n\n Base.prototype.mixins = Base.prototype.mixins || [];\n /**\n * Getter/setter used when creating nested instances of `Base`, for storing a reference\n * to the first ancestor instance. This works by setting an instance of `Base` on the `parent`\n * property of a \"child\" instance. The `base` property defaults to the current instance if\n * no `parent` property is defined.\n *\n * ```js\n * // create an instance of `Base`, this is our first (\"base\") instance\n * var first = new Base();\n * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later\n *\n * // create another instance\n * var second = new Base();\n * // create a reference to the first instance (`first`)\n * second.parent = first;\n *\n * // create another instance\n * var third = new Base();\n * // create a reference to the previous instance (`second`)\n * // repeat this pattern every time a \"child\" instance is created\n * third.parent = second;\n *\n * // we can always access the first instance using the `base` property\n * console.log(first.base.foo);\n * //=> 'bar'\n * console.log(second.base.foo);\n * //=> 'bar'\n * console.log(third.base.foo);\n * //=> 'bar'\n * // and now you know how to get to third base ;)\n * ```\n * @name .base\n * @api public\n */\n\n Object.defineProperty(Base.prototype, 'base', {\n configurable: true,\n get: function get() {\n return this.parent ? this.parent.base : this;\n }\n });\n /**\n * Static method for adding global plugin functions that will\n * be added to an instance when created.\n *\n * ```js\n * Base.use(function(app) {\n * app.foo = 'bar';\n * });\n * var app = new Base();\n * console.log(app.foo);\n * //=> 'bar'\n * ```\n * @name #use\n * @param {Function} `fn` Plugin function to use on each instance.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'use', function (fn) {\n fns.push(fn);\n return Base;\n });\n /**\n * Run an array of functions by passing each function\n * to a method on the given object specified by the given property.\n *\n * @param {Object} `obj` Object containing method to use.\n * @param {String} `prop` Name of the method on the object to use.\n * @param {Array} `arr` Array of functions to pass to the method.\n */\n\n define(Base, 'run', function (obj, prop, arr) {\n var len = arr.length,\n i = 0;\n\n while (len--) {\n obj[prop](arr[i++]);\n }\n\n return Base;\n });\n /**\n * Static method for inheriting the prototype and static methods of the `Base` class.\n * This method greatly simplifies the process of creating inheritance-based applications.\n * See [static-extend][] for more details.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @name #extend\n * @param {Function} `Ctor` constructor to extend\n * @param {Object} `methods` Optional prototype properties to mix in.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'extend', cu.extend(Base, function (Ctor, Parent) {\n Ctor.prototype.mixins = Ctor.prototype.mixins || [];\n define(Ctor, 'mixin', function (fn) {\n var mixin = fn(Ctor.prototype, Ctor);\n\n if (typeof mixin === 'function') {\n Ctor.prototype.mixins.push(mixin);\n }\n\n return Ctor;\n });\n define(Ctor, 'mixins', function (Child) {\n Base.run(Child, 'mixin', Ctor.prototype.mixins);\n return Ctor;\n });\n\n Ctor.prototype.mixin = function (key, value) {\n Ctor.prototype[key] = value;\n return this;\n };\n\n return Base;\n }));\n /**\n * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.\n * When a mixin function returns a function, the returned function is pushed onto the `.mixins`\n * array, making it available to be used on inheriting classes whenever `Base.mixins()` is\n * called (e.g. `Base.mixins(Child)`).\n *\n * ```js\n * Base.mixin(function(proto) {\n * proto.foo = function(msg) {\n * return 'foo ' + msg;\n * };\n * });\n * ```\n * @name #mixin\n * @param {Function} `fn` Function to call\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixin', function (fn) {\n var mixin = fn(Base.prototype, Base);\n\n if (typeof mixin === 'function') {\n Base.prototype.mixins.push(mixin);\n }\n\n return Base;\n });\n /**\n * Static method for running global mixin functions against a child constructor.\n * Mixins must be registered before calling this method.\n *\n * ```js\n * Base.extend(Child);\n * Base.mixins(Child);\n * ```\n * @name #mixins\n * @param {Function} `Child` Constructor function of a child class\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixins', function (Child) {\n Base.run(Child, 'mixin', Base.prototype.mixins);\n return Base;\n });\n /**\n * Similar to `util.inherit`, but copies all static properties, prototype properties, and\n * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.\n *\n * ```js\n * Base.inherit(Foo, Bar);\n * ```\n * @name #inherit\n * @param {Function} `Receiver` Receiving (child) constructor\n * @param {Function} `Provider` Providing (parent) constructor\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'inherit', cu.inherit);\n define(Base, 'bubble', cu.bubble);\n return Base;\n}", "function namespace(name) {\n var Cache = name ? CacheBase.namespace(name) : CacheBase;\n var fns = [];\n /**\n * Create an instance of `Base` with the given `config` and `options`.\n *\n * ```js\n * // initialize with `config` and `options`\n * var app = new Base({isApp: true}, {abc: true});\n * app.set('foo', 'bar');\n *\n * // values defined with the given `config` object will be on the root of the instance\n * console.log(app.baz); //=> undefined\n * console.log(app.foo); //=> 'bar'\n * // or use `.get`\n * console.log(app.get('isApp')); //=> true\n * console.log(app.get('foo')); //=> 'bar'\n *\n * // values defined with the given `options` object will be on `app.options\n * console.log(app.options.abc); //=> true\n * ```\n *\n * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.\n * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.\n * @api public\n */\n\n function Base(config, options) {\n if (!(this instanceof Base)) {\n return new Base(config, options);\n }\n\n Cache.call(this, config);\n this.is('base');\n this.initBase(config, options);\n }\n /**\n * Inherit cache-base\n */\n\n\n util.inherits(Base, Cache);\n /**\n * Add static emitter methods\n */\n\n Emitter(Base);\n /**\n * Initialize `Base` defaults with the given `config` object\n */\n\n Base.prototype.initBase = function (config, options) {\n this.options = merge({}, this.options, options);\n this.cache = this.cache || {};\n this.define('registered', {});\n if (name) this[name] = {}; // make `app._callbacks` non-enumerable\n\n this.define('_callbacks', this._callbacks);\n\n if (isObject(config)) {\n this.visit('set', config);\n }\n\n Base.run(this, 'use', fns);\n };\n /**\n * Set the given `name` on `app._name` and `app.is*` properties. Used for doing\n * lookups in plugins.\n *\n * ```js\n * app.is('foo');\n * console.log(app._name);\n * //=> 'foo'\n * console.log(app.isFoo);\n * //=> true\n * app.is('bar');\n * console.log(app.isFoo);\n * //=> true\n * console.log(app.isBar);\n * //=> true\n * console.log(app._name);\n * //=> 'bar'\n * ```\n * @name .is\n * @param {String} `name`\n * @return {Boolean}\n * @api public\n */\n\n\n Base.prototype.is = function (name) {\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string');\n }\n\n this.define('is' + pascal(name), true);\n this.define('_name', name);\n this.define('_appname', name);\n return this;\n };\n /**\n * Returns true if a plugin has already been registered on an instance.\n *\n * Plugin implementors are encouraged to use this first thing in a plugin\n * to prevent the plugin from being called more than once on the same\n * instance.\n *\n * ```js\n * var base = new Base();\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin')) return;\n * // do stuff to `app`\n * });\n *\n * // to also record the plugin as being registered\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin', true)) return;\n * // do stuff to `app`\n * });\n * ```\n * @name .isRegistered\n * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.\n * @param {String} `name` The plugin name.\n * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.\n * @return {Boolean} Returns true if a plugin is already registered.\n * @api public\n */\n\n\n Base.prototype.isRegistered = function (name, register) {\n if (this.registered.hasOwnProperty(name)) {\n return true;\n }\n\n if (register !== false) {\n this.registered[name] = true;\n this.emit('plugin', name);\n }\n\n return false;\n };\n /**\n * Define a plugin function to be called immediately upon init. Plugins are chainable\n * and expose the following arguments to the plugin function:\n *\n * - `app`: the current instance of `Base`\n * - `base`: the [first ancestor instance](#base) of `Base`\n *\n * ```js\n * var app = new Base()\n * .use(foo)\n * .use(bar)\n * .use(baz)\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @return {Object} Returns the item instance for chaining.\n * @api public\n */\n\n\n Base.prototype.use = function (fn) {\n fn.call(this, this);\n return this;\n };\n /**\n * The `.define` method is used for adding non-enumerable property on the instance.\n * Dot-notation is **not supported** with `define`.\n *\n * ```js\n * // arbitrary `render` function using lodash `template`\n * app.define('render', function(str, locals) {\n * return _.template(str)(locals);\n * });\n * ```\n * @name .define\n * @param {String} `key` The name of the property to define.\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n\n Base.prototype.define = function (key, val) {\n if (isObject(key)) {\n return this.visit('define', key);\n }\n\n define(this, key, val);\n return this;\n };\n /**\n * Mix property `key` onto the Base prototype. If base is inherited using\n * `Base.extend` this method will be overridden by a new `mixin` method that will\n * only add properties to the prototype of the inheriting application.\n *\n * ```js\n * app.mixin('foo', function() {\n * // do stuff\n * });\n * ```\n * @name .mixin\n * @param {String} `key`\n * @param {Object|Array} `val`\n * @return {Object} Returns the `base` instance for chaining.\n * @api public\n */\n\n\n Base.prototype.mixin = function (key, val) {\n Base.prototype[key] = val;\n return this;\n };\n /**\n * Non-enumberable mixin array, used by the static [Base.mixin]() method.\n */\n\n\n Base.prototype.mixins = Base.prototype.mixins || [];\n /**\n * Getter/setter used when creating nested instances of `Base`, for storing a reference\n * to the first ancestor instance. This works by setting an instance of `Base` on the `parent`\n * property of a \"child\" instance. The `base` property defaults to the current instance if\n * no `parent` property is defined.\n *\n * ```js\n * // create an instance of `Base`, this is our first (\"base\") instance\n * var first = new Base();\n * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later\n *\n * // create another instance\n * var second = new Base();\n * // create a reference to the first instance (`first`)\n * second.parent = first;\n *\n * // create another instance\n * var third = new Base();\n * // create a reference to the previous instance (`second`)\n * // repeat this pattern every time a \"child\" instance is created\n * third.parent = second;\n *\n * // we can always access the first instance using the `base` property\n * console.log(first.base.foo);\n * //=> 'bar'\n * console.log(second.base.foo);\n * //=> 'bar'\n * console.log(third.base.foo);\n * //=> 'bar'\n * // and now you know how to get to third base ;)\n * ```\n * @name .base\n * @api public\n */\n\n Object.defineProperty(Base.prototype, 'base', {\n configurable: true,\n get: function () {\n return this.parent ? this.parent.base : this;\n }\n });\n /**\n * Static method for adding global plugin functions that will\n * be added to an instance when created.\n *\n * ```js\n * Base.use(function(app) {\n * app.foo = 'bar';\n * });\n * var app = new Base();\n * console.log(app.foo);\n * //=> 'bar'\n * ```\n * @name #use\n * @param {Function} `fn` Plugin function to use on each instance.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'use', function (fn) {\n fns.push(fn);\n return Base;\n });\n /**\n * Run an array of functions by passing each function\n * to a method on the given object specified by the given property.\n *\n * @param {Object} `obj` Object containing method to use.\n * @param {String} `prop` Name of the method on the object to use.\n * @param {Array} `arr` Array of functions to pass to the method.\n */\n\n define(Base, 'run', function (obj, prop, arr) {\n var len = arr.length,\n i = 0;\n\n while (len--) {\n obj[prop](arr[i++]);\n }\n\n return Base;\n });\n /**\n * Static method for inheriting the prototype and static methods of the `Base` class.\n * This method greatly simplifies the process of creating inheritance-based applications.\n * See [static-extend][] for more details.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @name #extend\n * @param {Function} `Ctor` constructor to extend\n * @param {Object} `methods` Optional prototype properties to mix in.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'extend', cu.extend(Base, function (Ctor, Parent) {\n Ctor.prototype.mixins = Ctor.prototype.mixins || [];\n define(Ctor, 'mixin', function (fn) {\n var mixin = fn(Ctor.prototype, Ctor);\n\n if (typeof mixin === 'function') {\n Ctor.prototype.mixins.push(mixin);\n }\n\n return Ctor;\n });\n define(Ctor, 'mixins', function (Child) {\n Base.run(Child, 'mixin', Ctor.prototype.mixins);\n return Ctor;\n });\n\n Ctor.prototype.mixin = function (key, value) {\n Ctor.prototype[key] = value;\n return this;\n };\n\n return Base;\n }));\n /**\n * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.\n * When a mixin function returns a function, the returned function is pushed onto the `.mixins`\n * array, making it available to be used on inheriting classes whenever `Base.mixins()` is\n * called (e.g. `Base.mixins(Child)`).\n *\n * ```js\n * Base.mixin(function(proto) {\n * proto.foo = function(msg) {\n * return 'foo ' + msg;\n * };\n * });\n * ```\n * @name #mixin\n * @param {Function} `fn` Function to call\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixin', function (fn) {\n var mixin = fn(Base.prototype, Base);\n\n if (typeof mixin === 'function') {\n Base.prototype.mixins.push(mixin);\n }\n\n return Base;\n });\n /**\n * Static method for running global mixin functions against a child constructor.\n * Mixins must be registered before calling this method.\n *\n * ```js\n * Base.extend(Child);\n * Base.mixins(Child);\n * ```\n * @name #mixins\n * @param {Function} `Child` Constructor function of a child class\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixins', function (Child) {\n Base.run(Child, 'mixin', Base.prototype.mixins);\n return Base;\n });\n /**\n * Similar to `util.inherit`, but copies all static properties, prototype properties, and\n * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.\n *\n * ```js\n * Base.inherit(Foo, Bar);\n * ```\n * @name #inherit\n * @param {Function} `Receiver` Receiving (child) constructor\n * @param {Function} `Provider` Providing (parent) constructor\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'inherit', cu.inherit);\n define(Base, 'bubble', cu.bubble);\n return Base;\n}", "async initFirebase(config) {\n if (!Firebase.apps || Firebase.apps.length == 0) {\n Firebase.initializeApp(config);\n }\n }", "init() {\n switch(Config.backend) {\n case \"firebase_storage\":\n this.engine = FirebaseStorage;\n break;\n }\n if (this.engine) this.engine.init();\n }", "function getFirebase(path) {\n\t \tvar deferred = $q.defer();\n\n\t \tif(path == undefined || path == null || path.length <= 0) {\n\t \t\tdeferred.resolve(new Firebase(\"https://hervoice.firebaseio.com\"));\n\t \t} else {\n\t \t\tdeferred.resolve(new Firebase(\"https://hervoice.firebaseio.com/\"+path));\n\t \t}\n\n\t \treturn deferred.promise;\n\t }", "get ns() {\n return this._ns;\n }", "function onDeviceReady() {\n firebaseApp();\n}", "function namespace(name) {\n var Cache = name ? CacheBase.namespace(name) : CacheBase;\n var fns = [];\n\n /**\n * Create an instance of `Base` with the given `config` and `options`.\n *\n * ```js\n * // initialize with `config` and `options`\n * var app = new Base({isApp: true}, {abc: true});\n * app.set('foo', 'bar');\n *\n * // values defined with the given `config` object will be on the root of the instance\n * console.log(app.baz); //=> undefined\n * console.log(app.foo); //=> 'bar'\n * // or use `.get`\n * console.log(app.get('isApp')); //=> true\n * console.log(app.get('foo')); //=> 'bar'\n *\n * // values defined with the given `options` object will be on `app.options\n * console.log(app.options.abc); //=> true\n * ```\n *\n * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.\n * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.\n * @api public\n */\n\n function Base(config, options) {\n if (!(this instanceof Base)) {\n return new Base(config, options);\n }\n Cache.call(this, config);\n this.is('base');\n this.initBase(config, options);\n }\n\n /**\n * Inherit cache-base\n */\n\n util.inherits(Base, Cache);\n\n /**\n * Add static emitter methods\n */\n\n Emitter(Base);\n\n /**\n * Initialize `Base` defaults with the given `config` object\n */\n\n Base.prototype.initBase = function(config, options) {\n this.options = merge({}, this.options, options);\n this.cache = this.cache || {};\n this.define('registered', {});\n if (name) this[name] = {};\n\n // make `app._callbacks` non-enumerable\n this.define('_callbacks', this._callbacks);\n if (isObject(config)) {\n this.visit('set', config);\n }\n Base.run(this, 'use', fns);\n };\n\n /**\n * Set the given `name` on `app._name` and `app.is*` properties. Used for doing\n * lookups in plugins.\n *\n * ```js\n * app.is('foo');\n * console.log(app._name);\n * //=> 'foo'\n * console.log(app.isFoo);\n * //=> true\n * app.is('bar');\n * console.log(app.isFoo);\n * //=> true\n * console.log(app.isBar);\n * //=> true\n * console.log(app._name);\n * //=> 'bar'\n * ```\n * @name .is\n * @param {String} `name`\n * @return {Boolean}\n * @api public\n */\n\n Base.prototype.is = function(name) {\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string');\n }\n this.define('is' + pascal(name), true);\n this.define('_name', name);\n this.define('_appname', name);\n return this;\n };\n\n /**\n * Returns true if a plugin has already been registered on an instance.\n *\n * Plugin implementors are encouraged to use this first thing in a plugin\n * to prevent the plugin from being called more than once on the same\n * instance.\n *\n * ```js\n * var base = new Base();\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin')) return;\n * // do stuff to `app`\n * });\n *\n * // to also record the plugin as being registered\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin', true)) return;\n * // do stuff to `app`\n * });\n * ```\n * @name .isRegistered\n * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.\n * @param {String} `name` The plugin name.\n * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.\n * @return {Boolean} Returns true if a plugin is already registered.\n * @api public\n */\n\n Base.prototype.isRegistered = function(name, register) {\n if (this.registered.hasOwnProperty(name)) {\n return true;\n }\n if (register !== false) {\n this.registered[name] = true;\n this.emit('plugin', name);\n }\n return false;\n };\n\n /**\n * Define a plugin function to be called immediately upon init. Plugins are chainable\n * and expose the following arguments to the plugin function:\n *\n * - `app`: the current instance of `Base`\n * - `base`: the [first ancestor instance](#base) of `Base`\n *\n * ```js\n * var app = new Base()\n * .use(foo)\n * .use(bar)\n * .use(baz)\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @return {Object} Returns the item instance for chaining.\n * @api public\n */\n\n Base.prototype.use = function(fn) {\n fn.call(this, this);\n return this;\n };\n\n /**\n * The `.define` method is used for adding non-enumerable property on the instance.\n * Dot-notation is **not supported** with `define`.\n *\n * ```js\n * // arbitrary `render` function using lodash `template`\n * app.define('render', function(str, locals) {\n * return _.template(str)(locals);\n * });\n * ```\n * @name .define\n * @param {String} `key` The name of the property to define.\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Base.prototype.define = function(key, val) {\n if (isObject(key)) {\n return this.visit('define', key);\n }\n define(this, key, val);\n return this;\n };\n\n /**\n * Mix property `key` onto the Base prototype. If base is inherited using\n * `Base.extend` this method will be overridden by a new `mixin` method that will\n * only add properties to the prototype of the inheriting application.\n *\n * ```js\n * app.mixin('foo', function() {\n * // do stuff\n * });\n * ```\n * @name .mixin\n * @param {String} `key`\n * @param {Object|Array} `val`\n * @return {Object} Returns the `base` instance for chaining.\n * @api public\n */\n\n Base.prototype.mixin = function(key, val) {\n Base.prototype[key] = val;\n return this;\n };\n\n /**\n * Non-enumberable mixin array, used by the static [Base.mixin]() method.\n */\n\n Base.prototype.mixins = Base.prototype.mixins || [];\n\n /**\n * Getter/setter used when creating nested instances of `Base`, for storing a reference\n * to the first ancestor instance. This works by setting an instance of `Base` on the `parent`\n * property of a \"child\" instance. The `base` property defaults to the current instance if\n * no `parent` property is defined.\n *\n * ```js\n * // create an instance of `Base`, this is our first (\"base\") instance\n * var first = new Base();\n * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later\n *\n * // create another instance\n * var second = new Base();\n * // create a reference to the first instance (`first`)\n * second.parent = first;\n *\n * // create another instance\n * var third = new Base();\n * // create a reference to the previous instance (`second`)\n * // repeat this pattern every time a \"child\" instance is created\n * third.parent = second;\n *\n * // we can always access the first instance using the `base` property\n * console.log(first.base.foo);\n * //=> 'bar'\n * console.log(second.base.foo);\n * //=> 'bar'\n * console.log(third.base.foo);\n * //=> 'bar'\n * // and now you know how to get to third base ;)\n * ```\n * @name .base\n * @api public\n */\n\n Object.defineProperty(Base.prototype, 'base', {\n configurable: true,\n get: function() {\n return this.parent ? this.parent.base : this;\n }\n });\n\n /**\n * Static method for adding global plugin functions that will\n * be added to an instance when created.\n *\n * ```js\n * Base.use(function(app) {\n * app.foo = 'bar';\n * });\n * var app = new Base();\n * console.log(app.foo);\n * //=> 'bar'\n * ```\n * @name #use\n * @param {Function} `fn` Plugin function to use on each instance.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'use', function(fn) {\n fns.push(fn);\n return Base;\n });\n\n /**\n * Run an array of functions by passing each function\n * to a method on the given object specified by the given property.\n *\n * @param {Object} `obj` Object containing method to use.\n * @param {String} `prop` Name of the method on the object to use.\n * @param {Array} `arr` Array of functions to pass to the method.\n */\n\n define(Base, 'run', function(obj, prop, arr) {\n var len = arr.length, i = 0;\n while (len--) {\n obj[prop](arr[i++]);\n }\n return Base;\n });\n\n /**\n * Static method for inheriting the prototype and static methods of the `Base` class.\n * This method greatly simplifies the process of creating inheritance-based applications.\n * See [static-extend][] for more details.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @name #extend\n * @param {Function} `Ctor` constructor to extend\n * @param {Object} `methods` Optional prototype properties to mix in.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {\n Ctor.prototype.mixins = Ctor.prototype.mixins || [];\n\n define(Ctor, 'mixin', function(fn) {\n var mixin = fn(Ctor.prototype, Ctor);\n if (typeof mixin === 'function') {\n Ctor.prototype.mixins.push(mixin);\n }\n return Ctor;\n });\n\n define(Ctor, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Ctor.prototype.mixins);\n return Ctor;\n });\n\n Ctor.prototype.mixin = function(key, value) {\n Ctor.prototype[key] = value;\n return this;\n };\n return Base;\n }));\n\n /**\n * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.\n * When a mixin function returns a function, the returned function is pushed onto the `.mixins`\n * array, making it available to be used on inheriting classes whenever `Base.mixins()` is\n * called (e.g. `Base.mixins(Child)`).\n *\n * ```js\n * Base.mixin(function(proto) {\n * proto.foo = function(msg) {\n * return 'foo ' + msg;\n * };\n * });\n * ```\n * @name #mixin\n * @param {Function} `fn` Function to call\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixin', function(fn) {\n var mixin = fn(Base.prototype, Base);\n if (typeof mixin === 'function') {\n Base.prototype.mixins.push(mixin);\n }\n return Base;\n });\n\n /**\n * Static method for running global mixin functions against a child constructor.\n * Mixins must be registered before calling this method.\n *\n * ```js\n * Base.extend(Child);\n * Base.mixins(Child);\n * ```\n * @name #mixins\n * @param {Function} `Child` Constructor function of a child class\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Base.prototype.mixins);\n return Base;\n });\n\n /**\n * Similar to `util.inherit`, but copies all static properties, prototype properties, and\n * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.\n *\n * ```js\n * Base.inherit(Foo, Bar);\n * ```\n * @name #inherit\n * @param {Function} `Receiver` Receiving (child) constructor\n * @param {Function} `Provider` Providing (parent) constructor\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'inherit', cu.inherit);\n define(Base, 'bubble', cu.bubble);\n return Base;\n}", "function namespace(name) {\n var Cache = name ? CacheBase.namespace(name) : CacheBase;\n var fns = [];\n\n /**\n * Create an instance of `Base` with the given `config` and `options`.\n *\n * ```js\n * // initialize with `config` and `options`\n * var app = new Base({isApp: true}, {abc: true});\n * app.set('foo', 'bar');\n *\n * // values defined with the given `config` object will be on the root of the instance\n * console.log(app.baz); //=> undefined\n * console.log(app.foo); //=> 'bar'\n * // or use `.get`\n * console.log(app.get('isApp')); //=> true\n * console.log(app.get('foo')); //=> 'bar'\n *\n * // values defined with the given `options` object will be on `app.options\n * console.log(app.options.abc); //=> true\n * ```\n *\n * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.\n * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.\n * @api public\n */\n\n function Base(config, options) {\n if (!(this instanceof Base)) {\n return new Base(config, options);\n }\n Cache.call(this, config);\n this.is('base');\n this.initBase(config, options);\n }\n\n /**\n * Inherit cache-base\n */\n\n util.inherits(Base, Cache);\n\n /**\n * Add static emitter methods\n */\n\n Emitter(Base);\n\n /**\n * Initialize `Base` defaults with the given `config` object\n */\n\n Base.prototype.initBase = function(config, options) {\n this.options = merge({}, this.options, options);\n this.cache = this.cache || {};\n this.define('registered', {});\n if (name) this[name] = {};\n\n // make `app._callbacks` non-enumerable\n this.define('_callbacks', this._callbacks);\n if (isObject(config)) {\n this.visit('set', config);\n }\n Base.run(this, 'use', fns);\n };\n\n /**\n * Set the given `name` on `app._name` and `app.is*` properties. Used for doing\n * lookups in plugins.\n *\n * ```js\n * app.is('foo');\n * console.log(app._name);\n * //=> 'foo'\n * console.log(app.isFoo);\n * //=> true\n * app.is('bar');\n * console.log(app.isFoo);\n * //=> true\n * console.log(app.isBar);\n * //=> true\n * console.log(app._name);\n * //=> 'bar'\n * ```\n * @name .is\n * @param {String} `name`\n * @return {Boolean}\n * @api public\n */\n\n Base.prototype.is = function(name) {\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string');\n }\n this.define('is' + pascal(name), true);\n this.define('_name', name);\n this.define('_appname', name);\n return this;\n };\n\n /**\n * Returns true if a plugin has already been registered on an instance.\n *\n * Plugin implementors are encouraged to use this first thing in a plugin\n * to prevent the plugin from being called more than once on the same\n * instance.\n *\n * ```js\n * var base = new Base();\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin')) return;\n * // do stuff to `app`\n * });\n *\n * // to also record the plugin as being registered\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin', true)) return;\n * // do stuff to `app`\n * });\n * ```\n * @name .isRegistered\n * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.\n * @param {String} `name` The plugin name.\n * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.\n * @return {Boolean} Returns true if a plugin is already registered.\n * @api public\n */\n\n Base.prototype.isRegistered = function(name, register) {\n if (this.registered.hasOwnProperty(name)) {\n return true;\n }\n if (register !== false) {\n this.registered[name] = true;\n this.emit('plugin', name);\n }\n return false;\n };\n\n /**\n * Define a plugin function to be called immediately upon init. Plugins are chainable\n * and expose the following arguments to the plugin function:\n *\n * - `app`: the current instance of `Base`\n * - `base`: the [first ancestor instance](#base) of `Base`\n *\n * ```js\n * var app = new Base()\n * .use(foo)\n * .use(bar)\n * .use(baz)\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @return {Object} Returns the item instance for chaining.\n * @api public\n */\n\n Base.prototype.use = function(fn) {\n fn.call(this, this);\n return this;\n };\n\n /**\n * The `.define` method is used for adding non-enumerable property on the instance.\n * Dot-notation is **not supported** with `define`.\n *\n * ```js\n * // arbitrary `render` function using lodash `template`\n * app.define('render', function(str, locals) {\n * return _.template(str)(locals);\n * });\n * ```\n * @name .define\n * @param {String} `key` The name of the property to define.\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Base.prototype.define = function(key, val) {\n if (isObject(key)) {\n return this.visit('define', key);\n }\n define(this, key, val);\n return this;\n };\n\n /**\n * Mix property `key` onto the Base prototype. If base is inherited using\n * `Base.extend` this method will be overridden by a new `mixin` method that will\n * only add properties to the prototype of the inheriting application.\n *\n * ```js\n * app.mixin('foo', function() {\n * // do stuff\n * });\n * ```\n * @name .mixin\n * @param {String} `key`\n * @param {Object|Array} `val`\n * @return {Object} Returns the `base` instance for chaining.\n * @api public\n */\n\n Base.prototype.mixin = function(key, val) {\n Base.prototype[key] = val;\n return this;\n };\n\n /**\n * Non-enumberable mixin array, used by the static [Base.mixin]() method.\n */\n\n Base.prototype.mixins = Base.prototype.mixins || [];\n\n /**\n * Getter/setter used when creating nested instances of `Base`, for storing a reference\n * to the first ancestor instance. This works by setting an instance of `Base` on the `parent`\n * property of a \"child\" instance. The `base` property defaults to the current instance if\n * no `parent` property is defined.\n *\n * ```js\n * // create an instance of `Base`, this is our first (\"base\") instance\n * var first = new Base();\n * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later\n *\n * // create another instance\n * var second = new Base();\n * // create a reference to the first instance (`first`)\n * second.parent = first;\n *\n * // create another instance\n * var third = new Base();\n * // create a reference to the previous instance (`second`)\n * // repeat this pattern every time a \"child\" instance is created\n * third.parent = second;\n *\n * // we can always access the first instance using the `base` property\n * console.log(first.base.foo);\n * //=> 'bar'\n * console.log(second.base.foo);\n * //=> 'bar'\n * console.log(third.base.foo);\n * //=> 'bar'\n * // and now you know how to get to third base ;)\n * ```\n * @name .base\n * @api public\n */\n\n Object.defineProperty(Base.prototype, 'base', {\n configurable: true,\n get: function() {\n return this.parent ? this.parent.base : this;\n }\n });\n\n /**\n * Static method for adding global plugin functions that will\n * be added to an instance when created.\n *\n * ```js\n * Base.use(function(app) {\n * app.foo = 'bar';\n * });\n * var app = new Base();\n * console.log(app.foo);\n * //=> 'bar'\n * ```\n * @name #use\n * @param {Function} `fn` Plugin function to use on each instance.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'use', function(fn) {\n fns.push(fn);\n return Base;\n });\n\n /**\n * Run an array of functions by passing each function\n * to a method on the given object specified by the given property.\n *\n * @param {Object} `obj` Object containing method to use.\n * @param {String} `prop` Name of the method on the object to use.\n * @param {Array} `arr` Array of functions to pass to the method.\n */\n\n define(Base, 'run', function(obj, prop, arr) {\n var len = arr.length, i = 0;\n while (len--) {\n obj[prop](arr[i++]);\n }\n return Base;\n });\n\n /**\n * Static method for inheriting the prototype and static methods of the `Base` class.\n * This method greatly simplifies the process of creating inheritance-based applications.\n * See [static-extend][] for more details.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @name #extend\n * @param {Function} `Ctor` constructor to extend\n * @param {Object} `methods` Optional prototype properties to mix in.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {\n Ctor.prototype.mixins = Ctor.prototype.mixins || [];\n\n define(Ctor, 'mixin', function(fn) {\n var mixin = fn(Ctor.prototype, Ctor);\n if (typeof mixin === 'function') {\n Ctor.prototype.mixins.push(mixin);\n }\n return Ctor;\n });\n\n define(Ctor, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Ctor.prototype.mixins);\n return Ctor;\n });\n\n Ctor.prototype.mixin = function(key, value) {\n Ctor.prototype[key] = value;\n return this;\n };\n return Base;\n }));\n\n /**\n * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.\n * When a mixin function returns a function, the returned function is pushed onto the `.mixins`\n * array, making it available to be used on inheriting classes whenever `Base.mixins()` is\n * called (e.g. `Base.mixins(Child)`).\n *\n * ```js\n * Base.mixin(function(proto) {\n * proto.foo = function(msg) {\n * return 'foo ' + msg;\n * };\n * });\n * ```\n * @name #mixin\n * @param {Function} `fn` Function to call\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixin', function(fn) {\n var mixin = fn(Base.prototype, Base);\n if (typeof mixin === 'function') {\n Base.prototype.mixins.push(mixin);\n }\n return Base;\n });\n\n /**\n * Static method for running global mixin functions against a child constructor.\n * Mixins must be registered before calling this method.\n *\n * ```js\n * Base.extend(Child);\n * Base.mixins(Child);\n * ```\n * @name #mixins\n * @param {Function} `Child` Constructor function of a child class\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Base.prototype.mixins);\n return Base;\n });\n\n /**\n * Similar to `util.inherit`, but copies all static properties, prototype properties, and\n * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.\n *\n * ```js\n * Base.inherit(Foo, Bar);\n * ```\n * @name #inherit\n * @param {Function} `Receiver` Receiving (child) constructor\n * @param {Function} `Provider` Providing (parent) constructor\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'inherit', cu.inherit);\n define(Base, 'bubble', cu.bubble);\n return Base;\n}", "constructor(storage, namespace = '') {\n super(storage, (context) => {\n // Calculate storage key\n const key = this.getStorageKey(context);\n return key ? Promise.resolve(key) : Promise.reject(new Error(NO_KEY));\n });\n this.namespace = namespace;\n }", "constructor() {\n firebase.initializeApp(FirebaseConfig)\n\n // initialize the mobx-firebase store that we inherited from, pass in the reference to our firebase\n super(firebase.database().ref())\n\n // now let us create our SettingsStore data that we would like to pass around to other parts of our application\n this.splashTime = 500 // 5000 milliseconds = 5 seconds\n this.splashImg = require('../../images/Splash.jpg')\n\n // login\n this.loginBackgroundImg = require('../../images/Login.jpg')\n }", "function getGlobalObject() {\n return self;\n }", "function getGlobalObject() {\n return self;\n }", "function firebaseAuth(){\n var provider = new firebase.auth.GoogleAuthProvider();\n firebase.auth().signInWithPopup(provider);\n var user = firebase.auth().currentUser;\n userName = user.displayName;\n userEmail = user.email;\n}", "function ipCacheRef(ip) {\n var fbkey = ip.replace(/\\./g, '-');\n var url = process.env.FBIO_GEOCACHE_URL + \"/\" + fbkey;\n return new Firebase(url);\n}" ]
[ "0.7396058", "0.7396058", "0.7395023", "0.73853666", "0.73261255", "0.7325864", "0.7325686", "0.7305236", "0.73001844", "0.72946507", "0.72926885", "0.7241198", "0.7237989", "0.7228324", "0.7228324", "0.71012306", "0.70843583", "0.6664544", "0.59658456", "0.591994", "0.58593065", "0.57265985", "0.5712106", "0.56943774", "0.56943774", "0.568824", "0.5647429", "0.56436145", "0.56404936", "0.56162006", "0.55970377", "0.55793864", "0.55655205", "0.55655205", "0.55617136", "0.5549462", "0.5549462", "0.5546093", "0.55423385", "0.5484271", "0.5462144", "0.5450846", "0.5423929", "0.5423498", "0.54222244", "0.539642", "0.5391926", "0.5337973", "0.5329187", "0.5327815", "0.5327815", "0.5311785", "0.5311785", "0.53068703", "0.52806604", "0.52496463", "0.5241454", "0.5213603", "0.519039", "0.51794475", "0.51757324", "0.51726115", "0.5155199", "0.5144331", "0.5101571", "0.5083202", "0.5056193", "0.50478345", "0.5044314", "0.50232375", "0.5020328", "0.499427", "0.49925062", "0.49922878", "0.49751803", "0.49625835", "0.49625084", "0.49457937", "0.493506", "0.49237594", "0.49233785", "0.490971", "0.490971", "0.4871213", "0.48484036", "0.48483318", "0.48483318", "0.48481774", "0.48451984", "0.48408252", "0.48379648", "0.483276", "0.4812243", "0.4812243", "0.48024613", "0.4797869", "0.4797846", "0.4797846", "0.4768162", "0.47490114" ]
0.7282356
11
Called by App.delete() but before any services associated with the App are deleted.
function removeApp(name) { var app = apps_[name]; callAppHooks(app, 'delete'); delete apps_[name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async delete() {\r\n const services = Array.from(this.instances.values());\r\n await Promise.all([\r\n ...services\r\n .filter(service => 'INTERNAL' in service) // legacy services\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map(service => service.INTERNAL.delete()),\r\n ...services\r\n .filter(service => '_delete' in service) // modularized services\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map(service => service._delete())\r\n ]);\r\n }", "cleanUp(){\n const now = Math.floor(new Date()/1000);\n for(let key in this.service){\n if(this.service[key].timestamp+this.timeout<now){\n console.log(`removing service ${this.service[key]}`);\n delete this.service[key];\n }\n }\n }", "restore() {\n _.each( this._overridenServices, ( overridenService, name ) => {\n if ( overridenService === null ) {\n // Remove the service, if not previously existed\n delete this._services[ name ];\n }\n else {\n // Restore the original service\n this._services[ name ] = overridenService;\n }\n } );\n }", "doDestroy() {\n const me = this;\n\n me.activeRequests.load && me.cancelRequest(me.activeRequests.load.desc);\n me.activeRequests.sync && me.cancelRequest(me.activeRequests.sync.desc);\n\n while (me.crudStores.length > 0) {\n me.removeCrudStore(me.crudStores[0]);\n }\n\n clearTimeout(me.autoSyncTimerId);\n\n me.destroyed = true;\n }", "onDeleted() {\n // this.log('device deleted');\n }", "doDestroy() {\n const me = this,\n {\n load,\n sync\n } = me.activeRequests;\n load && me.cancelRequest(load.desc, load.reject);\n sync && me.cancelRequest(sync.desc, sync.reject);\n\n while (me.crudStores.length > 0) {\n me.removeCrudStore(me.crudStores[0]);\n }\n\n clearTimeout(me.autoSyncTimerId);\n me.destroyed = true;\n super.doDestroy && super.doDestroy();\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }", "async function beforeStart() {\n setAppConfig();\n cron.destroyAllQueuesAfter24hs();\n //await Models.init();\n }", "function wipeServices(done) {\n\twipe(path.join(__dirname, '/dist/services/'), done);\n}", "function cleanApp(done) {\n del.sync(['app/*']);\n cache.clearAll();\n done();\n}", "doDestroy() {\n super.doDestroy();\n\n if (this.destroyStores) {\n // Shared project might already be destroyed\n !this.project.isDestroyed && this.project.destroy();\n }\n }", "onDeleted () {\n this.log('device deleted');\n }", "async cleanup() {\n // The cleanup logic is as follows:\n // - We first try to delete the resource using the delete() method\n // - However, it is possible that the user that created the resource does not have permission\n // to delete the resource or the user might have become inactive. Because of this we will\n // also try to perform the same delete() method but with default admin credentials\n\n try {\n await this.delete();\n } catch (error) {\n // Now we try with default admin credentials\n const adminSession = await this.setup.defaultAdminSession();\n this.axiosClient = adminSession.axiosClient;\n await this.delete();\n }\n }", "onDeleted() {\n\t\t// stop polling\n\t\tclearInterval(this.intervalIdDevicePoll);\n\t\tthis.log('device deleted');\n\t}", "function afterDeleteService(link, success, data)\n{\n\tif(success && data==0)\n\t\talert(\"Удаление невозможно, т.к. у услуги имеются связи.\");\n}", "destroy() {\n this._pluginsManager.beforeAppDestroy(this);\n for (let module of this._modulesOrder) {\n module.destroy();\n }\n }", "function deleteAllService () {\n function deleteService (name) {\n return new Promise((resolve, reject) => {\n const command = `pm2 delete ${name}`\n console.log(command)\n exec(command, (/* error, stdout, stderr */) => {\n /*\n Output and errors may greatly very duo to pm2 execution but\n still the service could be deleted\n */\n resolve()\n })\n })\n }\n\n return Promise.all(Object.keys(config.services)\n .map(deleteService)\n )\n}", "async deleteApp() {\n return await this.getApp().delete();\n }", "function destroyFirebaseApps() {\n var deletions = _firebase['default'].apps.map(function (app) {\n return app['delete']();\n });\n _ember['default'].RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "function destroyFirebaseApps() {\n var deletions = _firebase['default'].apps.map(function (app) {\n return app['delete']();\n });\n _ember['default'].RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "async onDeleted() {\n this.log('device deleted', this.getName(), this.settings.serialNumber);\n this.client && this.client.end();\n this.timeout && clearTimeout(this.timeout);\n this.shouldSync = false;\n this.setUnavailable();\n }", "function destroyFirebaseApps() {\n var deletions = _firebase.default.apps.map(function (app) {\n return app.delete();\n });\n Ember.RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "function removeAppComponents(){\n\t\tfor (i = 0; i < appObjects.length; i++){\n\t\t\tappObjects[i].remove();\n\t\t}\n\t\tappObjects = [];\n\t}", "function serviceCountCheck() {\r\n if (serviceCount != self._microServices.length && settingsHelper.settings.state === \"Active\") {\r\n self.onLog(\"A service has dropped, restarting services (\" + serviceCount + \"/\" + self._microServices.length + \")\");\r\n self.onAction({ action: \"restart\" });\r\n }\r\n }", "beforeDestroy(){\n //Antes de destruir la instancia\n console.log('beforeDestroy')\n }", "destroy () {\n\n this._setState(PortalService.STATE.DESTROYED);\n\n this._routes = undefined;\n this._http = undefined;\n this._authenticators = undefined;\n this.DEFAULT_AUTHENTICATOR = undefined;\n\n nrLog.trace(`${PortalService.getAppName()} destroyed`);\n\n }", "destroy() {\n logger.log({level: 'info', type: 'service', message: 'Destroying Service'});\n this.end = true;\n clearTimeout(this.pollInterval);\n }", "function Service(app_, region_) {\n var _this = this;\n\n if (region_ === void 0) {\n region_ = 'us-central1';\n }\n\n this.app_ = app_;\n this.region_ = region_;\n this.serializer = new Serializer();\n this.emulatorOrigin = null;\n this.INTERNAL = {\n delete: function () {\n return _this.deleteService();\n }\n };\n this.contextProvider = new ContextProvider(app_); // Cancels all ongoing requests when resolved.\n\n this.cancelAllRequests = new Promise(function (resolve) {\n _this.deleteService = function () {\n return resolve();\n };\n });\n }", "removeService(intent,ip,port){\n const key = intent+ip+port;\n delete this.service[key];\n }", "function initServices(){\n if ( OS_ANDROID ) {\n\n if (!Ti.Android.isServiceRunning(intentService)) {\n Ti.Android.startService(intentService);\n } else {\n Ti.API.info('Service is already running.');\n }\n } else {\n Ti.App.fireEvent('stopService');\n var service = Ti.App.iOS.registerBackgroundService({url:'drivingModeService.js'});\n }\n}", "function Service(app_, authProvider, messagingProvider, region_) {\r\n var _this = this;\r\n if (region_ === void 0) { region_ = 'us-central1'; }\r\n this.app_ = app_;\r\n this.region_ = region_;\r\n this.serializer = new Serializer();\r\n this.emulatorOrigin = null;\r\n this.INTERNAL = {\r\n delete: function () {\r\n return _this.deleteService();\r\n }\r\n };\r\n this.contextProvider = new ContextProvider(authProvider, messagingProvider);\r\n // Cancels all ongoing requests when resolved.\r\n this.cancelAllRequests = new Promise(function (resolve) {\r\n _this.deleteService = function () {\r\n return resolve();\r\n };\r\n });\r\n }", "function Service(app_, authProvider, messagingProvider, region_) {\r\n var _this = this;\r\n if (region_ === void 0) { region_ = 'us-central1'; }\r\n this.app_ = app_;\r\n this.region_ = region_;\r\n this.serializer = new Serializer();\r\n this.emulatorOrigin = null;\r\n this.INTERNAL = {\r\n delete: function () {\r\n return _this.deleteService();\r\n }\r\n };\r\n this.contextProvider = new ContextProvider(authProvider, messagingProvider);\r\n // Cancels all ongoing requests when resolved.\r\n this.cancelAllRequests = new Promise(function (resolve) {\r\n _this.deleteService = function () {\r\n return resolve();\r\n };\r\n });\r\n }", "function teardown () {\n\t removeNativeEventListeners()\n\t removeNativeElement()\n\t app.off('unmount', onunmount)\n\t app.off('mount', onmount)\n\t app.off('source', onupdate)\n\t }", "function removeItems() {\n service.books = [];\n service.assets = [];\n service.currentBook = {};\n return false;\n }", "function teardown () {\n removeNativeEventListeners()\n removeNativeElement()\n app.off('unmount', onunmount)\n app.off('mount', onmount)\n app.off('source', onupdate)\n }", "dispose() {\n if (this.m_serviceCreated) {\n this.workerSet\n .broadcastRequest(harp_datasource_protocol_1.WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID, {\n type: harp_datasource_protocol_1.WorkerServiceProtocol.Requests.DestroyService,\n targetServiceId: this.serviceId\n })\n .catch(() => {\n /* Ignoring these errors as underlying workers possibly do not exist anymore. */\n });\n }\n this.workerSet.removeReference();\n }", "beforeDestroy () {\n unwatchAll(this);\n }", "function unloadApp() {\n if (typeof(window.currentapp) != \"undefined\") {\n var app = window.currentapp;\n delete window.currentapp;\n app.destroy();\n };\n placeContent(\"content\", null);\n placeContent(\"extra\", null);\n}", "function reset() {\n var service = getService();\n service.reset();\n}", "function reset() {\n var service = getService();\n service.reset();\n}", "function reset() {\n var service = getService();\n service.reset();\n}", "static destroyAll() {\n applications.forEach(proc => {\n try {\n proc.destroy(false);\n } catch (e) {\n logger.warn('Exception on destroyAll', e);\n }\n });\n\n applications.splice(0, applications.length);\n }", "preDestroy() {}", "function reset() {\n getService_().reset();\n}", "function reset() {\n getService_().reset();\n}", "disconnectedCallback () {\n this._applicationIconWrapper.removeEventListener('click', this._createNewAppInstance)\n this.removeEventListener('keydown', this._createNewAppInstance)\n }", "function afterAll() {\n server.stop();\n\n if (webpackServer) {\n webpackServer.kill();\n }\n\n resetConfig();\n\n if (appExtrasOriginal) {\n resetAppExtras();\n }\n}", "async deleteservice({\n view,\n request,\n session,\n response\n }) {\n if (request.ajax()) {\n const id = request.input('id')\n const service = await Service.find(id)\n await service.delete()\n\n response.send({\n status: 'success'\n })\n } else {\n return 'Bad request Type...';\n }\n\n }", "function deleteAllSVCData() {\n if (CurrentUser === undefined || CurrentUser === null) {\n // Restrict access to logged in users only. \n return;\n }\n\n dbRef.remove().then(function () {\n console.log(\"Removed All SVC Data from firebase\");\n }).catch(function (error) {\n console.log(\"Failed to remove SVC Data. Error: \" + error.message);\n });\n return;\n} // END deleteAllSVCData", "function removeApp(name) {\n\t var app = apps_[name];\n\t callAppHooks(app, 'delete');\n\t delete apps_[name];\n\t }", "deleteAppFromDashBoard() {\n axios.delete(APP_URL + '/user/' + this.props.id_user + '/myappsondashboard/' + this.props.item.id_app, {\n headers: {\n Authorization: 'Bearer ' + localStorage.getItem('token')\n }\n })\n .then(response => response.data)\n .then(() => this.setState(\n {\n added_app: false\n })\n )\n //trigger deleteAppFromDashBoard function of parent component (AppList) to delete the app from the list of Component\n .then(() => {\n if (this.props.deleteAppFromDashBoard) {\n this.props.deleteAppFromDashBoard(this.props.item.id_app)\n }\n })\n .catch(err => console.log(err))\n }", "beforeDestroy(){\n console.log('beforeDestroy');\n }", "destroy() {\n if (this._destroyed) {\n const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?\n 'The platform has already been destroyed!' :\n '';\n throw new RuntimeError(404 /* ALREADY_DESTROYED_PLATFORM */, errorMessage);\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "handleAppDelete() {\n let selectionKeys = this.selection.getSelection().map(selection => selection.key);\n let appBlockers = this.state.blockers.apps;\n appBlockers = appBlockers.filter(path => {\n return selectionKeys.indexOf(path) === -1\n })\n store.preferences.set('blockers.apps', appBlockers);\n }", "doDestroy() {\n const me = this;\n me.eventStoreDetacher && me.eventStoreDetacher();\n me.resourceStoreDetacher && me.resourceStoreDetacher();\n super.doDestroy();\n }", "async onBeforeTerminate() {\n mainLog.info('Shutting down Lightning daemon')\n this.unsubscribe()\n return new Promise((resolve, reject) => {\n this.service.stopDaemon({}, (err, data) => {\n if (err) {\n return reject(err)\n }\n resolve(data)\n })\n })\n }", "$onDestroy() {\n this.$unwatchData();\n this.$unwatchUser();\n\n if (this.data && this.data.$destroy) {\n this.data.$destroy();\n }\n\n if (this.$disableRefresh) {\n this.$timeout.cancel(this.$disableRefresh);\n this.$disableRefresh = undefined;\n }\n }", "async function cleanup() {\n const packageResponse = await client.getPackage(packagePayload.Name, { resolveWithFullResponse: true });\n const propertySetTypeResponse = await client.getPropertySetType(\n propertySetTypePayload.Name,\n null,\n { resolveWithFullResponse: true },\n );\n const thingTypeResponse = await client.getThingType(thingTypePayload.Name, null, { resolveWithFullResponse: true });\n\n const things = await client.getThingsByThingType(thingTypePayload.Name);\n things.value.forEach(async (thing) => {\n await client.deleteThing(thing._id);\n console.log(`Thing deleted: ${thing._id}`);\n });\n\n await client.deleteThingType(thingTypePayload.Name, thingTypeResponse.headers.etag);\n console.log(`Thing type deleted: ${thingTypePayload.Name}`);\n await client.deletePropertySetType(propertySetTypePayload.Name, propertySetTypeResponse.headers.etag);\n console.log(`Property set type deleted: ${propertySetTypePayload.Name}`);\n await client.deletePackage(packagePayload.Name, packageResponse.headers.etag);\n console.log(`Package deleted: ${packagePayload.Name}`);\n}", "cleanup() {\n installed = false;\n }", "destroy () {\n const { mediator } = this;\n mediator.emit('app:destroy');\n }", "doDestroy() {\n this.trigger('destroy');\n this.removeAllListeners();\n super.doDestroy();\n }", "willDestroy() {}", "willDestroy() {}", "function pageBeforeRemove() {\n m.destroy();\n pageContainer.off('pageBeforeRemove', pageBeforeRemove);\n }", "_initServices() {\n this._config.initServicesIma(ns, this._oc, this._config.services);\n\n this._config.plugins\n .filter(plugin => typeof plugin.module.initServices === 'function')\n .forEach(plugin => {\n plugin.module.initServices(ns, this._oc, this._config.services);\n });\n\n this._config.initServicesApp(ns, this._oc, this._config.services);\n }", "removeAppFromHosts(app) {\n for (const [index, item] of this.apps.entries()) {\n if (app.name === item.name) {\n this.apps.splice(index, 1);\n return this.apps;\n }\n }\n }", "delete() {\n this.items().then(instances => {\n instances.forEach(instance => {\n instance.delete();\n })\n }).catch(error => {\n debugger;\n throw error;\n })\n }", "destroy() {\n CommonUtils.callback('onDelete', this);\n }", "gc () {\n const dateNow = Date.now() / 1000\n const toDelete = []\n\n for (let keyVal of this.instances) {\n if (dateNow - keyVal[1].lastUpdate > 10 * this.conf.timeout) {\n toDelete.push(keyVal[0])\n }\n }\n\n for (let key of toDelete) {\n this.instances.delete(key)\n util.debug(`deleted stale app ${key} from cache`)\n }\n }", "function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }", "function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }", "function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }", "beforeDestroy(fn) {\n if (!this.beforeDestroyHandlers) {\n this.beforeDestroyHandlers = [];\n }\n this.beforeDestroyHandlers.push(fn);\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "_invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }", "die() {\n HSystem.killApp(this.appId, false);\n }", "die() {\n HSystem.killApp(this.appId, false);\n }", "function destroyApp($injector) {\n const $rootElement = $injector.get($ROOT_ELEMENT);\n const $rootScope = $injector.get($ROOT_SCOPE);\n $rootScope.$destroy();\n cleanData($rootElement[0]);\n}", "destroy() {\n if (this.active) {\n this.adapter.log.debug('Destroy ' + this.getName());\n this.active = false;\n clearTimeout(this.timerid);\n clearTimeout(this.autoupdateid);\n for (let messageId in this.qos) {\n if (this.qos[messageId].resendid) clearTimeout(this.qos[messageId].resendid);\n }\n this.qos = {};\n this.messageId = 1;\n this.states = {};\n this.device = {};\n this.http = {};\n this.ip = undefined;\n this.id = undefined;\n this.devicename = undefined;\n this.devicetype = undefined;\n this.deviceid = undefined;\n this.serialid = undefined;\n this.deviceexist = undefined;\n this.mqttprefix = undefined;\n this.onlineCheck('stop');\n if (this.client) {\n this.client.removeAllListeners();\n this.client.destroy();\n }\n }\n }", "doDestroy() {\n super.doDestroy();\n\n const me = this;\n if (me.destroyStores) {\n // TODO: Use me.destroyMembers when available.\n if (me.assignmentStore) me.assignmentStore.destroy();\n if (me.resourceStore) me.resourceStore.destroy();\n if (me.dependencyStore) me.dependencyStore.destroy();\n if (me.eventStore) me.eventStore.destroy();\n }\n }", "onDestroy() {}", "static onDestroy(callback) {\n if (!ForegroundServiceEmitter) {\n return null;\n }\n\n return ForegroundServiceEmitter.addListener(\n 'ForegroundService.onDestroy',\n (data) => {\n callback(data);\n },\n );\n }", "destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }", "stop() {\n // fetch app services that implement a #stop() method\n const results = this._active\n .map(singletonService => singletonService.stop && singletonService.stop())\n .filter(Boolean);\n\n // why??\n this._active.splice(0, this._active.length);\n\n // execute all the stop methods at once\n // TODO: this should be smarter!\n return Promise.all(results);\n }" ]
[ "0.6529951", "0.63229233", "0.61973095", "0.5973669", "0.5904189", "0.5874682", "0.58137155", "0.58137155", "0.58137155", "0.58137155", "0.58137155", "0.58137155", "0.57807356", "0.5741414", "0.57388115", "0.5734138", "0.57299674", "0.57051516", "0.5684808", "0.56539464", "0.56445634", "0.56428754", "0.56252986", "0.5624141", "0.5624141", "0.56036437", "0.55933267", "0.558708", "0.554424", "0.55398047", "0.55386263", "0.5527417", "0.5520745", "0.55141366", "0.5496006", "0.54679316", "0.54679316", "0.54649675", "0.54019564", "0.53826904", "0.537847", "0.53757", "0.53658396", "0.53451824", "0.53451824", "0.53451824", "0.53384006", "0.5317378", "0.5315981", "0.5315981", "0.5298933", "0.5297147", "0.5288351", "0.5279366", "0.5274195", "0.52592725", "0.525711", "0.5254719", "0.52168864", "0.5216493", "0.5205867", "0.52052695", "0.52011806", "0.519404", "0.5193617", "0.5180095", "0.5162159", "0.5162159", "0.51513565", "0.51505584", "0.5150014", "0.51487833", "0.51485425", "0.5144813", "0.51445067", "0.51445067", "0.51445067", "0.51443535", "0.51435727", "0.51435727", "0.51435727", "0.51435727", "0.51435727", "0.51435727", "0.5140628", "0.5140628", "0.5135501", "0.51349163", "0.5132175", "0.51263", "0.51252204", "0.5116598", "0.5116598", "0.5116598", "0.5116598", "0.5116598", "0.5115745" ]
0.0
-1
Get the App object for a given name (or DEFAULT).
function app(name) { name = name || DEFAULT_ENTRY_NAME; if (!contains(apps_, name)) { error('no-app', { name: name }); } return apps_[name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!util.contains(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!util.contains(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!util.contains(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!util.contains(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!util.contains(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n name: name\n });\n }\n\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!util.contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!util.contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }", "function app(name) {\n\t name = name || DEFAULT_ENTRY_NAME;\n\t if (!contains(apps_, name)) {\n\t error('no-app', { name: name });\n\t }\n\t return apps_[name];\n\t }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!util.contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n appName: name\n });\n }\n\n return apps[name];\n } // @ts-ignore", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!(0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.contains)(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!(0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.contains)(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"contains\"])(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"contains\"])(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"contains\"])(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"contains\"])(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\n }\n return apps[name];\n }", "function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[/* contains */ \"h\"])(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!index_esm_contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }", "function app(name) {\r\n name = name || _firebase_app__WEBPACK_IMPORTED_MODULE_2__._DEFAULT_ENTRY_NAME;\r\n if (!(0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.contains)(apps, name)) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* NO_APP */, { appName: name });\r\n }\r\n return apps[name];\r\n }", "function getApp(id) {\n return App.getApp(id);\n}", "static getApp(id) {\n if (id in App.appCache) {\n return App.appCache[id];\n } else {\n const instance = new App(id);\n\n App.appCache[id] = instance;\n\n return instance;\n }\n }", "get app() {\n let result;\n // Explicit command line\n if (this.appOption) {\n result = profile_1.toDefaultApp(this.appOption);\n if (!result) {\n throw new Error(`'${this.appOption}' is not a valid application id`);\n }\n // Environment variable\n }\n else if (process.env[currentAppVar]) {\n result = profile_1.toDefaultApp(process.env[currentAppVar]);\n if (!result) {\n throw new Error(`'${process.env[currentAppVar]}' (read from ${currentAppVar}) is not a valid application id`);\n }\n // Default app in profile\n }\n else {\n const profile = profile_1.getUser();\n if (profile === null || profile === void 0 ? void 0 : profile.defaultApp) {\n result = profile.defaultApp;\n // Couldn't find one, fail.\n }\n else {\n throw new Error(`Could not find application to work on. Specify the '--app' switch, use '${misc_1.scriptName} apps set-current', or set the ${currentAppVar} environment variable.`);\n }\n }\n return result;\n }", "getAppById(id) {\r\n return new App(this, `getById('${id}')`);\r\n }", "function get_app() {\n return app;\n}", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n\t if (name === undefined) {\n\t name = DEFAULT_ENTRY_NAME;\n\t } else {\n\t if (typeof name !== 'string' || name === '') {\n\t error('bad-app-name', { name: name + '' });\n\t }\n\t }\n\t if (contains(apps_, name)) {\n\t error('duplicate-app', { name: name });\n\t }\n\t var app = new FirebaseAppImpl(options, name, namespace);\n\t apps_[name] = app;\n\t callAppHooks(app, 'create');\n\t return app;\n\t }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }", "get(name = '') {\n this.app.get(name)\n }", "function getFlexApp(appName) {\r\n if (navigator.appName.indexOf(\"Microsoft\") != -1) {\r\n return window[appName];\r\n } else {\r\n return document[appName];\r\n }\r\n}", "App(appName) {\n\t\tthis.utils.logger.debug({description: 'Application action called.', appName: appName, template: new App(appName), func: 'App', obj: 'Grout'});\n\t\treturn new App(appName);\n\t}", "appName(name) {\n this.checkSearchType();\n this.tag('App-Name', [name]);\n return this;\n }", "function getDisplayedApp() {\n return displayedApp || null;\n }", "function app(bidderRequest) {\n const pubId = bidderRequest && bidderRequest.length > 0 ? bidderRequest[0].params.affiliateid : '0';\n const appParams = bidderRequest[0].params.app;\n if (appParams) {\n return {\n id: appParams.id,\n name: appParams.name,\n bundle: appParams.bundle,\n storeurl: appParams.storeUrl,\n domain: appParams.domain,\n publisher: {\n id: pubId.toString(),\n },\n };\n }\n return null;\n}", "function getAppDefault(key) {\n return map[key];\n }", "function getAppContextFromArgv(apps) {\n return Promise.try(function() {\n return _.find(apps, function(app) {\n return app.name === argv.payload[0];\n });\n });\n}", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(name => apps[name]);\r\n }", "function getApp(cookies, appUid) {\n return new Promise((resolve, reject) => {\n debug(`getApp(${cookies}, ${appUid}`);\n get(cookies, appUid).then((getResponse) => {\n let jsonObject;\n parseString(getResponse, (err, result) => {\n if (err) reject(err);\n jsonObject = result;\n });\n\n if (jsonObject.xwhep.app === undefined) {\n reject(new Error(`getApp() : Not an application : ${appUid}`));\n return;\n }\n\n debug('jsonObject.xwhep.app[0]', jsonObject.xwhep.app[0]);\n const appName = jsonObject.xwhep.app[0].name[0];\n debug(`getApp(${cookies}, ${appName})`);\n\n if (!(appName in hashtableAppNames)) {\n debug(`getApp(${cookies}, inserting ${appName}`);\n hashtableAppNames[appName] = appUid;\n }\n\n resolve(getResponse);\n }).catch((e) => {\n reject(new Error(`getApp() : Application not found (${appUid}) : ${e}`));\n });\n });\n }", "function APP() { \n\tvar args = Array.from(arguments);\n\tret = { f: args[0], args: args.slice(1) };\n\tret[_TYPE] = _APP;\n\treturn ret;\n}", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function removeApp(name) {\n delete apps[name];\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }", "function removeApp(name) {\r\n delete apps[name];\r\n }", "function removeApp(name) {\r\n delete apps[name];\r\n }", "function removeApp(name) {\r\n delete apps[name];\r\n }", "function removeApp(name) {\r\n delete apps[name];\r\n }", "function removeApp(name) {\r\n delete apps[name];\r\n }", "static getInstance() {\n // check if an instance of the class is already created\n if (!AppInfo.singleton) {\n // If not created create an instance of the class\n // store the instance in the variable\n AppInfo.singleton = new AppInfo();\n }\n // return the singleton object\n return AppInfo.singleton;\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }", "getAppName() {\n return process.env.APP_NAME;\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function removeApp(name) {\n delete apps[name];\n }", "static get default() {\n return Application;\n }", "getApp() {\n return admin.app();\n }", "function getAppId(appNameOrId, registry) {\n if (seemsHex(appNameOrId)) {\n // Is already an appId\n return appNameOrId;\n }\n else {\n const fullAppName = getFullAppName(appNameOrId, registry);\n return namehash_1.namehash(fullAppName);\n }\n}", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }" ]
[ "0.85640514", "0.85640514", "0.85640514", "0.85640514", "0.85640514", "0.8555891", "0.854544", "0.854544", "0.8414088", "0.8414088", "0.8414088", "0.8391061", "0.83666664", "0.81375676", "0.81375676", "0.8126068", "0.8126068", "0.8126068", "0.8126068", "0.80918074", "0.8034313", "0.77952814", "0.7375965", "0.716305", "0.695493", "0.6748219", "0.6425099", "0.6421402", "0.6421402", "0.6421402", "0.6421402", "0.6421402", "0.6419407", "0.6413774", "0.6413774", "0.6413774", "0.6299774", "0.62278396", "0.61968946", "0.5941235", "0.5875657", "0.5796334", "0.57934976", "0.5694775", "0.5665279", "0.56457037", "0.5633316", "0.55955684", "0.55955684", "0.55955684", "0.55955684", "0.55955684", "0.55955684", "0.55955684", "0.55955684", "0.5590344", "0.558802", "0.558802", "0.558802", "0.558802", "0.558802", "0.5571029", "0.5563833", "0.5547899", "0.5546469", "0.5546469", "0.5546469", "0.5546469", "0.5546469", "0.5546469", "0.55293304", "0.55293304", "0.55293304", "0.55293304", "0.55293304", "0.55293304", "0.55293304", "0.55293304", "0.55287504", "0.55046695", "0.55005807", "0.5476016", "0.54590285", "0.54590285", "0.54590285", "0.54520583", "0.54520583", "0.54520583", "0.54520583", "0.54520583" ]
0.83690786
19
Return an array of all the nondeleted FirebaseApps.
function getApps() { // Make a copy so caller cannot mutate the apps list. return Object.keys(apps_).map(function (name) { return apps_[name]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getApps() {\r\n return Array.from(_apps.values());\r\n}", "function destroyFirebaseApps() {\n var deletions = _firebase.default.apps.map(function (app) {\n return app.delete();\n });\n Ember.RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "function destroyFirebaseApps() {\n var deletions = _firebase['default'].apps.map(function (app) {\n return app['delete']();\n });\n _ember['default'].RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "function destroyFirebaseApps() {\n var deletions = _firebase['default'].apps.map(function (app) {\n return app['delete']();\n });\n _ember['default'].RSVP.all(deletions).then(function () {\n return run(function () {\n // NOOP to delay run loop until the apps are destroyed\n });\n });\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(name => apps[name]);\r\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps).map(function (name) { return apps[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) { return apps[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }", "function getApps() {\n\t // Make a copy so caller cannot mutate the apps list.\n\t return Object.keys(apps_).map(function (name) {\n\t return apps_[name];\n\t });\n\t }", "function clearFilteredApps() {\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__appStore__[\"a\" /* getStore */])().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: []\n\t});\n}", "function getApps(){\n\tchrome.management.getAll(function(info){\n\t\tvar apps = [];\n\t\tfor(var i=0; i<info.length; i++){\n\t\t\tif(info[i].isApp){\n\t\t\t\tapps[apps.length] = info[i];\n\t\t\t}\n\t\t}\n\t\trebuildList(apps);\n\t});\n}", "getAllTodoNotDone() {\n return this.state.todos.filter(todo => !todo.done)\n }", "function listApplications() {\n var result = [], k;\n for (k in apps)\n result.push(k);\n return result;\n }", "function getTrashList() {\n return Object.values(DB).filter((item) => item.status === TRASH)\n}", "function getFilteredApps() {\n\treturn data.filteredApps;\n}", "function getInstalledApps() {\n\treturn data.installed;\n}", "function findUnacceptedApplications(){\n\tvar acceptanceData;\n\t\n\tdatabase.collection('offers').get().then((snapshot) => {\n snapshot.docs.forEach(offer => {\n\t\t\tacceptanceData = offer.data();\n\t\t\tdates = acceptanceData.acceptDate;\n\t\t\toffers = acceptanceData.scholarshipID;\n\t\t\taccepted = acceptanceData.acceptedScholarships;\n\t\t\t\n\t\t\t//Parse through all scholarships to see if their acceptance date is before todays date\n\t\t\tfor(var scholarshipNum = 0; scholarshipNum < dates.length; scholarshipNum++){\n\t\t\t\tif(dates[scholarshipNum] < currentDate){\n\t\t\t\t\tconst scholarshipName = offers[scholarshipNum];\n\t\t\t\t\tvar isAccepted = false;\n\t\t\t\t\t\n\t\t\t\t\t//Check to see if scholarship has been accepted\n\t\t\t\t\taccepted.forEach(acceptance => {\n\t\t\t\t\t\tif (acceptance == scholarshipName){\n\t\t\t\t\t\t\tisAccepted = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Has not been accepted, needs to be removed\n\t\t\t\t\tif (!isAccepted){\n\t\t\t\t\t\tunaccepted.push({\n\t\t\t\t\t\tid: acceptanceData.id,\n\t\t\t\t\t\tscholarshipID: scholarshipName,\n\t\t\t\t\t\tofferID: offer.id,\n\t\t\t\t\t\tarrayLocation: scholarshipNum\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n })\n\t\t\n\t\t\n\t\tremoveApplication();\n\t\tremoveAcceptance();\n })\n\t\n}", "function untracked() {\n return fs.readdirSync(files.workingCopyPath())\n .filter(function(p) { return index.toc()[p] === undefined && p !== \".gitlet\"; });\n }", "async function listAppdata() {\n // Get credentials and build service\n // TODO (developer) - Use appropriate auth mechanism for your app\n\n const {GoogleAuth} = require('google-auth-library');\n const {google} = require('googleapis');\n\n const auth = new GoogleAuth({\n scopes: 'https://www.googleapis.com/auth/drive.appdata',\n });\n const service = google.drive({version: 'v2', auth});\n try {\n const res = await service.files.list({\n spaces: 'appDataFolder',\n fields: 'nextPageToken, items(id, title)',\n pageSize: 100,\n });\n res.data.items.forEach(function(file) {\n console.log('Found file:', file.title, file.id);\n });\n return res.data.items;\n } catch (err) {\n // TODO(developer) - Handle error\n throw err;\n }\n}", "function removeUnusedFields(apps) {\n if (apps !== undefined) {\n for (var i = 0; i < apps.length; i++) {\n delete apps[i].votes;\n }\n }\n}", "get all_disable_app(){\n\t\treturn data.disable_app;\n\t}", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "getAllRootElements() {\n return Array.from(this._applications.keys());\n }", "retreiveAppDemos(path) {\n var _this = this;\n this.setState({ allAppsData: [], appsLoaded: false })\n //Get list of apps, and put the data in the state\n firebase.database().ref(path).once('value').then(function (snapshot) {\n\n if (snapshot.val() === null) {\n _this.setState({\n appsLoaded: true\n })\n } else {\n var allAppsData = snapshot.val();\n var apps = [];\n Object.keys(allAppsData).map(function (key, index) {\n allAppsData[key][\"key\"] = key;\n apps.push(allAppsData[key])\n\n });\n _this.setState({ allAppsData: apps, appsLoaded: true })\n\n }\n\n });\n }", "getSubscribableTenantApps() {\n return __awaiter(this, void 0, void 0, function* () {\n const currentTenant = (yield this.tenantService.current()).data;\n const allApps = (yield this.applicationService.listByTenant(null, { pageSize: 2000 })).data;\n const ownApps = allApps.filter(app => app.owner.tenant.id === currentTenant.name);\n const inheritedApps = allApps.filter(app => app.owner.tenant.id !== currentTenant.name);\n const filteredApps = [...ownApps];\n inheritedApps.forEach(inheritedApp => {\n if (!filteredApps.some(filteredApp => filteredApp.name === inheritedApp.name)) {\n filteredApps.push(inheritedApp);\n }\n });\n const filteredAppsWithHumanizedNames = yield Promise.all(filteredApps.map((app) => __awaiter(this, void 0, void 0, function* () {\n const humanizedName = yield this.humanizeAppNamePipe\n .transform(app.name)\n .pipe(debounceTime(250), take(1))\n .toPromise();\n return { app, humanizedName };\n })));\n const sortedAppsWithHumanizedNames = sortBy(filteredAppsWithHumanizedNames, ['humanizedName']);\n const sortedApps = sortedAppsWithHumanizedNames.map(({ app }) => app);\n return sortedApps;\n });\n }", "function getDoneList() {\n return Object.values(DB).filter((item) => item.status === DONE)\n}", "function cleanPinnedApps() {\n var _pinnedAppsList = getPinnedAppsList() || [],\n _found = false,\n _didItChange = false;\n\n for (var pi = 0, pl = _pinnedAppsList.length; pi < pl; pi++) {\n for (var ai = 0, al = state.apps.length; ai < al; ai++) {\n if (_pinnedAppsList[pi] === state.apps[ai].guid) {\n _found = true;\n break;\n } else {\n _found = false;\n }\n }\n\n if (!_found) {\n _didItChange = true;\n _pinnedAppsList.splice(pi, 1);\n \n pl = _pinnedAppsList.length,\n pi = -1; // start back at zero\n }\n }\n\n if (_didItChange) {\n Ti.API.info('Not all pinned apps are available. Updating...');\n lib.users.update.props.pins(Alloy.Globals.insights.state.currentUserEmailAddress, _pinnedAppsList);\n } else {\n Ti.API.info('All apps that are pinned are available...');\n }\n}", "function remainingTodos(){\n return self.todoList.filter(function(x){\n return x.done === false;\n });\n }", "function getInProgressList() {\n return Object.values(DB).filter((item) => item.status === IN_PROGRESS)\n}", "function list(projectId, cb) {\n if (!cb) {\n cb = projectId;\n projectId = null;\n }\n var isNGUI = ini.get('fhversion') >= 3;\n common.listApps(projectId, function(err, data){\n if(err) return cb(err);\n\n if(ini.get('table') === true && data.list) {\n\n if (isNGUI) {\n var headers = ['Id', 'Title', 'Description', 'Type', 'Git', 'Branch'];\n var fields = ['guid', 'title', 'description', 'type', 'internallyHostedRepoUrl', 'scmBranch'];\n apps.table = common.createTableFromArray(headers, fields, data.list);\n\n }else {\n apps.table = common.createTableForApps(data.list);\n }\n }\n\n if ('' !== ini.get('bare')) {\n var filter = 'id';\n if(ini.get('bare') !== true) filter = ini.get('bare');\n apps.bare = '';\n for (var a in data.list) {\n var app = data.list[a];\n if (apps.bare !== '') apps.bare = apps.bare + '\\n';\n apps.bare = apps.bare + app[filter];\n }\n }\n return cb(err, data);\n });\n}", "async deleteApp() {\n return await this.getApp().delete();\n }", "function remainingTodos(){\n\t\t\treturn self.todoList.filter(function(x){ return x.done == false; })\n\t\t}", "function queryDeleteAllTask() {\n\tnavigator.notification.confirm(\n 'Вы действительно хотите удалить все задачи из этого списка?', // message\n deleteAllTask, // callback to invoke with index of button pressed\n 'Удаление задач', // title\n ['Да','Нет'] // buttonLabels\n\t);\t\n}", "function Array$empty() {\n return [];\n }", "function Array$empty() {\n return [];\n }", "get UncheckedCalendarFolderIds() {\n let service = this;\n return [...service.uncheckedCalendarFolderMap.keys()];\n }", "function getRecordsDeleted() {\n\tvar result = null;\n\t\n\tvar db = Ti.Database.open('ColicheGassoseDB');\n\tvar recordsRS = db.execute(\"SELECT id from deletes where record_table = 'pill_alerts' AND to_sync = 1\");\n\t\n\tif(recordsRS.getRowCount()>0) result = [];\n\t\n\twhile (recordsRS.isValidRow()) {\n\t\tresult.push(recordsRS.fieldByName('id'));\n\t\trecordsRS.next();\n\t}\n\trecordsRS.close();\n\tdb.close();\n\t\n\treturn result;\n}", "function fetchInstalledApps() {\n\tlet addedApps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__appStore__[\"a\" /* getStore */])().getValue({\n\t\tfield: \"apps\"\n\t});\n\n\tlet installed = [];\n\tif (apps.length > 0) installed.push([apps[0].appId]);\n\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__appStore__[\"a\" /* getStore */])().setValue({\n\t\tfield: \"installed\",\n\t\tvalue: installed\n\t});\n}", "function removeUnaccepted(){\n\tunaccepted = new Array();\n\tfindUnacceptedApplications();\n}", "function getAllApplications($scope){\n\tmyCuiJs.getApplications()\n\t\t.then(function(response) {\n\t\t\t$scope.appList = [];\n\t\t\tresponse.forEach(function(fetchedAppFromList) { // pushes all the applications into \"applist\" array\n\t\t\t\t$scope.appList.push(fetchedAppFromList);\n\t\t\t\t$scope.$apply();\n\t\t\t});\n\t\t})\n}", "function deleteAllTasksFromDatabase () {\n firebase.database().ref('tasks').remove()\n updateCount()\n}", "getAllOnlineEntries() {\n return Array.from(this.onlineEntries.values());\n }", "function getAllDevsExceptThoseInActiveDevGroup() {\n \n //holds the developers who are NOT in the current active developer group \n var inactiveDevs = [];\n \n //grab each of the developer objects from the hash table\n for (var devId in allDevelopers) {\n \n //if this is a developer property\n if (allDevelopers.hasOwnProperty(devId)) {\n \n //if the dev is not in the active dev group\n if(!currentDeveloperGroup.memberIds.includes(devId)) {\n \n //add the inactive dev to the list\n inactiveDevs.push(allDevelopers[devId]);\n } \n }\n }\n \n return inactiveDevs;\n}", "listDogsNotAdopted() {\n return Promise.resolve()\n .then(() => {\n return this._call(`/listNotAdopteds`, 'get', undefined, undefined, 200)\n })\n .then(res => res.json())\n }", "static async getAll() {\n const applicationsData = await db.applications.getAll();\n const applications = applicationsData.map((data) => new Application(data));\n const applicationsExended = Promise.all(applications.map(async (application) => {\n const status = await Status.getById(application.statusId);\n application.setStatus(status);\n return application;\n }));\n return applicationsExended;\n }", "get availableAppVersions() {\n return Util.deepCopy(storeData.availableAppVersions);\n }", "function getRecordsDeleted() {\n\tvar result = null;\n\t\n\tvar db = Ti.Database.open('ColicheGassoseDB');\n\tvar recordsRS = db.execute(\"SELECT id from deletes where record_table = 'symptoms' AND to_sync = 1\");\n\t\n\tif(recordsRS.getRowCount()>0) result = [];\n\t\n\twhile (recordsRS.isValidRow()) {\n\t\tresult.push(recordsRS.fieldByName('id'));\n\t\trecordsRS.next();\n\t}\n\trecordsRS.close();\n\tdb.close();\n\t\n\treturn result;\n}", "function listApps(api, query) {\n return api_1.GET(api, '/apps', { query })\n}", "function cleanApp(done) {\n del.sync(['app/*']);\n cache.clearAll();\n done();\n}", "getAllApplications () : Promise<Array<AccountApplication>> {\n return this.makeRequest(\"applications\")\n }", "removeAppFromHosts(app) {\n for (const [index, item] of this.apps.entries()) {\n if (app.name === item.name) {\n this.apps.splice(index, 1);\n return this.apps;\n }\n }\n }", "clearNonActiveContexts() {\r\n this.contexts = this.contexts.filter((context) => {\r\n return this.activeContexts.includes(context);\r\n });\r\n }", "function getRemovable (db) {\n var _ = this\n var removable = []\n _.each(db, function (coll, collName) {\n _.each(coll, function (doc) {\n _.each(doc, function (value, key) {\n if (/Id$/.test(key)) {\n var refName = pluralize.plural(key.slice(0, -2))\n // Test if table exists\n if (db[refName]) {\n // Test if references is defined in table\n var ref = _.getById(db[refName], value)\n if (_.isUndefined(ref)) {\n removable.push({name: collName, id: doc.id})\n }\n }\n }\n })\n })\n })\n\n return removable\n}", "function fetchAppList(error, apps) {\n if(error) {\n console.log(error);\n return;\n }\n\n if(apps && apps.length > 0) {\n var rendered = Meteor.render(function() {\n return Template.appList({ apps: apps });\n });\n document.getElementById(\"apps-list\").innerHTML = '';\n document.getElementById(\"apps-list\").appendChild(rendered);\n\n if(typeof Session.get(\"activeApp\") == \"undefined\" ||\n Session.get(\"activeApp\") === null) {\n Session.set(\"activeApp\", App.fetchNameForId(apps[0]));\n Session.set(\"activeAppId\", apps[0]);\n }\n }\n}", "async listFilesWithoutFolders(params = {}) {\n let { extraQ = '' } = params;\n if (extraQ === '') extraQ = 'mimeType != \\'application/vnd.google-apps.folder\\'';\n\n if (!extraQ.includes('mimeType')) extraQ += ' and mimeType != \\'application/vnd.google-apps.folder\\'';\n return this.listFiles({\n ...params,\n extraQ,\n });\n }", "function getAll() {\n return $firebaseArray(ref.child('users'));\n }", "deleteOldData() {\n const old = [];\n const len = this.storage_.length;\n for (let i = 0; i < len; i++) {\n const key = this.storage_.key(i);\n if (!key.startsWith(this.version + ':')) {\n old.push(key);\n }\n }\n for (const key of old) {\n this.storage_.removeItem(key);\n }\n }", "function getTodoList() {\n return Object.values(DB).filter((item) => item.status === TODO)\n}", "function listArray() {\n const apps = ['Facebook', 'Netflix', 'Instagram', 'Snapchat', 'Twitter'];\n\n const newUl = document.createElement(\"ul\");\n\t\tdocument.body.appendChild(newUl);\n\n\t\tfor (const index = app; index < apps; index++) {\n\t\t\tconst newLi = document.createElement(\"li\");\n\t\t\tnewUl.appendChild(newLi)\n\t\t}\n}", "async getAllProcess() {\n const processList = [];\n const snapshot = await firebase.firestore().collection('process').get();\n snapshot.forEach(doc => {\n processList.push(doc.data());\n });\n return processList;\n }", "function delEmptyEntries(menuArr){\n var nwStrArray = menuArr.filter(item => (item.data.length > 0));\n\n return nwStrArray;\n}", "static emptyForAccount () {\n this.deleteAll()\n }", "_initializeNativeApps() {\n for (let i = 0, len = FirebaseCoreModule.apps.length; i < len; i++) {\n const app = FirebaseCoreModule.apps[i];\n const options = Object.assign({}, app);\n delete options.name;\n INTERNALS.APPS[app.name] = new FirebaseApp(app.name, options);\n INTERNALS.APPS[app.name]._initializeApp(true);\n }\n }", "handleAppDelete() {\n let selectionKeys = this.selection.getSelection().map(selection => selection.key);\n let appBlockers = this.state.blockers.apps;\n appBlockers = appBlockers.filter(path => {\n return selectionKeys.indexOf(path) === -1\n })\n store.preferences.set('blockers.apps', appBlockers);\n }", "async function getExistingUsers() {\n let result = []\n let apiData = await fetch(\n 'http://localhost:8080/user',\n {method: 'get'}\n )\n apiData = await apiData.json()\n if (apiData.success) {\n let users = apiData.data\n users.forEach(function(user) {\n if (user.deleted == 0) {\n result.push(user)\n }\n })\n }\n\n return result\n}", "function getListaDisfrutadasIds()\n{\n\tvar length = localStorage.length;\n\tvar result = new Array();\n\tfor (i=0; i<length; i++) \n\t{\n\t\tvar key = localStorage.key(i);\n\t\tif(key.indexOf('disfrutada_') === 0) // Comienza con\n\t\t\tresult.push(key);\n }\n return result.reverse();\n}", "clearExpired () {\n // return list\n const ret = []\n\n // iterate over storage keys to find all counters\n const that = this\n this._iterKeys(function (storageKey) {\n // if its not a timestamp key, skip it\n if (storageKey.indexOf(that._expiration_key_prefix) === 0) {\n // get item key\n const itemKey = storageKey.substr(that._expiration_key_prefix.length)\n // if expired remove it + the item\n if (that.isExpired(itemKey)) {\n that.removeItem(itemKey)\n ret.push(itemKey)\n }\n }\n })\n\n // return list with removed keys\n return ret\n }", "static deleteAll() {\n return store.remove('schedules.saved');\n }", "deleteAll() {\r\n return new Versions_1(this, \"deleteAll\").postCore();\r\n }" ]
[ "0.6482602", "0.6231479", "0.62088907", "0.62088907", "0.6073565", "0.6062356", "0.60584325", "0.60584325", "0.60584325", "0.60584325", "0.60584325", "0.60584325", "0.6056177", "0.6056177", "0.6056177", "0.6044587", "0.6036813", "0.6036813", "0.6036813", "0.6036813", "0.6036813", "0.6036813", "0.6036813", "0.6036813", "0.60354984", "0.60354984", "0.60354984", "0.60354984", "0.60354984", "0.60354984", "0.60354984", "0.6004771", "0.5962981", "0.58603567", "0.55358607", "0.5506682", "0.5480297", "0.5437639", "0.53098893", "0.5294109", "0.5290304", "0.5281228", "0.5268536", "0.5241883", "0.52298826", "0.52298826", "0.52298826", "0.52298826", "0.52298826", "0.52298826", "0.5186393", "0.5181795", "0.51761824", "0.51702106", "0.51370186", "0.51150584", "0.511015", "0.51001626", "0.50932074", "0.5055981", "0.5045501", "0.5045501", "0.5012976", "0.50062466", "0.50000286", "0.49973667", "0.49648178", "0.49474165", "0.49420714", "0.49360272", "0.49337858", "0.49161324", "0.49106798", "0.4906781", "0.4885013", "0.48822913", "0.48803517", "0.48464945", "0.48415798", "0.4830713", "0.48124355", "0.480202", "0.48000696", "0.47898906", "0.4788031", "0.4784652", "0.47772714", "0.47563845", "0.47559032", "0.47538066", "0.47491395", "0.47467265", "0.47428972", "0.47231987", "0.47153288", "0.4710382" ]
0.5984391
35
Register a Firebase Service. firebase.INTERNAL.registerService() TODO: Implement serviceProperties.
function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) { // Cannot re-register a service that already exists if (factories[name]) { error('duplicate-service', { name: name }); } // Capture the service factory for later service instantiation factories[name] = createService; // Capture the appHook, if passed if (appHook) { appHooks[name] = appHook; // Run the **new** app hook on all existing apps getApps().forEach(function (app) { appHook('create', app); }); } // The Service namespace is an accessor function ... var serviceNamespace = function serviceNamespace(appArg) { if (appArg === void 0) { appArg = app(); } if (typeof appArg[name] !== 'function') { // Invalid argument. // This happens in the following case: firebase.storage('gs:/') error('invalid-app-argument', { name: name }); } // Forward service instance lookup to the FirebaseApp. return appArg[name](); }; // ... and a container for service-level properties. if (serviceProperties !== undefined) { util.deepExtend(serviceNamespace, serviceProperties); } // Monkey-patch the serviceNamespace onto the firebase namespace namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype FirebaseAppImpl.prototype[name] = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var serviceFxn = this._getService.bind(this, name); return serviceFxn.apply(this, allowMultipleInstances ? args : []); }; return serviceNamespace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RegisterService() { }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n if (allowMultipleInstances === void 0) {\n allowMultipleInstances = false;\n } // Cannot re-register a service that already exists\n\n\n if (factories[name]) {\n throw ERROR_FACTORY.create(\"duplicate-service\"\n /* DUPLICATE_SERVICE */\n , {\n name: name\n });\n } // Capture the service factory for later service instantiation\n\n\n factories[name] = createService; // Capture the appHook, if passed\n\n if (appHook) {\n appHooks[name] = appHook; // Run the **new** app hook on all existing apps\n\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n } // The Service namespace is an accessor function ...\n\n\n function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.\n\n\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n } // Monkey-patch the serviceNamespace onto the firebase namespace\n\n\n namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n\n firebaseAppImpl.prototype[name] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, name);\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n\t // Cannot re-register a service that already exists\n\t if (factories[name]) {\n\t error('duplicate-service', { name: name });\n\t }\n\t // Capture the service factory for later service instantiation\n\t factories[name] = createService;\n\t // Capture the appHook, if passed\n\t if (appHook) {\n\t appHooks[name] = appHook;\n\t // Run the **new** app hook on all existing apps\n\t getApps().forEach(function (app) {\n\t appHook('create', app);\n\t });\n\t }\n\t // The Service namespace is an accessor function ...\n\t var serviceNamespace = function serviceNamespace(appArg) {\n\t if (appArg === void 0) {\n\t appArg = app();\n\t }\n\t if (typeof appArg[name] !== 'function') {\n\t // Invalid argument.\n\t // This happens in the following case: firebase.storage('gs:/')\n\t error('invalid-app-argument', { name: name });\n\t }\n\t // Forward service instance lookup to the FirebaseApp.\n\t return appArg[name]();\n\t };\n\t // ... and a container for service-level properties.\n\t if (serviceProperties !== undefined) {\n\t (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n\t }\n\t // Monkey-patch the serviceNamespace onto the firebase namespace\n\t namespace[name] = serviceNamespace;\n\t // Patch the FirebaseAppImpl prototype\n\t FirebaseAppImpl.prototype[name] = function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var serviceFxn = this._getService.bind(this, name);\n\t return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n\t };\n\t return serviceNamespace;\n\t }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n if (allowMultipleInstances === void 0) { allowMultipleInstances = false; }\r\n // If re-registering a service that already exists, return existing service\r\n if (factories[name]) {\r\n logger.debug(\"There were multiple attempts to register service \" + name + \".\");\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return namespace[name];\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n // @ts-ignore\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n // @ts-ignore\r\n firebaseAppImpl.prototype[name] =\r\n // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\r\n // option added to the no-explicit-any rule when ESlint releases it.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n if (allowMultipleInstances === void 0) { allowMultipleInstances = false; }\r\n // If re-registering a service that already exists, return existing service\r\n if (factories[name]) {\r\n logger.debug(\"There were multiple attempts to register service \" + name + \".\");\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return namespace[name];\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n // @ts-ignore\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n // @ts-ignore\r\n firebaseAppImpl.prototype[name] =\r\n // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\r\n // option added to the no-explicit-any rule when ESlint releases it.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function FirebaseService(firebase) {\n this._firebase = firebase;\n }", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function registerService(servicePath, cb) {\n var serviceId = uuid();\n var servicePath = [ servicePath, serviceId ].join('/');\n var data = self.serviceInstance.getData();\n\n data.id = serviceId;\n self.data = data;\n self.serviceInstance.data = data;\n\n self.client\n .getClient()\n .transaction()\n .create(servicePath, new Buffer(JSON.stringify(data)), null, CreateMode.EPHEMERAL)\n .commit(cb);\n }", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase$$1){firebase$$1.INTERNAL.registerService('firestore',function(app){return new index_esm_Firestore(app);},shallowCopy(firestoreNamespace));}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "register() {\n\t\tnavigator.serviceWorker\n\t\t\t.register(this.serviceWorkerPath, { scope: this.serviceWorkerScope })\n\t\t\t// .then(reg => console.log('Registration succeeded. Scope is ' + reg.scope)) //registration => registration.update())\n\t\t\t.catch(e => console.log('Registration failed with ' + e))\n\t}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) {\n return new Firestore(app);\n }, shallowCopy(firestoreNamespace));\n}", "function registerFirestore(instance){configureForFirebase(instance);}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"a\" /* Firestore */](app); }, Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"f\" /* shallowCopy */])(firestoreNamespace));\n}", "function FirebaseAuthService(firebase) {\n this._firebase = firebase;\n }", "registerService(entityName, service) {\n this.services[entityName.trim()] = service;\n }", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "function register(service) {\n {\n assert.isTrue(isObject$1(service), `Invalid service declaration, ${service}: service must be an object`);\n }\n\n for (let i = 0; i < hooks.length; ++i) {\n const hookName = hooks[i];\n\n if (hookName in service) {\n let l = Services[hookName];\n\n if (isUndefined(l)) {\n Services[hookName] = l = [];\n }\n\n ArrayPush.call(l, service[hookName]);\n }\n }\n }", "AddService(string, string) {\n\n }", "function setService(service) {\n // debug('setting service: %j', service);\n checkIdForCollision.call(service);\n if (serviceExists.call(this, service) && isOldService.call(this, service)) return debug('old service try to be set: %j : %j', service, this._services);\n if (!service.timestamp) service.timestamp = Date.now();\n var found = !! this._services[service.id];\n this._services[service.id] = service;\n // debug('service set: %j', this._services);\n if (!found) this.emit('register', service);\n}", "setService(value) {\n super.put(\"service\", value);\n }", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.1',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.2',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "addService(service_id, service){\n //Test if a service for the given ID was already registered.\n if (this.services.indexOf(service_id) !== -1) {\n this.services[service_id] = service;\n }else{\n throw new aux.BLE_Exception('Error, service with ID \"'+service_id+'\" already exits.');\n }\n }", "function registerWireService(registerService) {\n registerService(wireService);\n }", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\r\n var app = container.getProvider('app').getImmediate();\r\n return new Firestore(app, container.getProvider('auth-internal'));\r\n }, \"PUBLIC\" /* PUBLIC */).setServiceProps(shallowCopy(firestoreNamespace)));\r\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\n var app = container.getProvider('app').getImmediate();\n return new Firestore(app, container.getProvider('auth-internal'));\n }, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(shallowCopy(firestoreNamespace)));\n }", "function register(service) {\n\n for (let i = 0; i < hooks.length; ++i) {\n const hookName = hooks[i];\n\n if (hookName in service) {\n let l = Services[hookName];\n\n if (isUndefined$3(l)) {\n Services[hookName] = l = [];\n }\n\n ArrayPush$2.call(l, service[hookName]);\n }\n }\n }", "setFirebaseServiceAccount(firebaseServiceAccount) {\n this.firebaseServiceAccount = firebaseServiceAccount\n }", "function register(path = serviceWorkerPath, scope = '/') {\n return navigator.serviceWorker.register(path, { scope });\n}", "addService(service) {\n if (this.services.has(service.serviceName)) {\n throw Error('Service with name: ' + service.serviceName + ' already defined.');\n } else {\n this.services.set(service.serviceName, service);\n }\n return service;\n }", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function regService() {\n kony.application.showLoadingScreen(null, \"Loading..\", constants.LOADING_SCREEN_POSITION_ONLY_CENTER, true, true, {\n shouldShowLabelInBottom: \"false\",\n separatorHeight: 20\n });\n if (!mobileFabricConfigurationForReg.isKonySDKObjectInitialized) {\n initializeMobileFabricForRegister();\n } else if (mobileFabricConfigurationForReg.isKonySDKObjectInitialized) {\n registerVolunteer();\n }\n}", "function registerFirestore(instance) {\n Object(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function saveNameService(userAccount, nsAddress) {\n firebase.database().ref('users/' + userAccount + '/nameservice').push({\n address: nsAddress\n });\n}", "function put_name_service(username,name,service) {\n \n lookup_data.push({ username: current_user, name: name, service: service });\n \n}", "register() {\n\t\tthis.bindGateService();\n\t}", "initService() {\n\t\tthis.settings = new ServiceSettings();\n\t\tthis.service = new Service({\n\t\t\tonDisconnect: (hadError) => {\n\t\t\t\tthis.stopCancellableQueues(!!hadError, !!hadError);\n\t\t\t}\n\t\t});\n\t}", "set serviceProvider(serviceProvider) {\n\t\tthis._serviceProvider = new Reference(serviceProvider);\n\t}", "addService(intent,ip,port){\n //key should be unique for each service \n const key = intent;\n if(!this.service[key]){\n this.service[key]={};\n this.service[key].timestamp = Math.floor(new Date()/1000);\n this.service[key].ip=ip;\n this.service[key].intent=intent;\n this.service[key].port=port;\n console.log(`added service for intent: ${intent} for ip:${ip} and port: ${port} `);\n return;\n }\n this.service[key].timestamp = Math.floor(new Date()/1000);\n this.cleanUp();\n //console.log(this.service);\n //console.log(`updating the intent : ${intent} ip:${ip}`);\n }", "function mockFirebaseService() {\n\treturn new Promise(resolve => resolve(true));\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function customRegister(fnameString, lnameString, emailString, passwordString, cb)\n{\n\tvar ref = new Firebase(\"https://phoodbuddy.firebaseio.com\");\n\tref.createUser({\n\t\temail : emailString,\n\t\tpassword : passwordString\n\t}, function(error, userData) {\n\t\tif (error) {\n\t\t\tconsole.log(\"Error creating user:\", error);\n\t\t\tcb(false);\n\t\t} \n\t\telse \n\t\t{\n\n\t\t\tconsole.log(\"Successfully created user account with uid:\", userData);\n\t\t\tsetAccount(userData, fnameString, lnameString, emailString);\n\t\t\tcb(true);\n\t\t}\n\t});\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.8.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "constructor() { \n \n ServiceInstance.initialize(this);\n }", "constructor(service) {\n this.service = service;\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function initServices(){\n if ( OS_ANDROID ) {\n\n if (!Ti.Android.isServiceRunning(intentService)) {\n Ti.Android.startService(intentService);\n } else {\n Ti.API.info('Service is already running.');\n }\n } else {\n Ti.App.fireEvent('stopService');\n var service = Ti.App.iOS.registerBackgroundService({url:'drivingModeService.js'});\n }\n}", "async register_service_worker() {\n\n\t\t// Solicita la aceptación de notificaciones\n\t\tconst push_permission = (reg) => {\n\t\t\tif (Notification.permission == 'default' || navigator.serviceWorker.controller) this.sw_notification_permission(reg);\n\t\t}\n\n\t\t// Callback al recibir un mensaje desde el service worker\n\t\tconst on_message = (e) => {\n\t\t\t// console.log('[CLIENT] Message:', e);\n\t\t\tif (e.data.cache_clear != undefined) {\n\t\t\t\tlet event = new CustomEvent('clearcache', { detail: e.data.cache_clear });\n\t\t\t\tthis.body.dispatchEvent(event);\n\t\t\t}\n\n\t\t\tif (e.data.msg != undefined) {\n\t\t\t\tswitch (e.data.msg) {\n\t\t\t\t\tcase 'reload': location.reload(); break;\n\t\t\t\t\tdefault: this.app_version = e.data.msg; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tthis.worker = navigator.serviceWorker.register('/service-worker')\n\t\t.then(async (e) => { push_permission(e); return e; })\n\t\t.catch(err => console.error('[SW] Registering failed', err));\n\n\t\tnavigator.serviceWorker.addEventListener('message', (e) => on_message(e));\n\t\tnavigator.serviceWorker.ready.then(async (reg) => reg.active.postMessage({ lang: sw_lang }));\n\t}", "function register()\n{\n var sender_id = \"940463892411\";\n chrome.gcm.register([sender_id], registerResult);\n console.log(\"Registering with \" + sender_id);\n}", "function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.", "function startBackgroundService(data) {\n\t\n\tconsole.log(\"Starting FritsService in background\");\n\t\n\tif (data.ServiceRunning) {\n\t\t// OK\n\t\tif (data.TimerEnabled) {\n\t\t\t// OK\n\t\t} else {\n\t\t\tenableTimer();\n\t\t} \n\n\t} else { \n\t\tstartService();\n\t\tenableTimer();\n\t\t\n\t} \n\n\tif (data.RegisteredForBootStart) {\n\t\t// OK\n\t} else {\n\t\tregisterForBootStart();\n\t}\n\n\t//setBackgroundAlarm(null, \"Frits alarm!\", \"Tekst\");\n}", "function RegisterService(http) {\r\n this.http = http;\r\n //http: Http;\r\n //baseUrl = \"http://13.58.150.195:4300/\";\r\n //demo\r\n this.baseUrl = \"http://18.219.37.107:4300/\";\r\n }", "function AddVehicleService() {\n }", "async function register() {\n const service = {\n name: \"client\",\n host: \"localhost\",\n port: \"3001\",\n endpoints: [\n {\n method: 'GET',\n endpoint: '/order-list',\n parameters: []\n },\n {\n method: 'GET',\n endpoint: '/request-order',\n parameters: ['idrest', 'idmenu', 'dir', 'phone']\n },\n {\n method: 'GET',\n endpoint: '/state-restaurant',\n parameters: ['idpedido']\n },\n {\n method: 'GET',\n endpoint: '/state-delivery',\n parameters: ['idpedido']\n }\n ]\n }\n\n await fetch('http://localhost:3000/api/esb/add-service', {\n method: 'post',\n body: JSON.stringify(service),\n headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }\n })\n .then(res => {\n return res.json();\n })\n .then(json => {\n console.log(\"registered service\");\n });\n}", "setServices(services, callback) {\n let decodeUUID = (uuid, data) => {\n return new Promise((resolve, reject) => {\n const length = uuid.length === 32 ? 16 : 2;\n\n this._adapter.decodeUUID(length, uuid, (err, _uuid) => {\n if (err) {\n // If the UUID is not found it is a 128-bit UUID\n // so we have to add it to the SD and try again\n if (err.errno === this._bleDriver.NRF_ERROR_NOT_FOUND && length === 16) {\n this._adapter.addVendorspecificUUID(\n {uuid128: uuid},\n (err, type) => {\n if (err) {\n reject(_makeError(`Unable to add UUID ${uuid} to SoftDevice`, err));\n } else {\n this._adapter.decodeUUID(length, uuid, (err, _uuid) => {\n if (err) {\n reject(_makeError(`Unable to decode UUID ${uuid}`, err));\n } else {\n data.decoded_uuid = _uuid;\n resolve(data);\n }\n });\n }\n }\n );\n } else {\n reject(_makeError(`Unable to decode UUID ${uuid}`, err));\n }\n } else {\n data.decoded_uuid = _uuid;\n resolve(data);\n }\n });\n });\n };\n\n let addService = (service, type, data) => {\n return new Promise((resolve, reject) => {\n var p = Promise.resolve(data);\n var decode = decodeUUID.bind(undefined, service.uuid);\n\n p.then(decode).then(data => {\n this._adapter.gattsAddService(type, data.decoded_uuid, (err, serviceHandle) => {\n if (err) {\n reject(_makeError('Error occurred adding service.', err));\n } else {\n data.serviceHandle = serviceHandle;\n service.startHandle = serviceHandle;\n this._services[service.instanceId] = service; // TODO: what if we fail later on this service ?\n resolve(data);\n }\n });\n }).catch(err => {\n reject(err);\n });\n });\n };\n\n let addCharacteristic = (characteristic, data) => {\n return new Promise((resolve, reject) => {\n this._converter.characteristicToDriver(characteristic, (err, characteristicForDriver) => {\n if (err) {\n reject(_makeError('Error converting characteristic to driver.', err));\n } else {\n this._adapter.gattsAddCharacteristic(\n data.serviceHandle,\n characteristicForDriver.metadata,\n characteristicForDriver.attribute,\n (err, handles) => {\n if (err) {\n reject(_makeError('Error occurred adding characteristic.', err));\n } else {\n characteristic.valueHandle = data.characteristicHandle = handles.value_handle;\n characteristic.declarationHandle = characteristic.valueHandle - 1; // valueHandle is always directly after declarationHandle\n this._characteristics[characteristic.instanceId] = characteristic; // TODO: what if we fail later on this ?\n resolve(data);\n\n if (!characteristic._factory_descriptors) {\n return;\n }\n\n const findDescriptor = uuid => {\n return characteristic._factory_descriptors.find(descriptor => {\n return descriptor.uuid === uuid;\n });\n };\n\n if (handles.user_desc_handle) {\n const userDescriptionDescriptor = findDescriptor('2901');\n this._descriptors[userDescriptionDescriptor.instanceId] = userDescriptionDescriptor;\n userDescriptionDescriptor.handle = handles.user_desc_handle;\n }\n\n if (handles.cccd_handle) {\n const cccdDescriptor = findDescriptor('2902');\n this._descriptors[cccdDescriptor.instanceId] = cccdDescriptor;\n cccdDescriptor.handle = handles.cccd_handle;\n cccdDescriptor.value = {};\n\n for (let deviceInstanceId in this._devices) {\n this._setDescriptorValue(cccdDescriptor, [0, 0], deviceInstanceId);\n }\n }\n\n if (handles.sccd_handle) {\n const sccdDescriptor = findDescriptor('2903');\n this._descriptors[sccdDescriptor.instanceId] = sccdDescriptor;\n sccdDescriptor.handle = handles.sccd_handle;\n }\n }\n }\n );\n }\n });\n });\n };\n\n let addDescriptor = (descriptor, data) => {\n return new Promise((resolve, reject) => {\n this._converter.descriptorToDriver(descriptor, (err, descriptorForDriver) => {\n if (err) {\n reject(_makeError('Error converting descriptor.', err));\n } else if (descriptorForDriver) {\n this._adapter.gattsAddDescriptor(\n data.characteristicHandle,\n descriptorForDriver,\n (err, handle) => {\n if (err) {\n reject(_makeError(err, 'Error adding descriptor.'));\n } else {\n descriptor.handle = data.descriptorHandle = handle;\n this._descriptors[descriptor.instanceId] = descriptor; // TODO: what if we fail later on this ?\n resolve(data);\n }\n }\n );\n }\n });\n });\n };\n\n let promiseSequencer = (list, data) => {\n var p = Promise.resolve(data);\n return list.reduce((previousP, nextP) => {\n return previousP.then(nextP);\n }, p);\n };\n\n let applyGapServiceCharacteristics = gapService => {\n for (let characteristic of gapService._factory_characteristics) {\n // TODO: Fix Device Name uuid magic number\n if (characteristic.uuid === '2A00') {\n // TODO: At some point addon should accept string.\n this._setDeviceNameFromArray(characteristic.value, characteristic.writePerm, err => {\n if (!err) {\n characteristic.declarationHandle = 2;\n characteristic.valueHandle = 3;\n this._characteristics[characteristic.instanceId] = characteristic;\n }\n });\n }\n\n // TODO: Fix Appearance uuid magic number\n if (characteristic.uuid === '2A01') {\n this._setAppearanceFromArray(characteristic.value, err => {\n if (!err) {\n characteristic.declarationHandle = 4;\n characteristic.valueHandle = 5;\n this._characteristics[characteristic.instanceId] = characteristic;\n }\n });\n }\n\n // TODO: Fix Peripheral Preferred Connection Parameters uuid magic number\n if (characteristic.uuid === '2A04') {\n this._setPPCPFromArray(characteristic.value, err => {\n if (!err) {\n characteristic.declarationHandle = 6;\n characteristic.valueHandle = 7;\n this._characteristics[characteristic.instanceId] = characteristic;\n }\n });\n }\n }\n };\n\n // Create array of function objects to call in sequence.\n var promises = [];\n\n for (let service of services) {\n var p;\n\n if (service.uuid === '1800') {\n service.startHandle = 1;\n service.endHandle = 7;\n applyGapServiceCharacteristics(service);\n this._services[service.instanceId] = service;\n continue;\n } else if (service.uuid === '1801') {\n service.startHandle = 8;\n service.endHandle = 8;\n this._services[service.instanceId] = service;\n continue;\n }\n\n p = addService.bind(undefined, service, this._getServiceType(service));\n promises.push(p);\n\n if (service._factory_characteristics) {\n for (let characteristic of service._factory_characteristics) {\n p = addCharacteristic.bind(undefined, characteristic);\n promises.push(p);\n\n if (characteristic._factory_descriptors) {\n for (let descriptor of characteristic._factory_descriptors) {\n if (!this._converter.isSpecialUUID(descriptor.uuid)) {\n p = addDescriptor.bind(undefined, descriptor);\n promises.push(p);\n }\n }\n }\n }\n }\n }\n\n // Execute the promises in sequence, start with an empty object that\n // is propagated to all promises.\n promiseSequencer(promises, {}).then(data => {\n // TODO: Ierate over all servicses, descriptors, characterstics from parameter services\n if (callback) { callback(); }\n }).catch(err => {\n this.emit('error', err);\n if (callback) { callback(err); }\n });\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.8.3',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if ((typeof rawConfig === 'undefined' ? 'undefined' : _typeof(rawConfig)) !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) {\n return __WEBPACK_IMPORTED_MODULE_5__src_core_RepoManager__[\"a\" /* RepoManager */].getInstance().databaseFromApp(app, url);\n },\n // firebase.database namespace properties\n {\n Reference: __WEBPACK_IMPORTED_MODULE_3__src_api_Reference__[\"a\" /* Reference */],\n Query: __WEBPACK_IMPORTED_MODULE_2__src_api_Query__[\"a\" /* Query */],\n Database: __WEBPACK_IMPORTED_MODULE_1__src_api_Database__[\"a\" /* Database */],\n enableLogging: __WEBPACK_IMPORTED_MODULE_4__src_core_util_util__[\"a\" /* enableLogging */],\n INTERNAL: __WEBPACK_IMPORTED_MODULE_6__src_api_internal__,\n ServerValue: __WEBPACK_IMPORTED_MODULE_1__src_api_Database__[\"a\" /* Database */].ServerValue,\n TEST_ACCESS: __WEBPACK_IMPORTED_MODULE_7__src_api_test_access__\n }, null, true);\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__firebase_util__[\"a\" /* isNodeSdk */])()) {\n module.exports = namespace;\n }\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.9.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.9.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.5.0',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.0.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function registerServiceWorker() {\r\n return navigator.serviceWorker.register('service-worker.js')\r\n .then(function () {\r\n return navigator.serviceWorker.ready;\r\n })\r\n .then(function (registration) {\r\n registerWithPushManager(registration)\r\n .then((pushSubscription) => {\r\n sendSubscriptionToServer(username.value, pushSubscription)\r\n .then((response) => {\r\n return response.json();\r\n })\r\n .then((responseJson) => {\r\n var formContainer = document.getElementById(\"formContainer\");\r\n if (responseJson.data && responseJson.data.success) {\r\n formContainer.innerHTML = `\r\n <p>You're all set! You'll receive High Fidelity Ping\r\n notifications on this device wherever you normally receive browser notifications.</p>\r\n `;\r\n } else {\r\n formContainer.innerHTML = `\r\n <p>There was an error during registration. Please try again later.</p>\r\n `;\r\n }\r\n })\r\n })\r\n })\r\n .catch(function (err) {\r\n console.error('Unable to register service worker.', err);\r\n });\r\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.0.4',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!index_esm_contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', index_esm_FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (index_esm_contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new index_esm_FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function consulRegister(fullSvcName, svcAddress, svcPort, svcTags, svcId) {\n return new Promise((resolve, reject) => {\n /*\n Options\n ========================================================================\n name (String): service name\n port (Integer, optional): service port\n \n id (String, optional): service ID\n tags (String[], optional): service tags\n address (String, optional): service IP address\n check (Object, optional): service check\n http (String): URL endpoint, requires interval\n tcp (String): host:port to test, passes if connection is established, fails otherwise\n script (String): path to check script, requires interval\n dockercontainerid (String, optional): Docker container ID to run script\n shell (String, optional): shell in which to run script (currently only supported with Docker)\n interval (String): interval to run check, requires script (ex: 15s)\n timeout (String, optional): timeout for the check (ex: 10s)\n ttl (String): time to live before check must be updated, instead of http/tcp/script and interval (ex: 60s)\n notes (String, optional): human readable description of check\n status (String, optional): initial service status\n deregistercriticalserviceafter (String, optional, Consul 0.7+): timeout after which to automatically deregister service if check remains in critical state\n checks (Object[], optional): service checks (see check above)\n */\n var adapters = require('os').networkInterfaces();\n var svcName = fullSvcName;\n // remove things appended by docker swarm \n var inv1 = svcName.indexOf(\"_\");\n if (inv1 > -1) {\n svcName = svcName.substring(0, inv1);\n }\n var inv2 = svcName.indexOf(\".\");\n if (inv2 > -1) {\n svcName = svcName.substring(0, inv2);\n }\n consul.agent.service.register({\n id: svcId,\n name: svcName,\n port: parseInt(svcPort),\n address: svcAddress,\n tags: ['id:' + svcId, 'ip:' + svcAddress, 'port:' + svcPort],\n // register health check (port 1 above regular port of the service - our convention)\n check: {\n http: \"http://\" + svcAddress + \":\" + (parseInt(svcPort) + 1) + \"/health\",\n interval: \"10s\",\n timeout: \"1s\"\n }\n }, function (err) {\n if (err) {\n reject(err);\n return;\n }\n logger_1.logger.info(\"REGISTERED \" + svcName + \" at \" + svcAddress + \":\" + svcPort + \" as #\" + svcId);\n resolve();\n });\n });\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.9',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "register(email, password){\n firebaseApp.auth().createUserWithEmailAndPassword(email, password)\n .catch(function (err) {\n console.log(err)\n });\n }", "register(base, component, resolver) {\n if (!(typeof component === \"object\")) {\n throw new Error(\"Service can not be registered as a class. It must be a object.\");\n }\n let unit = new Unit(base.name, resolver);\n let typeMap = this.components.get(unit.type);\n if (!typeMap) {\n typeMap = new Map();\n }\n this.components.set(unit.type, typeMap);\n typeMap.set(unit.resolver, component);\n return true;\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '${JSCORE_VERSION}',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"J\" /* createSubscribe */],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"K\" /* ErrorFactory */],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "async _createBridge(serviceName, serviceInfo) {\n try {\n // avoid duplication\n if (this._bridges[serviceName] &&\n this._bridges[serviceName].$creationTimestamp >= serviceInfo.creationTimestamp) {\n this.logger.warn('avoided duplicate registration for service [%s]', serviceName)\n return\n } else if (this._bridges[serviceName]) {\n this.logger.warn('duplicate service [%s] will be overwritten', serviceName)\n this._cleanUpBridges(serviceName)\n }\n\n // check API\n await this._gateway._waitForServiceAPI(serviceName)\n\n // ...when done, creates new unified service bridge\n let isRemote = true\n this._bridges[serviceName] = new Service(this._io, serviceInfo, isRemote)\n // IIOS gateway injection in each servic for inter-services calls\n this._bridges[serviceName].$gateway = this._gateway\n\n // inject creation timestamp property for further checks\n this._bridges[serviceName].$creationTimestamp = serviceInfo.creationTimestamp\n\n for (let method of serviceInfo.methods) {\n // create method call bridge in a standard way: no additional processing\n this._bridges[serviceName]\n ._addMethod(method, this._gateway.api[serviceName][method])\n }\n\n // register full service as a gateway bridged object\n this._bridges[serviceName]._register()\n\n this.logger.info('api gateway service [%s] registered new service [%s] with service gateway [%s]',\n this.uuid, serviceName, this._gateway.uuid)\n } catch (err) {\n this.logger.error(err, 'failed to create bridge for service [%s]',\n serviceName)\n }\n }", "function install (Vue, options) {\n console.error('Docservice.install()', options)\n if (_docservice) {\n console.error(\"Vue.use(Docservice) has already been called.\")\n return\n }\n let tmpvue = new Vue()\n let $content = tmpvue.$content\n if ( !$content) {\n console.error(\"$content not defined. Please register ContentService before calling Vue.use(Docservice).\")\n return\n }\n\n // _Vue = Vue\n\n // Create ourselves a Docservice Object\n _docservice = new Docservice(options)\n\n // const isDef = v => v !== undefined\n\n // Vue.mixin adds an additional 'beforeCreate' function to it's\n // list of functions to be called when new Vue is created. We'll\n // use it to look for new Vue({ Docservice }). If found, we'll\n // consider this to be the root. If it is not found, then we will\n // assume this is a child of the root, and create pointers back\n // to the root.\n //Vue.mixin({\n Vue.mixin({\n beforeCreate () {\n // console.log('vue-docservice: index.js - beforeCreate()')\n\n if (!this.$parent) {\n //if (isDef(this.$options.docservice)) {\n // console.error('Initializing ROOT *********')\n // This must be the root, since we found docservice in it's options.\n this._docserviceRoot = this\n this._docservice = _docservice\n // this._docservice.init(this)\n Vue.util.defineReactive(this, '_docservice', this.$docservice)\n // Vue.util.defineReactive(this, '_docservice', this._docservice.jwt)\n // Vue.util.defineReactive(this, '_docservice', this._docservice.fromCache)\n } else {\n //console.log('Initialise new child')\n this._docserviceRoot = this.$parent._docserviceRoot\n }\n },\n destroyed () {\n // registerInstance(this)\n }\n })\n\n // As described above, the Vue instances form a hierachy. The mixin\n // above ensures that each instance has an '_docserviceRoot' field\n // that points to the instance where 'docservice' was passed to new Vue({ }).\n // Note that it's _docserviceRoot might actually point to itself.\n Object.defineProperty(Vue.prototype, '$docservice', {\n get () { return this._docserviceRoot._docservice }\n })\n\n\n /*\n * Register our components with Contentservice\n */\n\n // Google Slides Widget\n $content.registerWidget(Vue, {\n name: 'google-slides',\n label: 'Slides',\n category: 'Google Docs',\n iconClass: 'fa fa-file-powerpoint-o',\n iconClass5: 'far fa-file-powerpoint',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-slides',\n component: ContentGoogleSlides,\n propertyComponent: ContentGoogleSlidesProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-slides',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n\n // Google Sheets Widget\n $content.registerWidget(Vue, {\n name: 'google-sheets',\n label: 'Sheets',\n category: 'Google Docs',\n iconClass: 'fa fa-file-excel-o',\n iconClass5: 'far fa-file-excel',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-sheets',\n component: ContentGoogleSheets,\n propertyComponent: ContentGoogleSheetsProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-sheets',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n\n // Google Doc Widget\n $content.registerWidget(Vue, {\n name: 'google-docs',\n label: 'Doc',\n category: 'Google Docs',\n iconClass: 'fa fa-file-word-o',\n iconClass5: 'far fa-file-word',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-docs',\n component: ContentGoogleDocs,\n propertyComponent: ContentGoogleDocsProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-docs',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n // $content.registerLayoutType(Vue, 'google-slides', 'content-google-slides', ContentGoogleSlides, ContentGoogleSlidesProps)\n // $content.registerLayoutType(Vue, 'google-sheets', 'content-google-sheets', ContentGoogleSheets, ContentGoogleSheetsProps)\n // $content.registerLayoutType(Vue, 'google-docs', 'content-google-docs', ContentGoogleDocs, ContentGoogleDocsProps)\n\n\n // Initialise the store\n Vue.use(Vuex)\n let store = new Vuex.Store(DocserviceStore);\n _docservice.store = store\n console.log(`YARP docservice has a new store`, store);\n\n return _docservice\n} //- install()", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function Service() {\n\t\t_classCallCheck(this, Service);\n\t}", "function ApiServiceRegistry() {\n\t }", "function registerServiceWorker(){\n return navigator.serviceWorker.register(\"./service-worker.js\")\n .then(response => {\n console.log(\"Service Worker Succesfully added\");\n })\n .catch(error => console.log(error));\n}" ]
[ "0.7038455", "0.7001225", "0.7001225", "0.6969678", "0.6955652", "0.6955286", "0.6955286", "0.69436747", "0.6939398", "0.6939398", "0.6939398", "0.69334453", "0.69334453", "0.69001436", "0.6895383", "0.6895383", "0.6863721", "0.68226594", "0.68226594", "0.657825", "0.63509023", "0.63509023", "0.6327452", "0.624053", "0.624053", "0.62130564", "0.6197698", "0.6103614", "0.60286427", "0.5995633", "0.59789765", "0.5971144", "0.5948101", "0.5869482", "0.5869482", "0.57586", "0.5747657", "0.57113916", "0.56984156", "0.5685097", "0.5685097", "0.5685097", "0.56726843", "0.56659424", "0.5605822", "0.5591634", "0.55708474", "0.5515569", "0.5512347", "0.5483518", "0.5471564", "0.5466797", "0.541277", "0.541277", "0.5398015", "0.5385677", "0.5350107", "0.5324794", "0.526098", "0.5227429", "0.51888245", "0.5126038", "0.5105303", "0.51007485", "0.51007485", "0.5087593", "0.5074537", "0.5067104", "0.5065691", "0.50616527", "0.50609696", "0.5045299", "0.5027546", "0.50188595", "0.5016883", "0.50128394", "0.5000744", "0.50002414", "0.49771887", "0.4958627", "0.49582827", "0.49550742", "0.49514642", "0.49327967", "0.49319172", "0.49289307", "0.49279854", "0.49231958", "0.4922946", "0.49198747", "0.49198464", "0.49192676", "0.49182522", "0.49182156", "0.49159238", "0.49149263", "0.49149263", "0.4906063", "0.48990342", "0.48909426" ]
0.68870986
16
Patch the toplevel firebase namespace with additional properties. firebase.INTERNAL.extendNamespace()
function extendNamespace(props) { util.deepExtend(namespace, props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extendNamespace(props) {\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\r\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(namespace, props);\r\n }", "function extendNamespace(props) {\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(namespace, props);\n }", "function extendNamespace(props) {\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(namespace, props);\n }", "function extendNamespace(props) {\r\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[/* deepExtend */ \"k\"])(namespace, props);\r\n }", "function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }", "function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(namespace, props);\n }", "function extendNamespace(props) {\n\t (0, _deep_copy.deepExtend)(namespace, props);\n\t }", "function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }", "function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }", "function extendNamespace(props) {\n deepExtend(namespace, props);\n }", "function extendNamespace(props) {\n deepExtend(namespace, props);\n }", "function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }", "function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.0.4',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!index_esm_contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', index_esm_FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (index_esm_contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new index_esm_FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.9.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function extend( ns, ns_string ) {\n var parts = ns_string.split('.'),\n parent = ns,\n pl, i;\n if (parts[0] == \"modaEap\") {\n parts = parts.slice(1);\n }\n pl = parts.length;\n for (i = 0; i < pl; i++) {\n //create a property if it doesnt exist\n if (typeof parent[parts[i]] == 'undefined') {\n parent[parts[i]] = {};\n }\n parent = parent[parts[i]];\n }\n return parent;\n}", "function namespace__(){this.namespace_=( joo.MemberDeclaration.NAMESPACE_INTERNAL);}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.8.3',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if ((typeof rawConfig === 'undefined' ? 'undefined' : _typeof(rawConfig)) !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.0.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.5.0',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __esModule: true,\r\n initializeApp: initializeApp,\r\n app: app,\r\n apps: null,\r\n Promise: Promise,\r\n SDK_VERSION: '5.9.4',\r\n INTERNAL: {\r\n registerService: registerService,\r\n createFirebaseNamespace: createFirebaseNamespace,\r\n extendNamespace: extendNamespace,\r\n createSubscribe: util.createSubscribe,\r\n ErrorFactory: util.ErrorFactory,\r\n removeApp: removeApp,\r\n factories: factories,\r\n useAsService: useAsService,\r\n Promise: Promise,\r\n deepExtend: util.deepExtend\r\n }\r\n };\r\n // Inject a circular default export to allow Babel users who were previously\r\n // using:\r\n //\r\n // import firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase').default;\r\n //\r\n // instead of\r\n //\r\n // import * as firebase from 'firebase';\r\n // which becomes: var firebase = require('firebase');\r\n util.patchProperty(namespace, 'default', namespace);\r\n // firebase.apps is a read-only getter.\r\n Object.defineProperty(namespace, 'apps', {\r\n get: getApps\r\n });\r\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\r\n function removeApp(name) {\r\n var app = apps_[name];\r\n callAppHooks(app, 'delete');\r\n delete apps_[name];\r\n }\r\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\r\n function app(name) {\r\n name = name || DEFAULT_ENTRY_NAME;\r\n if (!contains(apps_, name)) {\r\n error('no-app', { name: name });\r\n }\r\n return apps_[name];\r\n }\r\n util.patchProperty(app, 'App', FirebaseAppImpl);\r\n function initializeApp(options, rawConfig) {\r\n if (rawConfig === void 0) { rawConfig = {}; }\r\n if (typeof rawConfig !== 'object' || rawConfig === null) {\r\n var name_1 = rawConfig;\r\n rawConfig = { name: name_1 };\r\n }\r\n var config = rawConfig;\r\n if (config.name === undefined) {\r\n config.name = DEFAULT_ENTRY_NAME;\r\n }\r\n var name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n error('bad-app-name', { name: name + '' });\r\n }\r\n if (contains(apps_, name)) {\r\n error('duplicate-app', { name: name });\r\n }\r\n var app = new FirebaseAppImpl(options, config, namespace);\r\n apps_[name] = app;\r\n callAppHooks(app, 'create');\r\n return app;\r\n }\r\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\r\n function getApps() {\r\n // Make a copy so caller cannot mutate the apps list.\r\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\r\n }\r\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\r\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }\r\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\r\n function extendNamespace(props) {\r\n util.deepExtend(namespace, props);\r\n }\r\n function callAppHooks(app, eventName) {\r\n Object.keys(factories).forEach(function (serviceName) {\r\n // Ignore virtual services\r\n var factoryName = useAsService(app, serviceName);\r\n if (factoryName === null) {\r\n return;\r\n }\r\n if (appHooks[factoryName]) {\r\n appHooks[factoryName](eventName, app);\r\n }\r\n });\r\n }\r\n // Map the requested service to a registered service name\r\n // (used to map auth to serverAuth service when needed).\r\n function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }\r\n return namespace;\r\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.9',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: _promise.PromiseImpl,\n SDK_VERSION: '4.3.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: _subscribe.createSubscribe,\n ErrorFactory: _errors.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: _promise.PromiseImpl,\n deepExtend: _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.2',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.8.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.1',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n\t var apps_ = {};\n\t var factories = {};\n\t var appHooks = {};\n\t // A namespace is a plain JavaScript Object.\n\t var namespace = {\n\t // Hack to prevent Babel from modifying the object returned\n\t // as the firebase namespace.\n\t __esModule: true,\n\t initializeApp: initializeApp,\n\t app: app,\n\t apps: null,\n\t Promise: _promise.PromiseImpl,\n\t SDK_VERSION: '4.4.0',\n\t INTERNAL: {\n\t registerService: registerService,\n\t createFirebaseNamespace: createFirebaseNamespace,\n\t extendNamespace: extendNamespace,\n\t createSubscribe: _subscribe.createSubscribe,\n\t ErrorFactory: _errors.ErrorFactory,\n\t removeApp: removeApp,\n\t factories: factories,\n\t useAsService: useAsService,\n\t Promise: _promise.PromiseImpl,\n\t deepExtend: _deep_copy.deepExtend\n\t }\n\t };\n\t // Inject a circular default export to allow Babel users who were previously\n\t // using:\n\t //\n\t // import firebase from 'firebase';\n\t // which becomes: var firebase = require('firebase').default;\n\t //\n\t // instead of\n\t //\n\t // import * as firebase from 'firebase';\n\t // which becomes: var firebase = require('firebase');\n\t (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n\t // firebase.apps is a read-only getter.\n\t Object.defineProperty(namespace, 'apps', {\n\t get: getApps\n\t });\n\t /**\n\t * Called by App.delete() - but before any services associated with the App\n\t * are deleted.\n\t */\n\t function removeApp(name) {\n\t var app = apps_[name];\n\t callAppHooks(app, 'delete');\n\t delete apps_[name];\n\t }\n\t /**\n\t * Get the App object for a given name (or DEFAULT).\n\t */\n\t function app(name) {\n\t name = name || DEFAULT_ENTRY_NAME;\n\t if (!contains(apps_, name)) {\n\t error('no-app', { name: name });\n\t }\n\t return apps_[name];\n\t }\n\t (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);\n\t /**\n\t * Create a new App instance (name must be unique).\n\t */\n\t function initializeApp(options, name) {\n\t if (name === undefined) {\n\t name = DEFAULT_ENTRY_NAME;\n\t } else {\n\t if (typeof name !== 'string' || name === '') {\n\t error('bad-app-name', { name: name + '' });\n\t }\n\t }\n\t if (contains(apps_, name)) {\n\t error('duplicate-app', { name: name });\n\t }\n\t var app = new FirebaseAppImpl(options, name, namespace);\n\t apps_[name] = app;\n\t callAppHooks(app, 'create');\n\t return app;\n\t }\n\t /*\n\t * Return an array of all the non-deleted FirebaseApps.\n\t */\n\t function getApps() {\n\t // Make a copy so caller cannot mutate the apps list.\n\t return Object.keys(apps_).map(function (name) {\n\t return apps_[name];\n\t });\n\t }\n\t /*\n\t * Register a Firebase Service.\n\t *\n\t * firebase.INTERNAL.registerService()\n\t *\n\t * TODO: Implement serviceProperties.\n\t */\n\t function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n\t // Cannot re-register a service that already exists\n\t if (factories[name]) {\n\t error('duplicate-service', { name: name });\n\t }\n\t // Capture the service factory for later service instantiation\n\t factories[name] = createService;\n\t // Capture the appHook, if passed\n\t if (appHook) {\n\t appHooks[name] = appHook;\n\t // Run the **new** app hook on all existing apps\n\t getApps().forEach(function (app) {\n\t appHook('create', app);\n\t });\n\t }\n\t // The Service namespace is an accessor function ...\n\t var serviceNamespace = function serviceNamespace(appArg) {\n\t if (appArg === void 0) {\n\t appArg = app();\n\t }\n\t if (typeof appArg[name] !== 'function') {\n\t // Invalid argument.\n\t // This happens in the following case: firebase.storage('gs:/')\n\t error('invalid-app-argument', { name: name });\n\t }\n\t // Forward service instance lookup to the FirebaseApp.\n\t return appArg[name]();\n\t };\n\t // ... and a container for service-level properties.\n\t if (serviceProperties !== undefined) {\n\t (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n\t }\n\t // Monkey-patch the serviceNamespace onto the firebase namespace\n\t namespace[name] = serviceNamespace;\n\t // Patch the FirebaseAppImpl prototype\n\t FirebaseAppImpl.prototype[name] = function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var serviceFxn = this._getService.bind(this, name);\n\t return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n\t };\n\t return serviceNamespace;\n\t }\n\t /**\n\t * Patch the top-level firebase namespace with additional properties.\n\t *\n\t * firebase.INTERNAL.extendNamespace()\n\t */\n\t function extendNamespace(props) {\n\t (0, _deep_copy.deepExtend)(namespace, props);\n\t }\n\t function callAppHooks(app, eventName) {\n\t Object.keys(factories).forEach(function (serviceName) {\n\t // Ignore virtual services\n\t var factoryName = useAsService(app, serviceName);\n\t if (factoryName === null) {\n\t return;\n\t }\n\t if (appHooks[factoryName]) {\n\t appHooks[factoryName](eventName, app);\n\t }\n\t });\n\t }\n\t // Map the requested service to a registered service name\n\t // (used to map auth to serverAuth service when needed).\n\t function useAsService(app, name) {\n\t if (name === 'serverAuth') {\n\t return null;\n\t }\n\t var useService = name;\n\t var options = app.options;\n\t return useService;\n\t }\n\t return namespace;\n\t}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '${JSCORE_VERSION}',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"J\" /* createSubscribe */],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"K\" /* ErrorFactory */],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"L\" /* patchProperty */])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function extend( ns, ns_string ) { \n var parts = ns_string.split('.'), \n parent = ns, \n pl, i; \n if (parts[0] == \"CALC\") { \n parts = parts.slice(1); \n } \n pl = parts.length; \n for (i = 0; i < pl; i++) { \n //create a property if it doesnt exist \n if (typeof parent[parts[i]] == 'undefined') { \n parent[parts[i]] = {}; \n } \n parent = parent[parts[i]]; \n } \n return parent; \n }", "function createFirebaseNamespaceCore(firebaseAppImpl) {\n var apps = {};\n var factories = {};\n var appHooks = {}; // A namespace is a plain JavaScript Object.\n\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n // @ts-ignore\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n SDK_VERSION: version,\n INTERNAL: {\n registerService: registerService,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService\n }\n }; // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n\n util.patchProperty(namespace, 'default', namespace); // firebase.apps is a read-only getter.\n\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n\n function removeApp(name) {\n var app = apps[name];\n callAppHooks(app, 'delete');\n delete apps[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n\n\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n name: name\n });\n }\n\n return apps[name];\n }\n\n util.patchProperty(app, 'App', firebaseAppImpl);\n\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = {\n name: name_1\n };\n }\n\n var config = rawConfig;\n\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n\n var name = config.name;\n\n if (typeof name !== 'string' || !name) {\n throw ERROR_FACTORY.create(\"bad-app-name\"\n /* BAD_APP_NAME */\n , {\n name: String(name)\n });\n }\n\n if (contains(apps, name)) {\n throw ERROR_FACTORY.create(\"duplicate-app\"\n /* DUPLICATE_APP */\n , {\n name: name\n });\n }\n\n var app = new firebaseAppImpl(options, config, namespace);\n apps[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n\n\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n\n\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n if (allowMultipleInstances === void 0) {\n allowMultipleInstances = false;\n } // Cannot re-register a service that already exists\n\n\n if (factories[name]) {\n throw ERROR_FACTORY.create(\"duplicate-service\"\n /* DUPLICATE_SERVICE */\n , {\n name: name\n });\n } // Capture the service factory for later service instantiation\n\n\n factories[name] = createService; // Capture the appHook, if passed\n\n if (appHook) {\n appHooks[name] = appHook; // Run the **new** app hook on all existing apps\n\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n } // The Service namespace is an accessor function ...\n\n\n function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.\n\n\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n } // Monkey-patch the serviceNamespace onto the firebase namespace\n\n\n namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n\n firebaseAppImpl.prototype[name] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, name);\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n\n return serviceNamespace;\n }\n\n function callAppHooks(app, eventName) {\n for (var _i = 0, _a = Object.keys(factories); _i < _a.length; _i++) {\n var serviceName = _a[_i]; // Ignore virtual services\n\n var factoryName = useAsService(app, serviceName);\n\n if (factoryName === null) {\n return;\n }\n\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n }\n } // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n\n\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }\n\n return namespace;\n}", "updateCurrentAccountNS() {\n // Get current account\n let acct = this.formData.isMultisig ? this.formData.multisigAccount.address : this._Wallet.currentAccount.address;\n // Set current account namespace names if not undefined in DataStore service\n if (undefined !== this._DataStore.namespace.ownedBy[acct]) {\n this.namespaceOwned = this._DataStore.namespace.ownedBy[acct];\n this.formData.namespaceParent = this.namespaceOwned[Object.keys(this.namespaceOwned)[0]];\n this.selectNamespace();\n } else {\n this.namespaceOwned = {};\n this.formData.namespaceParent = \"\";\n }\n }", "function namespace(ns) {\n 'use strict';\n \n if (namespaces.indexOf(ns) === -1) {\n var segments = ns.split(\".\").reverse(),\n /*\n Inner recursive function to add a new object if not defined\n */\n createSegment = function (segments, currentSegment) {\n if (segments.length === 0) {\n return;\n }\n var segment = segments.pop();\n // prevent overwriting of existing segment\n if(currentSegment[segment] === undefined) {\n currentSegment[segment] = {};\n }\n createSegment(segments, currentSegment[segment]);\n };\n namespaces.push(ns);\n createSegment(segments, window);\n }\n}", "function extendAPI(namespace, publicAPIName , arrOperations){\n var nme = namespace.name + '.' + publicAPIName;\n\n extend(namespace, nme);\n\n var operations = arrOperations;\n var conc = [];\n\n for(var k = 0; k < arrOperations.length; k++){\n conc.push(nme + '.' + arrOperations[k]);\n extend(namespace, conc[k]);\n }\n }", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "namespace (...namespaces) {\n const sub = new ConfigGetter()\n sub[PROTECTED_SET_TARGET](this._chain)\n sub[PROTECTED_SET_PATHS](['config', ...namespaces])\n\n return sub\n }", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase.default._unStub) {\n var originalSet = _firebase.default.database.Reference.prototype.set;\n var originalUpdate = _firebase.default.database.Reference.prototype.update;\n var originalRemove = _firebase.default.database.Reference.prototype.remove;\n\n _firebase.default._unStub = function () {\n _firebase.default.database.Reference.prototype.set = originalSet;\n _firebase.default.database.Reference.prototype.update = originalUpdate;\n _firebase.default.database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase.default.database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase.default.database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase.default.database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n var originalSet = _firebase['default'].database.Reference.prototype.set;\n var originalUpdate = _firebase['default'].database.Reference.prototype.update;\n var originalRemove = _firebase['default'].database.Reference.prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].database.Reference.prototype.set = originalSet;\n _firebase['default'].database.Reference.prototype.update = originalUpdate;\n _firebase['default'].database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase['default'].database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function stubFirebase() {\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n var originalSet = _firebase['default'].database.Reference.prototype.set;\n var originalUpdate = _firebase['default'].database.Reference.prototype.update;\n var originalRemove = _firebase['default'].database.Reference.prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].database.Reference.prototype.set = originalSet;\n _firebase['default'].database.Reference.prototype.update = originalUpdate;\n _firebase['default'].database.Reference.prototype.remove = originalRemove;\n };\n\n _firebase['default'].database.Reference.prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].database.Reference.prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "function ensureNamespace(namespace){\n var current = exports;\n namespace.split('.').forEach(function(name){\n if(typeof current[name] === 'undefined'){\n current[name] = {};\n }\n current = current[name];\n });\n }", "static get localizeNamespaces() {}", "function _registerLegacyAPIs() {\n context.foundation = {\n makeLogger,\n startWorkers,\n getConnection,\n getEventEmitter: getSystemEvents\n };\n }", "create_namespace(dotted_name, value) {\n let parent = this;\n let parts = dotted_name.split('.');\n parts.forEach((part, i) => {\n if (parent[part] === undefined) {\n if (i === parts.length - 1 && value !== undefined) {\n parent[part] = value;\n } else {\n parent[part] = {};\n }\n }\n parent = parent[part];\n });\n return parent;\n }", "function registerNS(ns) {\r\n var nsParts = ns.split(\".\");\r\n var root = window;\r\n\r\n for (var i = 0; i < nsParts.length; i++) {\r\n if(typeof root[nsParts[i]] == \"undefined\"){\r\n root[nsParts[i]] = new Object();\r\n }\r\n root = root[nsParts[i]];\r\n }\r\n}", "function stubFirebase() {\n\n // check for existing stubbing\n if (!_firebase['default']._unStub) {\n\n var originalSet = _firebase['default'].prototype.set;\n var originalUpdate = _firebase['default'].prototype.update;\n var originalRemove = _firebase['default'].prototype.remove;\n\n _firebase['default']._unStub = function () {\n _firebase['default'].prototype.set = originalSet;\n _firebase['default'].prototype.update = originalUpdate;\n _firebase['default'].prototype.remove = originalRemove;\n };\n\n _firebase['default'].prototype.set = function (data, cb) {\n originalSet.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].prototype.update = function (data, cb) {\n originalUpdate.call(this, data);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n\n _firebase['default'].prototype.remove = function (cb) {\n originalRemove.call(this);\n if (typeof cb === 'function') {\n setTimeout(cb, 0);\n }\n };\n }\n }", "set(structure) {\r\n if (structure.name != null && structure.name !== \"global\")\r\n addNamespaceKeywordIfNecessary(this);\r\n callBaseSet_1.callBaseSet(exports.NamespaceDeclarationBase.prototype, this, structure);\r\n if (structure.declarationKind != null)\r\n this.setDeclarationKind(structure.declarationKind);\r\n return this;\r\n }", "function Namespaces() {\n this.nsByPfx = new Object();\n this.pfxByNs = new Object();\n this.index = 0;\n}", "function extend(base)\r\n{\r\n /* save base properies/methods, to use in our methods */\r\n $super = base;\r\n\r\n /* merge and overwrite base module attributes */\r\n return (Object.assign({}, base, devSpecific));\r\n}", "function Namespace(inheritedNamespace) { \n function Namespace() {}; \n Namespace.prototype = inheritedNamespace; \n return new Namespace(); \n}", "function configureForFirebase(firebase$$1){firebase$$1.INTERNAL.registerService('firestore',function(app){return new index_esm_Firestore(app);},shallowCopy(firestoreNamespace));}", "function extend(base)\r\n{\r\n $super = base;\r\n devSpecific.config = devSpecific.config.concat(base.config);\r\n return Object.assign({}, base, devSpecific);\r\n}", "addNamespaceBinding(importer, name) {\n\t\timporter[name] = this.snapshot();\n\t}", "function NamespaceContext(){\n this.ns = null; //full namespace string e.g. www.bond.co.uk/jsocs/something\n this.type_ = {}; //e.g. type_[mytype] types referenceable by rulesets in this or parent context\n //this.rootRuleSet = null; //tree of RuleSets NOT USED?\n this.ns_ = {}; //e.g. ns_[prefix] = {other ns context} other namespace rules this context references\n}", "function getNamespace (namespace) {\n let namespaces = namespace.split(\".\");\n let parent = chrome;\n for (let name of namespaces) {\n parent[name] = parent[name] || createObjectIn(unsafeWindow);\n parent = parent[name];\n }\n return parent;\n}", "function configureForStandalone(exportObject) {\n var copiedNamespace = Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"f\" /* shallowCopy */])(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = __WEBPACK_IMPORTED_MODULE_1__api_database__[\"a\" /* Firestore */];\n exportObject['firestore'] = copiedNamespace;\n}", "function createNamespace(developer) {\n //Create namespace\n var chromeExtId = chrome.i18n.getMessage(\"@@extension_id\");\n var namespace = 'OxEp.' + developer;\n var js = '';\n js += 'if (typeof OxEp == \"undefined\" || OxEp == null) OxEp = {};\\n';\n js += 'if (typeof OxEp.' + developer + ' == \"undefined\" || OxEp.' + developer + '== null) OxEp.' + developer + ' = {};\\n';\n js += 'OxEp.' + developer + '.chromeExtId = \"' + chromeExtId + '\";\\n';\n js += 'var OxEpNamespace = ' + namespace;\n //console.log(js);\n injectCode(js);\n return namespace;\n}", "function init() {\n\t\t\tvar library, namespaces = [], previousValues = {};\n\n\t\t\tlibrary = factory('global');\n\t\t\tlibrary.fork = init;\n\t\t\tlibrary.noConflict = noConflict;\n\t\t\treturn library;\n\n\t\t\t//sets library namespaces\n\t\t\tfunction noConflict( ) {\n\t\t\t\tvar args, nI, newNamespaces;\n\n\t\t\t\tnewNamespaces = Array.prototype.slice.apply(arguments);\n\n\t\t\t\tfor(nI = 0; nI < namespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof previousValues[namespaces[nI]] === 'undefined') {\n\t\t\t\t\t\tdelete context[namespaces[nI]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext[namespaces[nI]] = previousValues[namespaces[nI]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpreviousValues = {};\n\n\t\t\t\tfor(nI = 0; nI < newNamespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof newNamespaces[nI] !== 'string') {\n\t\t\t\t\t\tthrow new Error('Cannot replace namespaces. All new namespaces must be strings.');\n\t\t\t\t\t}\n\t\t\t\t\tpreviousValues[newNamespaces[nI]] = context[newNamespaces[nI]];\n\t\t\t\t\tcontext[newNamespaces[nI]] = library;\n\t\t\t\t}\n\n\t\t\t\tnamespaces = newNamespaces;\n\n\t\t\t\treturn namespaces;\n\t\t\t}\n\t\t}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree[namespace] = {\n ...subtree[namespace],\n }\n return getNamespace(subtree[namespace], path)\n}", "function aliasTopLevelFields(prefix, document) {\n const transformer = {\n [Kind.OPERATION_DEFINITION]: (def) => {\n const { selections } = def.selectionSet;\n return {\n ...def,\n selectionSet: {\n ...def.selectionSet,\n selections: aliasFieldsInSelection(prefix, selections, document),\n },\n };\n },\n };\n return visit(document, transformer, {\n [Kind.DOCUMENT]: [`definitions`],\n });\n}", "init() {\n module_utils.patchModule(\n '@google-cloud/common/',\n 'makeRequest',\n bigQueryWrapper,\n common => common.util\n );\n module_utils.patchModule(\n '@google-cloud/pubsub/',\n 'request',\n wrapPubSubRequestFunction,\n pubsub => pubsub.PubSub.prototype\n );\n module_utils.patchModule(\n '@google-cloud/pubsub/',\n 'pull',\n wrapPubSubPullFunction,\n pubsub => pubsub.v1.SubscriberClient.prototype\n );\n }", "constructor() {\n super(NameSpace);\n }", "function modifySchemaTest() {\n var sleep_schema_v2 = {\n className: \"Sleep\",\n fields: {\n user_id : { // new field\n type: \"String\"\n }\n }\n };\n XHR.PUT(SERVER_URL+'/schemas' + \"/\" + sleep_schema_v2.className, sleep_schema_v2)\n}", "setName(newName) {\r\n const nameNodes = this.getNameNodes();\r\n const openIssueText = `Please open an issue if you really need this and I'll up the priority.`;\r\n if (nameNodes.length > 1)\r\n throw new errors.NotImplementedError(`Not implemented to set a namespace name that uses dot notation. ${openIssueText}`);\r\n if (newName.indexOf(\".\") >= 0)\r\n throw new errors.NotImplementedError(`Not implemented to set a namespace name to a name containing a period. ${openIssueText}`);\r\n if (newName !== \"global\")\r\n addNamespaceKeywordIfNecessary(this);\r\n nameNodes[0].replaceWithText(newName);\r\n return this;\r\n }", "function aug(o, o2) {\n for (var k in o2) {\n k != 'noConflict' && k != '_VERSION' && (o[k] = o2[k]);\n }\n return o;\n }", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function extend(baseObj, extObj) {\n for (var k in extObj) {\n if (!extObj.hasOwnProperty(k))\n continue;\n assert(!baseObj.hasOwnProperty(k));\n baseObj[k] = extObj[k];\n }\n return baseObj;\n }", "function modifySchemaTest2() {\n var sleep_schema_v3 = {\n className: \"Sleep\",\n fields: {\n sleep_quality : { // new field\n type: \"String\"\n },\n polyphasic : { // new field\n type: \"Boolean\"\n }\n }\n };\n XHR.PUT(SERVER_URL+'/schemas' + \"/\" + sleep_schema_v3.className, sleep_schema_v3)\n}", "function extend( child, parent )\r\n{\r\n\tfor( prop in parent )\r\n\t{\r\n\t\tif( !(prop in child ) && prop != 'prototype' )\r\n\t\t{\r\n\t\t\tchild[prop] = parent[prop];\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfor( prop in parent.prototype )\r\n\t{\r\n\t\tif( !(prop in child.prototype ) )\r\n\t\t{\r\n\t\t\tchild.prototype[prop] = parent.prototype[prop];\t\r\n\t\t}\r\n\t}\r\n}", "function enterNamespace(namespace) {\n namespaceStack.unshift( namespace.getName() );\n return namespace;\n}", "get namespace() {\n return this._namespace\n }", "stripCustomNsAttrs(el) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n }", "stripCustomNsAttrs(el) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n }" ]
[ "0.7601572", "0.7601572", "0.7601572", "0.7601572", "0.75983995", "0.75983995", "0.75533146", "0.7525545", "0.7525545", "0.7478086", "0.74745446", "0.74745446", "0.7244001", "0.66542375", "0.6581733", "0.6581733", "0.6549842", "0.6549842", "0.64319474", "0.64125645", "0.6290645", "0.6290645", "0.6290645", "0.6290645", "0.6290645", "0.6290645", "0.6290645", "0.6290645", "0.59319603", "0.5806062", "0.57847315", "0.5638996", "0.5606963", "0.56053644", "0.5604998", "0.55993056", "0.5589968", "0.5587564", "0.5587564", "0.5584215", "0.55785865", "0.55686593", "0.55686593", "0.55666095", "0.5565674", "0.55638933", "0.5556502", "0.5539501", "0.53856", "0.53416055", "0.5283079", "0.5221585", "0.5086476", "0.50626916", "0.4955977", "0.48706004", "0.48271075", "0.48271075", "0.48207116", "0.47969264", "0.47663003", "0.47462124", "0.47412696", "0.47407046", "0.46746066", "0.46604517", "0.46479154", "0.46403623", "0.4621244", "0.46132606", "0.4607497", "0.46070394", "0.46012548", "0.45917043", "0.45784646", "0.45713422", "0.45528555", "0.45528555", "0.45257384", "0.4510698", "0.45003942", "0.44947717", "0.44820088", "0.448168", "0.4481218", "0.4471854", "0.4471854", "0.44707242", "0.44707242", "0.44673693", "0.44571272", "0.44513378", "0.44503352", "0.4450045", "0.4449326", "0.4449326" ]
0.63201916
24
Map the requested service to a registered service name (used to map auth to serverAuth service when needed).
function useAsService(app, name) { if (name === 'serverAuth') { return null; } var useService = name; var options = app.options; return useService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function serviceName (ctx) {\n const {mu, server} = ctx\n\n const handle = pattern(mu)\n\n // set up the component\n component({name}, ctx)\n\n // set up API routes for services\n\n server.route({\n method: 'GET',\n path: '/service-name/one',\n handler: handle({role: name, cmd: 'one'})\n })\n\n // we can pass a function to `handle` to extract\n // required items from the request body (payload)\n\n server.route({\n method: 'POST',\n path: '/service-name/two',\n handler: handle((payload) => ({\n role: name,\n cmd: 'two',\n someUserData: payload.someUserData\n }))\n })\n\n // without pattern handle sugar:\n //\n // server.route({\n // method: 'GET',\n // path: '/service-name/cmd',\n // handler: (request, reply) => {\n // mu.dispatch(pat, function (err, res) {\n // reply({result: err ? 'error' : res, err: err})\n // })\n // }\n // })\n}", "registerService(entityName, service) {\n this.services[entityName.trim()] = service;\n }", "function put_name_service(username,name,service) {\n \n lookup_data.push({ username: current_user, name: name, service: service });\n \n}", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n return useService;\n }", "static serviceName(serviceName) {\n return {\n serviceName,\n };\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n const useService = name;\r\n return useService;\r\n }", "function useAsService(app, name) {\n\t if (name === 'serverAuth') {\n\t return null;\n\t }\n\t var useService = name;\n\t var options = app.options;\n\t return useService;\n\t }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }", "function useAsService(app, name) {\r\n if (name === 'serverAuth') {\r\n return null;\r\n }\r\n var useService = name;\r\n var options = app.options;\r\n return useService;\r\n }", "function serviceName(s) {\n s = s.replace(/([a-z])([A-Z])/g, '$1 $2');\n s = s.replace(/([A-Z])([A-Z][a-z])/g, '$1 $2')\n return s;\n}", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }", "function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }", "getServiceName (serviceIdentifier) {\n return this.config.service\n ? this.config.service\n : `${this.tracer._service}-aws-${serviceIdentifier}`\n }", "function getServiceByName(name) {\n return services[name];\n}", "get serviceName() {\n // TODO: Drastically reduce combinatoral explosion of buckets.\n const {\n singlePassType,\n referrer,\n runtime,\n thirdParty,\n binaryType,\n canary,\n assert,\n expected,\n } = this.opts;\n const name = ['default'];\n\n if (singlePassType) {\n name.push(singlePassType);\n }\n name.push(CDN_REGEX.test(referrer) ? 'cdn' : 'origin');\n\n if (runtime) {\n name.push(runtime);\n } else if (thirdParty) {\n name.push('3p');\n } else {\n name.push('1p');\n }\n\n // Do not append binary type if 'production' since that is the default\n if (binaryType) {\n if (binaryType !== 'production') {\n name.push(binaryType);\n }\n } else if (canary) {\n name.push('canary');\n }\n\n if (assert) {\n name.push('user');\n }\n if (expected) {\n name.push('expected');\n }\n\n return name.join('-');\n }", "function get_name_service(username,service) {\n \n return lookup_data.\n filter(function (info) { return username === info.username; }).\n map(function (info) {\n return info.name;\n });\n \n}", "AddService(string, string) {\n\n }", "function replaceServiceM(_, f) {\n return ma => accessServiceM(_)(t => provideServiceM(_)(f(t))(ma));\n}", "function replaceServiceM(_, f) {\n return ma => accessServiceM(_)(t => provideServiceM(_)(f(t))(ma));\n}", "function getService(serviceName) {\n\n // Validation\n if (!serviceName) {\n return false;\n }\n\n // Lookup in the Service Map\n return servicesMap[serviceName];\n\n}", "setService(value) {\n super.put(\"service\", value);\n }", "function RegisterService() { }", "function setService(service) {\n // debug('setting service: %j', service);\n checkIdForCollision.call(service);\n if (serviceExists.call(this, service) && isOldService.call(this, service)) return debug('old service try to be set: %j : %j', service, this._services);\n if (!service.timestamp) service.timestamp = Date.now();\n var found = !! this._services[service.id];\n this._services[service.id] = service;\n // debug('service set: %j', this._services);\n if (!found) this.emit('register', service);\n}", "function accessServicesM(s) {\n return f => accessManaged(r => f(R.map_(s, v => r[v.key])));\n}", "function replaceService(_, f) {\n return ma => accessServiceM(_)(t => provideServiceM(_)(As.succeed(f(t)))(ma));\n}", "function accessServiceM(s) {\n return f => accessManaged(r => f(r[s.key]));\n}", "function replaceService(_, f) {\n return ma => accessServiceM(_)(t => provideServiceM(_)((0, _succeed.succeed)(f(t)))(ma));\n}", "function accessServices(s) {\n return f => access(r => f(R.map_(s, v => r[v.key])));\n}", "function getService(service) {\n for (var i = 0; i < window.services.length; i++)\n if (window.services[i].id === service) return services[i];\n}", "request_service(name, cb) {\n const rq = {\n type: 'service',\n name: name,\n };\n\n this._req(rq, (rsp) => {\n if (rsp.status != 'ok') {\n return cb(rsp.status);\n }\n\n this.services[name] = rsp.body;\n return cb(null, rsp.body);\n });\n }", "function service(s) {\n return accessServiceM(s)(a => As.succeed(a));\n}", "registerControllers(service) {\n service.getControllerNames().forEach((controllerName) => {\n if (this.controllerMap.has(controllerName)) throw new Error(`Cannot register controller '${controllerName}' for service '${service.name}': it was already registered by the service '${this.controllerMap.get(controllerName).name}'!`);\n this.controllerMap.set(controllerName, service);\n });\n }", "function service(s) {\n return accessServiceM(s)(a => (0, _succeed.succeed)(a));\n}", "function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.", "function accessServicesM(s) {\n return f => As.accessM(r => f(R.map_(s, v => r[v.key])));\n}", "function accessServices(s) {\n return f => As.access(r => f(R.map_(s, v => r[v.key])));\n}", "loadService() {\n const service = {};\n const servicePath = `${this.options.baseDir}/app/service`;\n if (fs.existsSync(servicePath)) {\n fs.readdirSync(servicePath).forEach((file) => {\n debug('bind service %s', file);\n this.app.logger.info('bind service %s', file);\n service[utils.camelize(file.slice(0, -3))] = this.loadFile(`${this.options.baseDir}/app/service/${file}`);\n });\n }\n this.app.context.service = service;\n }", "addService(service) {\n if (this.services.has(service.serviceName)) {\n throw Error('Service with name: ' + service.serviceName + ' already defined.');\n } else {\n this.services.set(service.serviceName, service);\n }\n return service;\n }", "function provideService(_) {\n return f => ma => provideServiceM(_)(As.succeed(f))(ma);\n}", "function accessServiceM(s) {\n return f => As.accessM(r => f(r[s.key]));\n}", "function replaceServiceM_(ma, _, f) {\n return accessServiceM(_)(t => provideServiceM(_)(f(t))(ma));\n}", "function replaceServiceM_(ma, _, f) {\n return accessServiceM(_)(t => provideServiceM(_)(f(t))(ma));\n}", "function accessService(s) {\n return f => accessServiceM(s)(a => As.succeed(f(a)));\n}", "function replaceService_(ma, _, f) {\n return accessServiceM(_)(t => provideServiceM(_)(As.succeed(f(t)))(ma));\n}", "function replaceService_(ma, _, f) {\n return accessServiceM(_)(t => provideServiceM(_)((0, _succeed.succeed)(f(t)))(ma));\n}", "function accessServicesT(...s) {\n return f => access(r => f(...A.map_(s, v => r[v.key])));\n}", "function register(service) {\n {\n assert.isTrue(isObject$1(service), `Invalid service declaration, ${service}: service must be an object`);\n }\n\n for (let i = 0; i < hooks.length; ++i) {\n const hookName = hooks[i];\n\n if (hookName in service) {\n let l = Services[hookName];\n\n if (isUndefined(l)) {\n Services[hookName] = l = [];\n }\n\n ArrayPush.call(l, service[hookName]);\n }\n }\n }", "function accessService(s) {\n return f => accessServiceM(s)(a => (0, _succeed.succeed)(f(a)));\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n\t // Cannot re-register a service that already exists\n\t if (factories[name]) {\n\t error('duplicate-service', { name: name });\n\t }\n\t // Capture the service factory for later service instantiation\n\t factories[name] = createService;\n\t // Capture the appHook, if passed\n\t if (appHook) {\n\t appHooks[name] = appHook;\n\t // Run the **new** app hook on all existing apps\n\t getApps().forEach(function (app) {\n\t appHook('create', app);\n\t });\n\t }\n\t // The Service namespace is an accessor function ...\n\t var serviceNamespace = function serviceNamespace(appArg) {\n\t if (appArg === void 0) {\n\t appArg = app();\n\t }\n\t if (typeof appArg[name] !== 'function') {\n\t // Invalid argument.\n\t // This happens in the following case: firebase.storage('gs:/')\n\t error('invalid-app-argument', { name: name });\n\t }\n\t // Forward service instance lookup to the FirebaseApp.\n\t return appArg[name]();\n\t };\n\t // ... and a container for service-level properties.\n\t if (serviceProperties !== undefined) {\n\t (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n\t }\n\t // Monkey-patch the serviceNamespace onto the firebase namespace\n\t namespace[name] = serviceNamespace;\n\t // Patch the FirebaseAppImpl prototype\n\t FirebaseAppImpl.prototype[name] = function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var serviceFxn = this._getService.bind(this, name);\n\t return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n\t };\n\t return serviceNamespace;\n\t }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "getService(serviceName) {\n return this._services.get(serviceName);\n }", "getService() {\n return super.getAsNullableString(\"service\") || super.getAsNullableString(\"protocol\");\n }", "get serviceName() {\n return this.getStringAttribute('service_name');\n }", "function provideService(_) {\n return f => ma => provideServiceM(_)((0, _succeed.succeed)(f))(ma);\n}", "function server_getPrimaryService(serverID, SERVICE_UUID, callback)\n{\n serverTable[serverID].getPrimaryService(SERVICE_UUID)\n .then(service => {\n let id = serviceCount;\n let uuid = create_serviceUUID(serverID, service.uuid);\n if (uuid in serviceIdTable)\n {\n id = serviceIdTable[uuid];\n }\n else\n {\n serviceIdTable[uuid] = id;\n serviceCount++;\n }\n serviceTable[id] = service;\n callback(id, service.uuid);\n });\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n if (allowMultipleInstances === void 0) {\n allowMultipleInstances = false;\n } // Cannot re-register a service that already exists\n\n\n if (factories[name]) {\n throw ERROR_FACTORY.create(\"duplicate-service\"\n /* DUPLICATE_SERVICE */\n , {\n name: name\n });\n } // Capture the service factory for later service instantiation\n\n\n factories[name] = createService; // Capture the appHook, if passed\n\n if (appHook) {\n appHooks[name] = appHook; // Run the **new** app hook on all existing apps\n\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n } // The Service namespace is an accessor function ...\n\n\n function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.\n\n\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n } // Monkey-patch the serviceNamespace onto the firebase namespace\n\n\n namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n\n firebaseAppImpl.prototype[name] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, name);\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n\n return serviceNamespace;\n }", "async getService (req, res) {\n console.log('getting services')\n const user = await jwt.getUser()\n const service = await Services.findById(req.params.service)\n\n if (!service) return res.status(204).send('No service found with that ID')\n\n res.status(200).send(service)\n }", "function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }", "function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }" ]
[ "0.63204885", "0.62828773", "0.62656265", "0.6240066", "0.62210745", "0.61622226", "0.61622226", "0.61622226", "0.61622226", "0.61622226", "0.61622226", "0.61561984", "0.61561984", "0.61561984", "0.61561984", "0.61561984", "0.61561984", "0.61561984", "0.61561984", "0.6071378", "0.6062879", "0.6001686", "0.591085", "0.591085", "0.591085", "0.5872976", "0.5837587", "0.5837587", "0.582005", "0.5807897", "0.5764161", "0.5700909", "0.56188613", "0.5597181", "0.5597181", "0.55723727", "0.5570689", "0.5495083", "0.54923683", "0.5443162", "0.5440143", "0.54069096", "0.5405449", "0.5400335", "0.5371909", "0.5341375", "0.53292406", "0.53256595", "0.53153914", "0.5315186", "0.5303427", "0.52730286", "0.52532476", "0.52531457", "0.5248897", "0.5242621", "0.51976466", "0.51976466", "0.51432127", "0.51315457", "0.51164055", "0.511306", "0.50967366", "0.5093994", "0.50913537", "0.50913537", "0.5082797", "0.5082205", "0.5082205", "0.5081476", "0.5081476", "0.5081255", "0.5081255", "0.5081255", "0.5066", "0.5057628", "0.50566125", "0.5053166", "0.5047877", "0.5047877", "0.50436866", "0.504242", "0.50417835", "0.50375205", "0.5004678", "0.49964", "0.49494216", "0.4946153", "0.4946153" ]
0.5913492
29
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function Ud() { var a = H();return Pb && !!$b && 11 == $b || /Edge\/\d+/.test(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "constructor() {\n this.authToken = null;\n this.dataSourceIdMap = {};\n this.scopeMap = {};\n this.dataSourceIdMap[\"com.google.step_count.delta\"] = \"derived:com.google.step_count.delta:com.google.android.gms:estimated_steps\";\n this.dataSourceIdMap[\"com.google.calories.expended\"] = \"derived:com.google.calories.expended:com.google.android.gms:merge_calories_expended\";\n this.dataSourceIdMap[\"com.google.distance.delta\"] = \"derived:com.google.distance.delta:com.google.android.gms:merge_distance_delta\";\n this.dataSourceIdMap[\"com.google.heart_rate.bpm\"] = \"derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm\";\n this.dataSourceIdMap[\"com.google.weight\"] = \"derived:com.google.weight:com.google.android.gms:merge_weight\";\n this.dataSourceIdMap[\"com.google.blood_pressure\"] = \"derived:com.google.blood_pressure:com.google.android.gms:merged\";\n\n this.scopeMap[\"com.google.heart_rate.bpm\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.weight\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.blood_pressure\"] = \"https://www.googleapis.com/auth/fitness.blood_pressure.read https://www.googleapis.com/auth/fitness.blood_pressure.write\";\n\n }", "private internal function m248() {}", "private public function m246() {}", "googleLogin() { }", "function t(e,t,a,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "function gn() {\n if (!pe.Lt().ia) throw new c(h.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function defGoogle(frame) {\n\n var googlePolicy = (function() {\n\n var google = {};\n\n function drawBeforeAdvice(f, self, args) {\n var result = [ args[0] ];\n for (var i = 1; i < args.length; i++) {\n result.push(copyJson(args[i]));\n }\n return result;\n }\n\n function opaqueNodeAdvice(f, self, args) {\n return [ opaqueNode(args[0]) ];\n }\n\n ////////////////////////////////////////////////////////////////////////\n // gViz integration\n\n google.visualization = {};\n\n /** @constructor */\n google.visualization.DataTable = function(opt_data, opt_version) {};\n google.visualization.DataTable.__super__ = Object;\n google.visualization.DataTable.prototype.getNumberOfRows = function() {};\n google.visualization.DataTable.prototype.getNumberOfColumns = function() {};\n google.visualization.DataTable.prototype.clone = function() {};\n google.visualization.DataTable.prototype.getColumnId = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnIndex = function(columnId) {};\n google.visualization.DataTable.prototype.getColumnLabel = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnPattern = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnRole = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnType = function(columnIndex) {};\n google.visualization.DataTable.prototype.getValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getFormattedValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getProperty = function(rowIndex, columnIndex, property) {};\n google.visualization.DataTable.prototype.getProperties = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getTableProperties = function() {};\n google.visualization.DataTable.prototype.getTableProperty = function(property) {};\n google.visualization.DataTable.prototype.setTableProperties = function(properties) {};\n google.visualization.DataTable.prototype.setTableProperty = function(property, value) {};\n google.visualization.DataTable.prototype.setValue = function(rowIndex, columnIndex, value) {};\n google.visualization.DataTable.prototype.setFormattedValue = function(rowIndex, columnIndex, formattedValue) {};\n google.visualization.DataTable.prototype.setProperties = function(rowIndex, columnIndex, properties) {};\n google.visualization.DataTable.prototype.setProperty = function(rowIndex, columnIndex, property, value) {};\n google.visualization.DataTable.prototype.setCell = function(rowIndex, columnIndex, opt_value, opt_formattedValue, opt_properties) {};\n google.visualization.DataTable.prototype.setRowProperties = function(rowIndex, properties) {};\n google.visualization.DataTable.prototype.setRowProperty = function(rowIndex, property, value) {};\n google.visualization.DataTable.prototype.getRowProperty = function(rowIndex, property) {};\n google.visualization.DataTable.prototype.getRowProperties = function(rowIndex) {};\n google.visualization.DataTable.prototype.setColumnLabel = function(columnIndex, newLabel) {};\n google.visualization.DataTable.prototype.setColumnProperties = function(columnIndex, properties) {};\n google.visualization.DataTable.prototype.setColumnProperty = function(columnIndex, property, value) {};\n google.visualization.DataTable.prototype.getColumnProperty = function(columnIndex, property) {};\n google.visualization.DataTable.prototype.getColumnProperties = function(columnIndex) {};\n google.visualization.DataTable.prototype.insertColumn = function(atColIndex, type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.addColumn = function(type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.insertRows = function(atRowIndex, numOrArray) {};\n google.visualization.DataTable.prototype.addRows = function(numOrArray) {};\n google.visualization.DataTable.prototype.addRow = function(opt_cellArray) {};\n google.visualization.DataTable.prototype.getColumnRange = function(columnIndex) {};\n google.visualization.DataTable.prototype.getSortedRows = function(sortColumns) {};\n google.visualization.DataTable.prototype.sort = function(sortColumns) {};\n google.visualization.DataTable.prototype.getDistinctValues = function(column) {};\n google.visualization.DataTable.prototype.getFilteredRows = function(columnFilters) {};\n google.visualization.DataTable.prototype.removeRows = function(fromRowIndex, numRows) {};\n google.visualization.DataTable.prototype.removeRow = function(rowIndex) {};\n google.visualization.DataTable.prototype.removeColumns = function(fromColIndex, numCols) {};\n google.visualization.DataTable.prototype.removeColumn = function(colIndex) {};\n\n /** @return {string} JSON representation. */\n google.visualization.DataTable.prototype.toJSON = function() {\n return copyJson(this.toJSON());\n };\n google.visualization.DataTable.prototype.toJSON.__subst__ = true;\n\n google.visualization.arrayToDataTable = function(arr) {};\n\n /** @constructor */\n google.visualization.AreaChart = function(container) {};\n google.visualization.AreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.AreaChart.__super__ = Object;\n google.visualization.AreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.AreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.AreaChart.prototype.clearChart = function() {};\n // google.visualization.AreaChart.prototype.getSelection = function() {};\n // google.visualization.AreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BarChart = function(container) {};\n google.visualization.BarChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BarChart.__super__ = Object;\n google.visualization.BarChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BarChart.prototype.clearChart = function() {};\n // google.visualization.BarChart.prototype.getSelection = function() {};\n // google.visualization.BarChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BubbleChart = function(container) {};\n google.visualization.BubbleChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BubbleChart.__super__ = Object;\n google.visualization.BubbleChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BubbleChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.BubbleChart.prototype.clearChart = function() {};\n // google.visualization.BubbleChart.prototype.getSelection = function() {};\n // google.visualization.BubbleChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.CandlestickChart = function(container) {};\n google.visualization.CandlestickChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.CandlestickChart.__super__ = Object;\n google.visualization.CandlestickChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.CandlestickChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.CandlestickChart.prototype.clearChart = function() {};\n // google.visualization.CandlestickChart.prototype.getSelection = function() {};\n // google.visualization.CandlestickChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ColumnChart = function(container) {};\n google.visualization.ColumnChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ColumnChart.__super__ = Object;\n google.visualization.ColumnChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ColumnChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ColumnChart.prototype.clearChart = function() {};\n // google.visualization.ColumnChart.prototype.getSelection = function() {};\n // google.visualization.ColumnChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ComboChart = function(container) {};\n google.visualization.ComboChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ComboChart.__super__ = Object;\n google.visualization.ComboChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ComboChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ComboChart.prototype.clearChart = function() {};\n // google.visualization.ComboChart.prototype.getSelection = function() {};\n // google.visualization.ComboChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Gauge = function(container) {};\n google.visualization.Gauge.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Gauge.__super__ = Object;\n google.visualization.Gauge.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Gauge.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Gauge.prototype.clearChart = function() {};\n\n /** @constructor */\n google.visualization.GeoChart = function(container) {};\n google.visualization.GeoChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.GeoChart.__super__ = Object;\n // google.visualization.GeoChart.mapExists = function(userOptions) {};\n google.visualization.GeoChart.prototype.clearChart = function() {};\n google.visualization.GeoChart.prototype.draw = function(dataTable, userOptions, opt_state) {};\n google.visualization.GeoChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n // google.visualization.GeoChart.prototype.getSelection = function() {};\n // google.visualization.GeoChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.LineChart = function(container) {};\n google.visualization.LineChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.LineChart.__super__ = Object;\n google.visualization.LineChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.LineChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.LineChart.prototype.clearChart = function() {};\n // google.visualization.LineChart.prototype.getSelection = function() {};\n // google.visualization.LineChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.PieChart = function(container) {};\n google.visualization.PieChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.PieChart.__super__ = Object;\n google.visualization.PieChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.PieChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.PieChart.prototype.clearChart = function() {};\n // google.visualization.PieChart.prototype.getSelection = function() {};\n // google.visualization.PieChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ScatterChart = function(container) {};\n google.visualization.ScatterChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ScatterChart.__super__ = Object;\n google.visualization.ScatterChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ScatterChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ScatterChart.prototype.clearChart = function() {};\n // google.visualization.ScatterChart.prototype.getSelection = function() {};\n // google.visualization.ScatterChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.SteppedAreaChart = function(container) {};\n google.visualization.SteppedAreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.SteppedAreaChart.__super__ = Object;\n google.visualization.SteppedAreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.SteppedAreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.SteppedAreaChart.prototype.clearChart = function() {};\n // google.visualization.SteppedAreaChart.prototype.getSelection = function() {};\n // google.visualization.SteppedAreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Table = function(container) {};\n google.visualization.Table.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Table.__super__ = Object;\n google.visualization.Table.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Table.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Table.prototype.clearChart = function() {};\n // google.visualization.Table.prototype.getSortInfo = function() {};\n // google.visualization.Table.prototype.getSelection = function() {};\n // google.visualization.Table.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.TreeMap = function(container) {};\n google.visualization.TreeMap.__before__ = [ opaqueNodeAdvice ];\n google.visualization.TreeMap.__super__ = Object;\n google.visualization.TreeMap.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.TreeMap.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.TreeMap.prototype.clearChart = function() {};\n // google.visualization.TreeMap.prototype.getSelection = function() {};\n // google.visualization.TreeMap.prototype.setSelection = function(selection) {};\n\n ////////////////////////////////////////////////////////////////////////\n // OnePick integration\n\n google.picker = {};\n\n google.picker.DocsUploadView = function() {};\n google.picker.DocsUploadView.__super__ = Object;\n google.picker.DocsUploadView.prototype.setIncludeFolders = function(boolean) {};\n\n google.picker.View = function() {};\n google.picker.View.__super__ = Object;\n google.picker.View.prototype.getId = function() {};\n google.picker.View.prototype.setMimeTypes = function() {};\n google.picker.View.prototype.setQuery = function() {};\n\n google.picker.DocsView = function() {};\n google.picker.DocsView.__super__ = ['google', 'picker', 'View'];\n google.picker.DocsView.prototype.setIncludeFolders = function() {};\n google.picker.DocsView.prototype.setMode = function() {};\n google.picker.DocsView.prototype.setOwnedByMe = function() {};\n google.picker.DocsView.prototype.setStarred = function() {};\n\n google.picker.DocsViewMode = {};\n google.picker.DocsViewMode.GRID = 1;\n google.picker.DocsViewMode.LIST = 1;\n\n google.picker.Feature = {};\n google.picker.Feature.MINE_ONLY = 1;\n google.picker.Feature.MULTISELECT_ENABLED = 1;\n google.picker.Feature.NAV_HIDDEN = 1;\n google.picker.Feature.SIMPLE_UPLOAD_ENABLED = 1;\n\n google.picker.ImageSearchView = function() {};\n google.picker.ImageSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.ImageSearchView.prototype.setLicense = function() {};\n google.picker.ImageSearchView.prototype.setSite = function() {};\n google.picker.ImageSearchView.prototype.setSize = function() {};\n\n google.picker.ImageSearchView.License = {};\n google.picker.ImageSearchView.License.NONE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE_WITH_MODIFICATION = 1;\n google.picker.ImageSearchView.License.REUSE = 1;\n google.picker.ImageSearchView.License.REUSE_WITH_MODIFICATION = 1;\n\n google.picker.ImageSearchView.Size = {};\n google.picker.ImageSearchView.Size.SIZE_QSVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_VGA = 1;\n google.picker.ImageSearchView.Size.SIZE_SVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_XGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA2 = 1;\n google.picker.ImageSearchView.Size.SIZE_2MP = 1;\n google.picker.ImageSearchView.Size.SIZE_4MP = 1;\n google.picker.ImageSearchView.Size.SIZE_6MP = 1;\n google.picker.ImageSearchView.Size.SIZE_8MP = 1;\n google.picker.ImageSearchView.Size.SIZE_10MP = 1;\n google.picker.ImageSearchView.Size.SIZE_12MP = 1;\n google.picker.ImageSearchView.Size.SIZE_15MP = 1;\n google.picker.ImageSearchView.Size.SIZE_20MP = 1;\n google.picker.ImageSearchView.Size.SIZE_40MP = 1;\n google.picker.ImageSearchView.Size.SIZE_70MP = 1;\n google.picker.ImageSearchView.Size.SIZE_140MP = 1;\n\n google.picker.MapsView = function() {};\n google.picker.MapsView.__super__ = ['google', 'picker', 'View'];\n google.picker.MapsView.prototype.setCenter = function() {};\n google.picker.MapsView.prototype.setZoom = function() {};\n\n google.picker.PhotoAlbumsView = function() {};\n google.picker.PhotoAlbumsView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.PhotosView = function() {};\n google.picker.PhotosView.__super__ = ['google', 'picker', 'View'];\n google.picker.PhotosView.prototype.setType = function() {};\n\n google.picker.PhotosView.Type = {};\n google.picker.PhotosView.Type.FEATURED = 1;\n google.picker.PhotosView.Type.UPLOADED = 1;\n\n var SECRET = {};\n\n google.picker.Picker = function() {\n if (arguments[0] !== SECRET) { throw new TypeError(); }\n this.v = arguments[1];\n };\n google.picker.Picker.__super__ = Object;\n google.picker.Picker.__subst__ = true;\n google.picker.Picker.prototype.isVisible = function() {\n return this.v.isVisible();\n };\n google.picker.Picker.prototype.setCallback = function(c) {\n this.v.setCallback(c);\n };\n google.picker.Picker.prototype.setRelayUrl = function(u) {\n this.v.setRelayUrl(u);\n };\n google.picker.Picker.prototype.setVisible = function(b) {\n this.v.setVisible(b);\n };\n\n/*\n google.picker.PickerBuilder = function() {};\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {};\n google.picker.PickerBuilder.prototype.addViewGroup = function() {};\n google.picker.PickerBuilder.prototype.build = function() {};\n google.picker.PickerBuilder.prototype.disableFeature = function() {};\n google.picker.PickerBuilder.prototype.enableFeature = function() {};\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.getTitle = function() {};\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {};\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {};\n google.picker.PickerBuilder.prototype.setAppId = function() {};\n google.picker.PickerBuilder.prototype.setAuthUser = function() {};\n google.picker.PickerBuilder.prototype.setCallback = function() {};\n google.picker.PickerBuilder.prototype.setDocument = function() {};\n google.picker.PickerBuilder.prototype.setLocale = function() {};\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {};\n google.picker.PickerBuilder.prototype.setSize = function() {};\n google.picker.PickerBuilder.prototype.setTitle = function() {}; // TODO: Add \"trusted path\" annotation\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {};\n google.picker.PickerBuilder.prototype.toUri = function() {};\n*/\n\n google.picker.PickerBuilder = function() {\n this.v = new window.google.picker.PickerBuilder();\n };\n google.picker.PickerBuilder.__subst__ = true;\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {\n this.v.addView.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.addViewGroup = function() {\n this.v.addViewGroup.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.disableFeature = function() {\n this.v.disableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.enableFeature = function() {\n this.v.enableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {\n this.v.getRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getTitle = function() {\n this.v.getTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {\n this.v.hideTitleBar.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {\n this.v.isFeatureEnabled.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAppId = function() {\n this.v.setAppId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAuthUser = function() {\n this.v.setAuthUser.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setCallback = function() {\n this.v.setCallback.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setDocument = function() {\n this.v.setDocument.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setLocale = function() {\n this.v.setLocale.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {\n this.v.setRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {\n this.v.setSelectableMimeTypes.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSize = function() {\n this.v.setSize.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setTitle = function() {\n this.v.setTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {\n this.v.setUploadToAlbumId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.toUri = function() {\n this.v.toUri.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.build = function() {\n return new google.picker.Picker(SECRET, this.v.build.apply(this.v, arguments));\n }; \n\n google.picker.ResourceId = {};\n google.picker.ResourceId.generate = function() {};\n\n google.picker.VideoSearchView = function() {};\n google.picker.VideoSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.VideoSearchView.prototype.setSite = function() {};\n\n google.picker.VideoSearchView.YOUTUBE = 1;\n\n google.picker.ViewGroup = function() {};\n google.picker.ViewGroup.__super__ = Object;\n google.picker.ViewGroup.prototype.addLabel = function() {};\n google.picker.ViewGroup.prototype.addView = function() {};\n google.picker.ViewGroup.prototype.addViewGroup = function() {};\n\n google.picker.ViewId = {};\n google.picker.ViewId.DOCS = 1;\n google.picker.ViewId.DOCS_IMAGES = 1;\n google.picker.ViewId.DOCS_IMAGES_AND_VIDEOS = 1;\n google.picker.ViewId.DOCS_VIDEOS = 1;\n google.picker.ViewId.DOCUMENTS = 1;\n google.picker.ViewId.FOLDERS = 1;\n google.picker.ViewId.FORMS = 1;\n google.picker.ViewId.IMAGE_SEARCH = 1;\n google.picker.ViewId.PDFS = 1;\n google.picker.ViewId.PHOTO_ALBUMS = 1;\n google.picker.ViewId.PHOTO_UPLOAD = 1;\n google.picker.ViewId.PHOTOS = 1;\n google.picker.ViewId.PRESENTATIONS = 1;\n google.picker.ViewId.RECENTLY_PICKED = 1;\n google.picker.ViewId.SPREADSHEETS = 1;\n google.picker.ViewId.VIDEO_SEARCH = 1;\n google.picker.ViewId.WEBCAM = 1;\n google.picker.ViewId.YOUTUBE = 1;\n\n google.picker.WebCamView = function() {};\n google.picker.WebCamView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.WebCamViewType = {};\n google.picker.WebCamViewType.STANDARD = 1;\n google.picker.WebCamViewType.VIDEOS = 1;\n\n google.picker.Action = {};\n google.picker.Action.CANCEL = 1;\n google.picker.Action.PICKED = 1;\n\n google.picker.Audience = {};\n google.picker.Audience.OWNER_ONLY = 1;\n google.picker.Audience.LIMITED = 1;\n google.picker.Audience.ALL_PERSONAL_CIRCLES = 1;\n google.picker.Audience.EXTENDED_CIRCLES = 1;\n google.picker.Audience.DOMAIN_PUBLIC = 1;\n google.picker.Audience.PUBLIC = 1;\n\n google.picker.Document = {};\n google.picker.Document.ADDRESS_LINES = 1;\n google.picker.Document.AUDIENCE = 1;\n google.picker.Document.DESCRIPTION = 1;\n google.picker.Document.DURATION = 1;\n google.picker.Document.EMBEDDABLE_URL = 1;\n google.picker.Document.ICON_URL = 1;\n google.picker.Document.ID = 1;\n google.picker.Document.IS_NEW = 1;\n google.picker.Document.LAST_EDITED_UTC = 1;\n google.picker.Document.LATITUDE = 1;\n google.picker.Document.LONGITUDE = 1;\n google.picker.Document.MIME_TYPE = 1;\n google.picker.Document.NAME = 1;\n google.picker.Document.NUM_CHILDREN = 1;\n google.picker.Document.PARENT_ID = 1;\n google.picker.Document.PHONE_NUMBERS = 1;\n google.picker.Document.SERVICE_ID = 1;\n google.picker.Document.THUMBNAILS = 1;\n google.picker.Document.TYPE = 1;\n google.picker.Document.URL = 1;\n\n google.picker.Response = {};\n google.picker.Response.ACTION = 1;\n google.picker.Response.DOCUMENTS = 1;\n google.picker.Response.PARENTS = 1;\n google.picker.Response.VIEW = 1;\n\n google.picker.ServiceId = {};\n google.picker.ServiceId.DOCS = 1;\n google.picker.ServiceId.MAPS = 1;\n google.picker.ServiceId.PHOTOS = 1;\n google.picker.ServiceId.SEARCH_API = 1;\n google.picker.ServiceId.URL = 1;\n google.picker.ServiceId.YOUTUBE = 1;\n\n google.picker.Thumbnail = {};\n google.picker.Thumbnail.HEIGHT = 1;\n google.picker.Thumbnail.WIDTH = 1;\n google.picker.Thumbnail.URL = 1;\n\n google.picker.Type = {};\n google.picker.Type.ALBUM = 1;\n google.picker.Type.DOCUMENT = 1;\n google.picker.Type.PHOTO = 1;\n google.picker.Type.URL = 1;\n google.picker.Type.VIDEO = 1;\n\n ////////////////////////////////////////////////////////////////////////\n\n google.setOnLoadCallback = function(olc) {\n throw 'Cannot set onLoadCallback once modules loaded';\n }\n google.setOnLoadCallback.__subst__ = true;\n\n return google;\n })();\n\n function copyJson(o) {\n if (!o) { return undefined; }\n return JSON.parse(JSON.stringify(o, function(key, value) {\n return /__$/.test(key) ? void 0 : value;\n }));\n }\n\n function opaqueNode(guestNode) {\n var d = guestNode.ownerDocument.createElement('div');\n frame.imports.tameNodeAsForeign___(d);\n guestNode.appendChild(d);\n return d;\n }\n\n function forallkeys(obj, cb) {\n for (var k in obj) {\n if (!/.*__$/.test(k)) {\n cb(k);\n }\n }\n }\n\n function targ(obj, policy) {\n return policy.__subst__ ? policy : obj;\n }\n\n ////////////////////////////////////////////////////////////////////////\n \n function grantRead(o, k) {\n if (o[k + '__grantRead__']) { return; }\n console.log(' + grantRead');\n caja.grantRead(o, k);\n o[k + '__grantRead__'] = true;\n }\n\n function grantMethod(o, k) {\n if (o[k + '__grantMethod__']) { return; }\n caja.grantMethod(o, k);\n console.log(' + grantMethod');\n o[k + '__grantMethod__'] = true;\n }\n\n function markFunction(o) {\n if (o.__markFunction__) { return o; }\n var r = caja.markFunction(o);\n console.log(' + markFunction');\n o.__markFunction__ = true;\n return r;\n }\n\n function markCtor(o, sup) {\n if (o.__markCtor__) { return o; }\n var r = caja.markCtor(o, sup);\n console.log(' + markCtor');\n o.__markCtor__ = true;\n return r;\n }\n\n function adviseFunctionBefore(o, advices) {\n if (o.__adviseFunctionBefore__) { return o; }\n for (var i = 0; i < advices.length; i++) {\n caja.adviseFunctionBefore(o, advices[i]);\n }\n console.log(' + adviseFunctionBefore');\n return o;\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n function defCtor(path, obj, policy) {\n console.log(path + ' defCtor');\n forallkeys(policy, function(name) {\n if (!obj[name]) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n console.log(path + '.' + name + ' grant static');\n grantRead(obj, name);\n if (typeof policy[name] === 'function') {\n markFunction(obj[name]);\n }\n });\n forallkeys(policy.prototype, function(name) {\n if (!obj.prototype[name]) {\n console.log(path + '.prototype.' + name + ' skip');\n return;\n }\n console.log(path + '.prototype.' + name + ' grant instance');\n if (typeof policy.prototype[name] === 'function') {\n if (policy.prototype[name].__before__) {\n adviseFunctionBefore(obj.prototype[name], policy.prototype[name].__before__);\n }\n grantMethod(obj.prototype, name);\n } else {\n grantRead(obj.prototype, name);\n }\n });\n var sup;\n if (policy.__super__ === Object) {\n sup = Object;\n } else {\n sup = window;\n for (var i = 0; i < policy.__super__.length; i++) {\n sup = sup[policy.__super__[i]];\n }\n }\n\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n\n return markCtor(obj, sup);\n }\n\n function defFcn(path, obj, policy) {\n console.log(path + ' defFcn');\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n return markFunction(obj);\n }\n\n function defObj(path, obj, policy) {\n console.log(path + ' defObj');\n var r = {};\n forallkeys(policy, function(name) {\n var sub_obj = obj[name];\n if (!sub_obj) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n var sub_policy = policy[name];\n var sub_path = path + '.' + name;\n var t_sub_policy = typeof sub_policy;\n if (t_sub_policy === 'function') {\n if (sub_policy.__super__) {\n r[name] = defCtor(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n r[name] = defFcn(sub_path, targ(sub_obj, sub_policy), sub_policy);\n }\n } else if (t_sub_policy === 'object'){\n r[name] = defObj(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n console.log(path + '.' + name + ' grant static');\n r[name] = targ(sub_obj, sub_policy);\n grantRead(r, name);\n }\n });\n return caja.markReadOnlyRecord(r);\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n return defObj('google', window['google'], googlePolicy);\n}", "static getClassName() {\n return 'AdminGoogleSecurityContainer';\n }", "function e(t,e,r,o){var i,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,o);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(s<3?i(a):s>3?i(e,r,a):i(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "_getPageMetadata() {\n return undefined;\n }", "function emptyByteString(){return PlatformSupport.getPlatform().emptyByteString;}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.", "isGMOnly() {\n return false\n }", "function Xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.o || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "get Android() {}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):a.src&&\"IMAGE\"==c&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function assertBase64Available(){if(!PlatformSupport.getPlatform().base64Available){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Blobs are unavailable in Firestore in this environment.');}}", "function assertUint8ArrayAvailable(){if(typeof Uint8Array==='undefined'){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Uint8Arrays are not available in this environment.');}}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n ];\n }", "function WebIdUtils () {\n}", "function getGoogle(n) {\n\n}", "function dc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || ea(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (ea(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Wu) h = Ku(t.firestore, ia), f = zt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](yc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Ku(t, Hu);\n h = Ku(p.firestore, ia), f = p._query;\n var y = new fc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Qa(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, Ha(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new lu(r), s = new gs(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ps, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(oa(h), f, l, c);\n}", "function i(t){\"use strict\";var a=this,n=e;a.s=t,a._c=\"s_m\",n.s_c_in||(n.s_c_il=[],n.s_c_in=0),a._il=n.s_c_il,a._in=n.s_c_in,a._il[a._in]=a,n.s_c_in++,a.version=\"1.0\";var i,o,r,s=\"pending\",c=\"resolved\",d=\"rejected\",l=\"timeout\",u=!1,p={},m=[],g=[],f=0,b=!1,h=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var a=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(a),e.requiredVarList=e.requiredVarList.concat(a),e}();a.newCall=!1,a.newCallVariableOverrides=null,a.hitCount=0,a.timeout=1e3,a.currentHit=null,a.backup=function(e,t,a){var n,i,o,r;for(t=t||{},n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)r=i[o],t[r]=e[r],a||t[r]||(t[\"!\"+r]=1);return t},a.restore=function(e,t,a){var n,i,o,r,s,c,d=!0;for(n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)if(r=i[o],s=e[r],s||e[\"!\"+r]){if(!a&&(\"contextData\"==r||\"retrieveLightData\"==r)&&t[r])for(c in t[r])s[c]||(s[c]=t[r][c]);t[r]=s}return d},a.createHitMeta=function(e,t){var n,i=a.s,o=[],r=[];return t=t||{},n={id:e,delay:!1,restorePoint:f,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},o=a.replacePromises(i,n.values.s),r=a.replacePromises(t,n.values.variableOverrides),n.backup.s=a.backup(i),n.backup.sSet=a.backup(i,null,!0),n.backup.variableOverrides=t,(o&&o.length>0||r&&r.length>0)&&(n.delay=!0,n.status=s,n.promise=Promise.all([Promise.all(o),Promise.all(r)]).then(function(){n.delay=!1,n.status=c,n.timeout&&clearTimeout(n.timeout)}),a.timeout&&(n.timeout=setTimeout(function(){n.delay=!1,n.status=l,n.timeout&&clearTimeout(n.timeout),a.sendPendingHits()},a.timeout))),n},a.replacePromises=function(e,t){var a,n,i,o,r,l,u=[];t=t||{},o=function(e,t){return function(a){t[e].value=a,t[e].status=c}},r=function(e,t){return function(a){t[e].status=d,t[e].exception=a}},l=function(e,t,a){var n=e[t];n instanceof Promise?(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",a[t].status=s,u.push(n.then(o(t,a))[\"catch\"](r(t,a)))):\"object\"==typeof n&&null!==n&&n.promise instanceof Promise&&(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",n.hasOwnProperty(\"unresolved\")&&(a[t].value=n.unresolved),a[t].status=s,u.push(n.promise.then(o(t,a))[\"catch\"](r(t,a))))};for(a in e)if(e.hasOwnProperty(a))if(i=e[a],\"contextData\"===a||\"retrieveLightData\"===a)if(i instanceof Promise||\"object\"==typeof i&&null!==i&&i.promise instanceof Promise)l(e,a,t);else{t[a]={isGroup:!0};for(n in i)i.hasOwnProperty(n)&&l(i,n,t[a])}else l(e,a,t);return u},a.metaToObject=function(e){var t,n,i,o,r=(a.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(i=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!i.isGroup)i.value&&i.status===c&&(r[t]=i.value);else{r[t]={};for(n in i)i.hasOwnProperty(n)&&(o=i[n],o.value&&o.status===c&&(r[t][n]=o.value))}return r},a.getMeta=function(e){return e&&m[e]?m[e]:m},a.forceReady=function(){u=!0,a.sendPendingHits()},i=t.isReadyToTrack,t.isReadyToTrack=function(){return!!(!a.newCall&&i()&&g&&g.length>0&&(u||m[g[0]]&&!m[g[0]].delay))},o=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,n,i){var r,s;return n!==t.track?o(e,n,i):void(a.newCall&&(r=a.hitCount++,g.push(r),s=a.createHitMeta(r,a.newCallVariableOverrides),m[r]=s,b||(b=setInterval(a.sendPendingHits,100)),s.promise.then(function(){a.sendPendingHits()})))},r=t.t,t.t=t.track=function(e,t,n){n||(a.newCall=!0,a.newCallVariableOverrides=e),r(e,t),n||(a.newCall=!1,a.newCallVariableOverrides=null,a.sendPendingHits())},a.sendPendingHits=function(){for(var e,t,n,i,o,r=a.s;r.isReadyToTrack();){for(e=m[g[0]],a.currentHit=e,i={},o={},a.trigger(\"hitBeforeSend\",e),o.marketingCloudVisitorID=r.marketingCloudVisitorID,o.visitorOptedOut=r.visitorOptedOut,o.analyticsVisitorID=r.analyticsVisitorID,o.audienceManagerLocationHint=r.audienceManagerLocationHint,o.audienceManagerBlob=r.audienceManagerBlob,a.restore(e.backup.s,r),t=e.restorePoint;t<g[0];t++)n=a.metaToObject(m[t].values.s),delete n.referrer,delete n.resolution,delete n.colorDepth,delete n.javascriptVersion,delete n.javaEnabled,delete n.cookiesEnabled,delete n.browserWidth,delete n.browserHeight,delete n.connectionType,delete n.homepage,a.restore(n,o);a.restore(e.backup.sSet,o),a.restore(a.metaToObject(e.values.s),o),a.restore(e.backup.variableOverrides,i),a.restore(a.metaToObject(e.values.variableOverrides),i),r.track(i,o,!0),f=g.shift(),a.trigger(\"hitAfterSend\",e),a.currentHit=null}b&&g.length<1&&(clearInterval(b),b=!1)},i()||o(a,function(){a.sendPendingHits()},[]),a.on=function(e,t){p[e]||(p[e]=[]),p[e].push(t)},a.trigger=function(e,t){var a,n,i,o=!1;if(p[e])for(a=0,n=p[e].length;n>a;a++){i=p[e][a];try{i(t),o=!0}catch(e){}}else o=!0;return o},a._s=function(){a.trigger(\"_s\")},a._d=function(){return a.trigger(\"_d\"),0},a._g=function(){a.trigger(\"_g\")},a._t=function(){a.trigger(\"_t\")}}", "static get apiEndpoint() {\n return 'securitycenter.googleapis.com';\n }", "transient final protected internal function m174() {}", "function xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function sdk(){\n}", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "function start() {\n // console.log(typeof String(getKey('google')))\n // 2. Initialize the JavaScript client library.\n gapi.client.init({\n 'apiKey': \"AIzaSyABljrxKqX_RRid-9DZMq9aHGm65tuXSSk\"\n }).then(function () {\n // 3. Initialize and make the API request.\n gapi.client.request({\n 'path': `${defineRequest()}`,\n })\n }).then(function (response) {\n }, function (reason) {\n console.log(reason);\n console.log('Error: ' + reason.result.error.message);\n });\n }", "static get servicePath() {\n return 'securitycenter.googleapis.com';\n }", "function trackInAnalytics(version) {\n // Create the random UUID from 30 random hex numbers gets them into the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (with y being 8, 9, a, or b).\n var uuid = \"\";\n for (var i = 0; i < 30; i++) {\n uuid += parseInt(Math.random() * 16).toString(16);\n }\n uuid = uuid.substr(0, 8) + \"-\" + uuid.substr(8, 4) + \"-4\" + uuid.substr(12, 3) + \"-\" + parseInt(Math.random() * 4 + 8).toString(16) + uuid.substr(15, 3) + \"-\" + uuid.substr(18, 12);\n\n var url = \"http://www.google-analytics.com/collect?v=1&t=event&tid=UA-74705456-1&cid=\" + uuid + \"&ds=adwordsscript&an=qstracker&av=\"\n + version\n + \"&ec=AdWords%20Scripts&ea=Script%20Execution&el=QS%20Tracker%20v\" + version;\n UrlFetchApp.fetch(url);\n}", "static get servicePath() {\n return 'logging.googleapis.com';\n }", "function Pi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function errorGoogle() {\r\n\t\twindow.alert('Your API is NOT Valid. Please check again');\r\n}", "static final private internal function m106() {}", "transient private internal function m185() {}", "function AppMeasurement_Module_ActivityMap(h){function q(){var a=f.pageYOffset+(f.innerHeight||0);a&&a>+g&&(g=a)}function r(){if(e.scrollReachSelector){var a=h.d.querySelector&&h.d.querySelector(e.scrollReachSelector);a?(g=a.scrollTop||0,a.addEventListener(\"scroll\",function(){var d;(d=a&&a.scrollTop+a.clientHeight||0)>g&&(g=d)})):0<w--&&setTimeout(r,1E3)}}function l(a,d){var c,b,n;if(a&&d&&(c=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<c.length&&(b=c[n++]);)if(-1<a.indexOf(b))return null;p=1;return a}\nfunction s(a,d,c,b,e){var f,k;if(a.dataset&&(k=a.dataset[d]))f=k;else if(a.getAttribute)if(k=a.getAttribute(\"data-\"+c))f=k;else if(k=a.getAttribute(c))f=k;if(!f&&h.useForcedLinkTracking&&e){var g;a=a.onclick?\"\"+a.onclick:\"\";varValue=\"\";if(b&&a&&(d=a.indexOf(b),0<=d)){for(d+=b.length;d<a.length;)if(c=a.charAt(d++),0<=\"'\\\"\".indexOf(c)){g=c;break}for(k=!1;d<a.length&&g;){c=a.charAt(d);if(!k&&c===g)break;\"\\\\\"===c?k=!0:(varValue+=c,k=!1);d++}}(g=varValue)&&(h.w[b]=g)}return f||e&&h.w[b]}function t(a,d,\nc){var b;return(b=e[d](a,c))&&(p?(p=0,b):l(m(b),e[d+\"Exclusions\"]))}function u(a,d,c){var b;if(a&&!(1===(b=a.nodeType)&&(b=a.nodeName)&&(b=b.toUpperCase())&&x[b])&&(1===a.nodeType&&(b=a.nodeValue)&&(d[d.length]=b),c.a||c.t||c.s||!a.getAttribute||((b=a.getAttribute(\"alt\"))?c.a=b:(b=a.getAttribute(\"title\"))?c.t=b:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(b=a.getAttribute(\"src\")||a.src)&&(c.s=b)),(b=a.childNodes)&&b.length))for(a=0;a<b.length;a++)u(b[a],d,c)}function m(a){if(null==a||void 0==a)return a;\ntry{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=h;var f=window;f.s_c_in||(f.s_c_il=[],f.s_c_in=0);e._il=f.s_c_il;e._in=f.s_c_in;e._il[e._in]=e;f.s_c_in++;\ne._c=\"s_m\";var g=0,v,w=60;e.c={};var p=0,x={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,c,b=h.contextData,e=h.linkObject;(a=h.pageName||h.pageURL)&&(d=t(e,\"link\",h.linkName))&&(c=t(e,\"region\"))&&(b[\"a.activitymap.page\"]=a.substring(0,255),b[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,b[\"a.activitymap.region\"]=127<c.length?c.substring(0,127):c,0<g&&(b[\"a.activitymap.xy\"]=10*Math.floor(g/10)),b[\"a.activitymap.pageIDType\"]=h.pageName?1:0)};e.e=function(){e.trackScrollReach&&\n!v&&(e.scrollReachSelector?r():(q(),f.addEventListener&&f.addEventListener(\"scroll\",q,!1)),v=!0)};e.link=function(a,d){var c;if(d)c=l(m(d),e.linkExclusions);else if((c=a)&&!(c=s(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var b,f;(f=l(m(a.innerText||a.textContent),e.linkExclusions))||(u(a,b=[],c={a:void 0,t:void 0,s:void 0}),(f=l(m(b.join(\"\"))))||(f=l(m(c.a?c.a:c.t?c.t:c.s?c.s:void 0)))||!(b=(b=a.tagName)&&b.toUpperCase?b.toUpperCase():\"\")||(\"INPUT\"==b||\"SUBMIT\"==b&&a.value?f=l(m(a.value)):\"IMAGE\"==\nb&&a.src&&(f=l(m(a.src)))));c=f}return c};e.region=function(a){for(var d,c=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=s(a,c,c,c))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "get service() {\n return this.canvas.__jsonld.service; // eslint-disable-line no-underscore-dangle\n }", "function fc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || Zu(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (Zu(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Qu) h = Bu(t.firestore, na), f = Qt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](dc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Bu(t, zu);\n h = Bu(p.firestore, na), f = p._query;\n var y = new cc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Ka(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, za(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new fu(r), s = new ms(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ls, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(ra(h), f, l, c);\n}", "transient private protected internal function m182() {}", "function onYouTubeApiLoad() {\n // This API key is intended for use only in this lesson.\n // See http://goo.gl/PdPA1 to get a key for your own applications.\n gapi.client.setApiKey('AIzaSyBgAgZFXgrB_osmxLAYqTW3DAQOYKno3zI');\n\n \n}", "function SigV4Utils() { }", "function ga4(){\n try {\n return window.gtag.apply(window.gtag, arguments);\n } catch (e) {\n console.error('Could not track event. Fine if this is a test.', e, Array.from(arguments));\n }\n}", "function a(t){\"use strict\";var n=this,i=e;n.s=t,n._c=\"s_m\",i.s_c_in||(i.s_c_il=[],i.s_c_in=0),n._il=i.s_c_il,n._in=i.s_c_in,n._il[n._in]=n,i.s_c_in++,n.version=\"1.0\";var a,r,o,s=\"pending\",c=\"resolved\",u=\"rejected\",l=\"timeout\",d=!1,f={},p=[],g=[],h=0,m=!1,v=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var n=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(n),e.requiredVarList=e.requiredVarList.concat(n),e}(),b=!1;n.newHit=!1,n.newHitVariableOverrides=null,n.hitCount=0,n.timeout=1e3,n.currentHit=null,n.backup=function(e,t,n){var i,a,r,o;for(t=t||{},i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)o=a[r],t[o]=e[o],n||t[o]||(t[\"!\"+o]=1);return t},n.restore=function(e,t,n){var i,a,r,o,s,c,u=!0;for(i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)if(o=a[r],s=e[o],s||e[\"!\"+o]){if(!n&&(\"contextData\"==o||\"retrieveLightData\"==o)&&t[o])for(c in t[o])s[c]||(s[c]=t[o][c]);t[o]=s}return u},n.createHitMeta=function(e,t){var i,a=n.s,r=[],o=[];return b&&console.log(a.account+\" - createHitMeta\"),t=t||{},i={id:e,delay:!1,restorePoint:h,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},r=n.replacePromises(a,i.values.s),o=n.replacePromises(t,i.values.variableOverrides),i.backup.s=n.backup(a),i.backup.sSet=n.backup(a,null,!0),i.backup.variableOverrides=t,(r&&r.length>0||o&&o.length>0)&&(i.delay=!0,i.status=s,i.promise=Promise.all([Promise.all(r),Promise.all(o)]).then(function(){i.delay=!1,i.status=c,i.timeout&&clearTimeout(i.timeout)}),n.timeout&&(i.timeout=setTimeout(function(){i.delay=!1,i.status=l,i.timeout&&clearTimeout(i.timeout),n.sendPendingHits()},n.timeout))),i},n.replacePromises=function(e,t){var n,i,a,r,o,l,d=[];t=t||{},r=function(e,t){return function(n){t[e].value=n,t[e].status=c}},o=function(e,t){return function(n){t[e].status=u,t[e].exception=n}},l=function(e,t,n){var i=e[t];i instanceof Promise?(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",n[t].status=s,d.push(i.then(r(t,n))[\"catch\"](o(t,n)))):\"object\"==typeof i&&null!==i&&i.promise instanceof Promise&&(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",i.hasOwnProperty(\"unresolved\")&&(n[t].value=i.unresolved),n[t].status=s,d.push(i.promise.then(r(t,n))[\"catch\"](o(t,n))))};for(n in e)if(e.hasOwnProperty(n))if(a=e[n],\"contextData\"===n||\"retrieveLightData\"===n)if(a instanceof Promise||\"object\"==typeof a&&null!==a&&a.promise instanceof Promise)l(e,n,t);else{t[n]={isGroup:!0};for(i in a)a.hasOwnProperty(i)&&l(a,i,t[n])}else l(e,n,t);return d},n.metaToObject=function(e){var t,i,a,r,o=(n.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(a=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!a.isGroup)a.value&&a.status===c&&(o[t]=a.value);else{o[t]={};for(i in a)a.hasOwnProperty(i)&&(r=a[i],r.value&&r.status===c&&(o[t][i]=r.value))}return o},n.getMeta=function(e){return e&&p[e]?p[e]:p},n.forceReady=function(){d=!0,n.sendPendingHits()},a=t.isReadyToTrack,t.isReadyToTrack=function(){if(!n.newHit&&a()&&g&&g.length>0&&(d||p[g[0]]&&!p[g[0]].delay))return b&&console.log(t.account+\" - isReadyToTrack - true\"),!0;if(b&&(console.log(t.account+\" - isReadyToTrack - false\"),console.log(t.account+\" - isReadyToTrack - isReadyToTrack(original) - \"+a()),!a()))try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - isReadyToTrack - \"+e.stack)}return!1},r=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,i,a){var o,s;return b&&console.log(t.account+\" - callbackWhenReadyToTrack\"),i!==t.track?r(e,i,a):void(n.newHit&&(o=n.hitCount++,g.push(o),s=n.createHitMeta(o,n.newHitVariableOverrides),p[o]=s,m||(m=setInterval(n.sendPendingHits,100)),s.promise.then(function(){n.sendPendingHits()})))},o=t.t,t.t=t.track=function(e,i,a){b&&console.log(t.account+\" - track\"),a||(n.newHit=!0,n.newHitVariableOverrides=e),o(e,i),a||(n.newHit=!1,n.newHitVariableOverrides=null,n.sendPendingHits())},n.sendPendingHits=function(){var e,t,i,a,r,o=n.s;for(b&&console.log(o.account+\" - sendPendingHits\");o.isReadyToTrack();){for(e=p[g[0]],n.currentHit=e,a={},r={},n.trigger(\"hitBeforeSend\",e),r.marketingCloudVisitorID=o.marketingCloudVisitorID,r.visitorOptedOut=o.visitorOptedOut,r.analyticsVisitorID=o.analyticsVisitorID,r.audienceManagerLocationHint=o.audienceManagerLocationHint,r.audienceManagerBlob=o.audienceManagerBlob,b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.s,o),t=e.restorePoint;t<g[0];t++)i=n.metaToObject(p[t].values.s),delete i.referrer,delete i.resolution,delete i.colorDepth,delete i.javascriptVersion,delete i.javaEnabled,delete i.cookiesEnabled,delete i.browserWidth,delete i.browserHeight,delete i.connectionType,delete i.homepage,n.restore(i,r);b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.sSet,r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(n.metaToObject(e.values.s),r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.variableOverrides,a),n.restore(n.metaToObject(e.values.variableOverrides),a),o.track(a,r,!0),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),h=g.shift(),n.trigger(\"hitAfterSend\",e),n.currentHit=null}m&&g.length<1&&(clearInterval(m),m=!1)},b&&console.log(t.account+\" - INITIAL isReadyToTrack - \"+a()),a()||r(n,function(){if(b)try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - callbackWhenReadyToTrack - \"+e.stack)}n.sendPendingHits()},[]),n.on=function(e,t){f[e]||(f[e]=[]),f[e].push(t)},n.trigger=function(e,t){var n,i,a,r=!1;if(f[e])for(n=0,i=f[e].length;i>n;n++){a=f[e][n];try{a(t),r=!0}catch(o){}}else r=!0;return r},n._s=function(){n.trigger(\"_s\")},n._d=function(){return n.trigger(\"_d\"),0},n._g=function(){n.trigger(\"_g\")},n._t=function(){n.trigger(\"_t\")}}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Un = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.Qn(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && A(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "function googleApiClientReady() {\n loadAPIClientInterfaces();\n /*console.log(\"Getting ready\");\n gapi.auth.init(function() {\n window.setTimeout(checkAuth, 1);\n });*/\n}", "function M() {\n if (\"undefined\" == typeof atob) throw new P(R.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "supportsPlatform() {\n return true;\n }", "function version(){ return \"0.13.0\" }", "function getClientVersion() { return '0.14.4'; }", "get api() {\n return google;\n }", "function googleAPIError() {\n alert('Fail to connect to Google API.');\n}", "async function main() {\n try {\n const oAuth2Client = await getAuthenticatedClient();\n // Make a simple request to the Google Plus API using our pre-authenticated client. The `request()` method\n // takes an AxiosRequestConfig object. Visit https://github.com/axios/axios#request-config.\n // const url = 'https://www.googleapis.com/plus/v1/people?query=pizza';\n\n console.log(oAuth2Client);\n var call_creds = grpc.credentials.createFromGoogleCredential(oAuth2Client);\n var combined_creds = grpc.credentials.combineChannelCredentials(ssl_creds, call_creds);\n var stub = new authProto.Greeter('greeter.googleapis.com', combined_credentials);\n const res = await oAuth2Client.request({scope})\n console.log(res.data);\n } catch (e) {\n console.error(e);\n }\n process.exit();\n}", "function Ci(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function initGAPI() {\r\n if (!app.google.api.length) {\r\n jQuery(\".az-gg-login-btn\").remove();\r\n return;\r\n }\r\n gapi.load(\"auth2\", function () {\r\n gapi.auth2.init({\r\n client_id: app.google.api\r\n })\r\n .then(function (response) {\r\n // console.log('Google API Success');\r\n app.google.hasValidApi = true;\r\n // console.log(response);\r\n })\r\n .catch(function (error) {\r\n console.log('Google API Error');\r\n app.google.hasValidApi = false;\r\n // console.log(error);\r\n });\r\n });\r\n}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n 'https://www.googleapis.com/auth/cloud-platform.read-only',\n 'https://www.googleapis.com/auth/logging.admin',\n 'https://www.googleapis.com/auth/logging.read',\n 'https://www.googleapis.com/auth/logging.write',\n ];\n }", "function DWRUtil() { }", "onGoogleLogin(response) {\n console.log(response);\n }", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "function AppMeasurement_Module_ActivityMap(f) {\n function g(a, d) {\n var b, c, n;\n if (a && d && (b = e.c[d] || (e.c[d] = d.split(\",\"))))\n for (n = 0; n < b.length && (c = b[n++]) ;)\n if (-1 < a.indexOf(c)) return null;\n p = 1;\n return a;\n }\n\n function q(a, d, b, c, e) {\n var g, h;\n if (a.dataset && (h = a.dataset[d])) g = h;\n else if (a.getAttribute)\n if (h = a.getAttribute(\"data-\" + b)) g = h;\n else if (h = a.getAttribute(b)) g = h;\n if (!g && f.useForcedLinkTracking && e && (g = \"\", d = a.onclick ? \"\" + a.onclick : \"\")) {\n b = d.indexOf(c);\n var l, k;\n if (0 <= b) {\n for (b += 10; b < d.length && 0 <= \"= \\t\\r\\n\".indexOf(d.charAt(b)) ;) b++;\n if (b < d.length) {\n h = b;\n for (l = k = 0; h < d.length && (\";\" != d.charAt(h) || l) ;) l ? d.charAt(h) != l || k ? k = \"\\\\\" == d.charAt(h) ? !k : 0 : l = 0 : (l = d.charAt(h), '\"' != l && \"'\" != l && (l = 0)), h++;\n if (d = d.substring(b, h)) a.e = new Function(\"s\", \"var e;try{s.w.\" + c + \"=\" + d + \"}catch(e){}\"), a.e(f);\n }\n }\n }\n return g || e && f.w[c];\n }\n\n function r(a, d, b) {\n var c;\n return (c = e[d](a, b)) && (p ? (p = 0, c) : g(k(c), e[d + \"Exclusions\"]));\n }\n\n function s(a, d, b) {\n var c;\n if (a && !(1 === (c = a.nodeType) && (c = a.nodeName) && (c = c.toUpperCase()) && t[c]) && (1 === a.nodeType && (c = a.nodeValue) && (d[d.length] = c), b.a ||\n b.t || b.s || !a.getAttribute || ((c = a.getAttribute(\"alt\")) ? b.a = c : (c = a.getAttribute(\"title\")) ? b.t = c : \"IMG\" == (\"\" + a.nodeName).toUpperCase() && (c = a.getAttribute(\"src\") || a.src) && (b.s = c)), (c = a.childNodes) && c.length))\n for (a = 0; a < c.length; a++) s(c[a], d, b);\n }\n\n function k(a) {\n if (null == a || void 0 == a) return a;\n try {\n return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\", \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\", \"mg\"), \" \").substring(0, 254);\n } catch (d) { }\n }\n var e = this;\n e.s = f;\n var m = window;\n m.s_c_in || (m.s_c_il = [], m.s_c_in = 0);\n e._il = m.s_c_il;\n e._in = m.s_c_in;\n e._il[e._in] = e;\n m.s_c_in++;\n e._c = \"s_m\";\n e.c = {};\n var p = 0,\n t = {\n SCRIPT: 1,\n STYLE: 1,\n LINK: 1,\n CANVAS: 1\n };\n e._g = function () {\n var a, d, b, c = f.contextData,\n e = f.linkObject;\n (a = f.pageName || f.pageURL) && (d = r(e, \"link\", f.linkName)) && (b = r(e, \"region\")) && (c[\"a.activitymap.page\"] = a.substring(0,\n 255), c[\"a.activitymap.link\"] = 128 < d.length ? d.substring(0, 128) : d, c[\"a.activitymap.region\"] = 127 < b.length ? b.substring(0, 127) : b, c[\"a.activitymap.pageIDType\"] = f.pageName ? 1 : 0);\n };\n e.link = function (a, d) {\n var b;\n if (d) b = g(k(d), e.linkExclusions);\n else if ((b = a) && !(b = q(a, \"sObjectId\", \"s-object-id\", \"s_objectID\", 1))) {\n var c, f;\n (f = g(k(a.innerText || a.textContent), e.linkExclusions)) || (s(a, c = [], b = {\n a: void 0,\n t: void 0,\n s: void 0\n }), (f = g(k(c.join(\"\")))) || (f = g(k(b.a ? b.a : b.t ? b.t : b.s ? b.s : void 0))) || !(c = (c = a.tagName) && c.toUpperCase ? c.toUpperCase() :\n \"\") || (\"INPUT\" == c || \"SUBMIT\" == c && a.value ? f = g(k(a.value)) : a.src && \"IMAGE\" == c && (f = g(k(a.src)))));\n b = f;\n }\n return b;\n };\n e.region = function (a) {\n for (var d, b = e.regionIDAttribute || \"id\"; a && (a = a.parentNode) ;) {\n if (d = q(a, b, b, b)) return d;\n if (\"BODY\" == a.nodeName) return \"BODY\";\n }\n };\n }", "static private protected internal function m118() {}", "static transient final protected internal function m47() {}", "function vc() {\n if (\"undefined\" == typeof atob) throw new T(E.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Tt = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.It(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && S(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "transient protected internal function m189() {}", "function gc() {\n if (\"undefined\" == typeof atob) throw new S(_.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function googleError(){\n alert(\"Google API failed to load.\");\n //console.log(\"error\");\n}", "function initializeApi() {\n gapi.client.load('storage', API_VERSION);\n}", "function tt() {\n if (\"undefined\" == typeof atob) throw new c(a.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function firebase_setup(){\n /*\n var firebaseConfig = {\n apiKey: \"AIzaSyB0ZY93KxJK4UIRVnyXWqNm2V1l1M-4j_4\",\n authDomain: \"office-inventory-12f99.firebaseapp.com\",\n databaseURL: \"https://office-inventory-12f99.firebaseio.com\",\n projectId: \"office-inventory-12f99\",\n storageBucket: \"office-inventory-12f99.appspot.com\",\n messagingSenderId: \"147848186588\",\n appId: \"1:147848186588:web:33dbc8d727af1de4\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n db = firebase.firestore();\n */\n}", "refreshCacheTTL() {\n // This comment is here to please Sonarqube. It requires a comment\n // explaining why a function is empty, but there is no sense\n // duplicating what has been just said in the JSDoc.\n // So, instead, here are the lyrics or Daft Punk's \"Around the world\":\n //\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // [repeat 66 more times]\n // Around the world, around the world.\n }", "function onApiLoaded() {\n GMapApi.gmapApi = {}\n return window.google\n }", "static transient final protected public internal function m46() {}", "getGoogleId(){\n return this.google_id;\n }", "function googleError(){\r\n alert('Could not fetch data');\r\n}", "async function main() {\n const bucketName = process.env.BUCKET_NAME;\n const objectName = process.env.OBJECT_NAME;\n // Defines a credential access boundary that grants objectViewer access in\n // the specified bucket.\n const cab = {\n accessBoundary: {\n accessBoundaryRules: [\n {\n availableResource: `//storage.googleapis.com/projects/_/buckets/${bucketName}`,\n availablePermissions: ['inRole:roles/storage.objectViewer'],\n availabilityCondition: {\n expression:\n \"resource.name.startsWith('projects/_/buckets/\" +\n `${bucketName}/objects/${objectName}')`,\n },\n },\n ],\n },\n };\n\n const googleAuth = new GoogleAuth({\n scopes: 'https://www.googleapis.com/auth/cloud-platform',\n });\n const projectId = await googleAuth.getProjectId();\n // Obtain an authenticated client via ADC.\n const client = await googleAuth.getClient();\n // Use the client to generate a DownscopedClient.\n const cabClient = new DownscopedClient(client, cab);\n\n // OAuth 2.0 Client\n const authClient = new OAuth2Client();\n // Define a refreshHandler that will be used to refresh the downscoped token\n // when it expires.\n authClient.refreshHandler = async () => {\n const refreshedAccessToken = await cabClient.getAccessToken();\n return {\n access_token: refreshedAccessToken.token,\n expiry_date: refreshedAccessToken.expirationTime,\n };\n };\n\n const storageOptions = {\n projectId,\n authClient: new GoogleAuth({authClient}),\n };\n\n const storage = new Storage(storageOptions);\n const downloadFile = await storage\n .bucket(bucketName)\n .file(objectName)\n .download();\n console.log('Successfully retrieved file. Contents:');\n console.log(downloadFile.toString('utf8'));\n}", "function Ec() {\n if (\"undefined\" == typeof atob) throw new G(j.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "transient final private internal function m170() {}", "function startFirebase() {\n// Initialize Firebase\n var config = {\n apiKey: \"AIzaSyDAraVHUUUkR4L0yNE3P2n2jiF2jTNy6Kg\",\n authDomain: \"rps-multiplayer-e8125.firebaseapp.com\",\n databaseURL: \"https://rps-multiplayer-e8125.firebaseio.com\",\n projectId: \"rps-multiplayer-e8125\",\n storageBucket: \"rps-multiplayer-e8125.appspot.com\",\n messagingSenderId: \"763015821378\"\n };\n\n firebase.initializeApp(config);\n\n}", "function init() {\n gapi.client.setApiKey(\"AIzaSyCIL7jjwmYLVQW8XHqn6zBX9pp0264RJoM\");\n gapi.client.load(\"civicinfo\", \"v2\")\n .then( () => {\n console.log(\"loaded\");\n })\n .then(addSearchListener());\n}", "function getGAauthenticationToken(email, password) {\n password = encodeURIComponent(password);\n var response = UrlFetchApp.fetch(\"https://www.google.com/accounts/ClientLogin\", {\n method: \"post\",\n payload: \"accountType=GOOGLE&Email=\" + email + \"&Passwd=\" + password + \"&service=fusiontables&Source=testing\"\n });\n \n\tvar responseStr = response.getContentText();\n\tresponseStr = responseStr.slice(responseStr.search(\"Auth=\") + 5, responseStr.length);\n\tresponseStr = responseStr.replace(/\\n/g, \"\");\n\treturn responseStr;\n}", "transient final private protected public internal function m166() {}", "static transient final private internal function m43() {}", "protected internal function m252() {}", "function heyGoogle( name ) {\n // console.log(\"Yes Jacob?\");\n console.log(`Yes ${ name }?`);\n}", "static transient final private protected internal function m40() {}", "static hd() {\n return firebase.storage();\n }", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "function supportedGeolocAPI () {\n if (window.navigator.geolocation) {\n return \"w3c\";\n } else {\n return \"none\";\n }\n}", "getGoogleResponse() {\n return this.getNormalResponse();\n }", "function setupChromeApis() {\n new MockChromeStorageAPI();\n}", "static final private public function m104() {}", "function getGoogleData () {\n var googleIds = main(1)\n for (var googleObject in googleIds) {\n var gId = googleIds[googleObject].cellValue\n gStore.app({appId: gId}).then((data) => {\n console.log({\n dataId: data.appId, \n price: data.price,\n versionText: data.androidVersionText, \n developer: data.developer, \n developerWebsite: data.developerWebsite\n }) \n console.log(\"\")\n }).catch( (err) => {\n });\n }\n}", "function googleMapAPIScript() {\n\t// https://maps.google.com/maps?q=225+delaware+avenue,+Buffalo,+NY&hl=en&sll=42.746632,-75.770041&sspn=5.977525,8.591309&t=h&hnear=225+Delaware+Ave,+Buffalo,+Erie,+New+York+14202&z=16\n\t// API key console\n\t// https://code.google.com/apis/console\n\t// BfloFRED API Key : key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q\n\n\tvar script = document.createElement(\"script\");\n\t// Load the Google Maps API : required\n\t// https://developers.google.com/maps/documentation/javascript/tutorial\n\tscript.src = \"http://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q&sensor=true\";\n\tdocument.head.appendChild(script);\n}", "transient final private protected internal function m167() {}" ]
[ "0.57512176", "0.5345903", "0.52893716", "0.5242048", "0.5074461", "0.50543845", "0.50521696", "0.5051502", "0.5051502", "0.5027637", "0.4989611", "0.498545", "0.49730507", "0.49567991", "0.4916299", "0.48886392", "0.4876151", "0.48606881", "0.48606881", "0.48490617", "0.48490617", "0.48435485", "0.48295322", "0.48123735", "0.47831675", "0.4768704", "0.47340217", "0.4720092", "0.47187722", "0.4709046", "0.4693696", "0.46882945", "0.46855348", "0.46846828", "0.46788326", "0.4678405", "0.46775785", "0.46773046", "0.46752015", "0.46745238", "0.46729264", "0.46707234", "0.4664581", "0.46463197", "0.46441376", "0.46361956", "0.46249402", "0.46208033", "0.46192744", "0.46104193", "0.46062222", "0.46045882", "0.45942646", "0.45928755", "0.45910943", "0.45833793", "0.45830405", "0.45809963", "0.45779058", "0.4577811", "0.45748523", "0.45707053", "0.45573023", "0.4547042", "0.45421642", "0.45365164", "0.45328885", "0.45308247", "0.45239997", "0.45184344", "0.45129567", "0.44994783", "0.4498293", "0.448557", "0.44852275", "0.4481251", "0.44732192", "0.44666508", "0.4465513", "0.44496667", "0.44484794", "0.44476423", "0.4446629", "0.44436583", "0.443799", "0.4437923", "0.4434733", "0.4430508", "0.44291753", "0.44167104", "0.44139627", "0.44126382", "0.44071183", "0.44064862", "0.4404661", "0.44035488", "0.43892667", "0.43881297", "0.43878698", "0.43864462", "0.43859112" ]
0.0
-1
Copyright 2018 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function yg() { this.b = null;this.a = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "constructor() {\n this.authToken = null;\n this.dataSourceIdMap = {};\n this.scopeMap = {};\n this.dataSourceIdMap[\"com.google.step_count.delta\"] = \"derived:com.google.step_count.delta:com.google.android.gms:estimated_steps\";\n this.dataSourceIdMap[\"com.google.calories.expended\"] = \"derived:com.google.calories.expended:com.google.android.gms:merge_calories_expended\";\n this.dataSourceIdMap[\"com.google.distance.delta\"] = \"derived:com.google.distance.delta:com.google.android.gms:merge_distance_delta\";\n this.dataSourceIdMap[\"com.google.heart_rate.bpm\"] = \"derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm\";\n this.dataSourceIdMap[\"com.google.weight\"] = \"derived:com.google.weight:com.google.android.gms:merge_weight\";\n this.dataSourceIdMap[\"com.google.blood_pressure\"] = \"derived:com.google.blood_pressure:com.google.android.gms:merged\";\n\n this.scopeMap[\"com.google.heart_rate.bpm\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.weight\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.blood_pressure\"] = \"https://www.googleapis.com/auth/fitness.blood_pressure.read https://www.googleapis.com/auth/fitness.blood_pressure.write\";\n\n }", "private internal function m248() {}", "private public function m246() {}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function gn() {\n if (!pe.Lt().ia) throw new c(h.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function emptyByteString(){return PlatformSupport.getPlatform().emptyByteString;}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.", "_getPageMetadata() {\n return undefined;\n }", "function t(e,t,a,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "function Xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.o || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function e(t,e,r,o){var i,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,o);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(s<3?i(a):s>3?i(e,r,a):i(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "static getClassName() {\n return 'AdminGoogleSecurityContainer';\n }", "function defGoogle(frame) {\n\n var googlePolicy = (function() {\n\n var google = {};\n\n function drawBeforeAdvice(f, self, args) {\n var result = [ args[0] ];\n for (var i = 1; i < args.length; i++) {\n result.push(copyJson(args[i]));\n }\n return result;\n }\n\n function opaqueNodeAdvice(f, self, args) {\n return [ opaqueNode(args[0]) ];\n }\n\n ////////////////////////////////////////////////////////////////////////\n // gViz integration\n\n google.visualization = {};\n\n /** @constructor */\n google.visualization.DataTable = function(opt_data, opt_version) {};\n google.visualization.DataTable.__super__ = Object;\n google.visualization.DataTable.prototype.getNumberOfRows = function() {};\n google.visualization.DataTable.prototype.getNumberOfColumns = function() {};\n google.visualization.DataTable.prototype.clone = function() {};\n google.visualization.DataTable.prototype.getColumnId = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnIndex = function(columnId) {};\n google.visualization.DataTable.prototype.getColumnLabel = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnPattern = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnRole = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnType = function(columnIndex) {};\n google.visualization.DataTable.prototype.getValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getFormattedValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getProperty = function(rowIndex, columnIndex, property) {};\n google.visualization.DataTable.prototype.getProperties = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getTableProperties = function() {};\n google.visualization.DataTable.prototype.getTableProperty = function(property) {};\n google.visualization.DataTable.prototype.setTableProperties = function(properties) {};\n google.visualization.DataTable.prototype.setTableProperty = function(property, value) {};\n google.visualization.DataTable.prototype.setValue = function(rowIndex, columnIndex, value) {};\n google.visualization.DataTable.prototype.setFormattedValue = function(rowIndex, columnIndex, formattedValue) {};\n google.visualization.DataTable.prototype.setProperties = function(rowIndex, columnIndex, properties) {};\n google.visualization.DataTable.prototype.setProperty = function(rowIndex, columnIndex, property, value) {};\n google.visualization.DataTable.prototype.setCell = function(rowIndex, columnIndex, opt_value, opt_formattedValue, opt_properties) {};\n google.visualization.DataTable.prototype.setRowProperties = function(rowIndex, properties) {};\n google.visualization.DataTable.prototype.setRowProperty = function(rowIndex, property, value) {};\n google.visualization.DataTable.prototype.getRowProperty = function(rowIndex, property) {};\n google.visualization.DataTable.prototype.getRowProperties = function(rowIndex) {};\n google.visualization.DataTable.prototype.setColumnLabel = function(columnIndex, newLabel) {};\n google.visualization.DataTable.prototype.setColumnProperties = function(columnIndex, properties) {};\n google.visualization.DataTable.prototype.setColumnProperty = function(columnIndex, property, value) {};\n google.visualization.DataTable.prototype.getColumnProperty = function(columnIndex, property) {};\n google.visualization.DataTable.prototype.getColumnProperties = function(columnIndex) {};\n google.visualization.DataTable.prototype.insertColumn = function(atColIndex, type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.addColumn = function(type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.insertRows = function(atRowIndex, numOrArray) {};\n google.visualization.DataTable.prototype.addRows = function(numOrArray) {};\n google.visualization.DataTable.prototype.addRow = function(opt_cellArray) {};\n google.visualization.DataTable.prototype.getColumnRange = function(columnIndex) {};\n google.visualization.DataTable.prototype.getSortedRows = function(sortColumns) {};\n google.visualization.DataTable.prototype.sort = function(sortColumns) {};\n google.visualization.DataTable.prototype.getDistinctValues = function(column) {};\n google.visualization.DataTable.prototype.getFilteredRows = function(columnFilters) {};\n google.visualization.DataTable.prototype.removeRows = function(fromRowIndex, numRows) {};\n google.visualization.DataTable.prototype.removeRow = function(rowIndex) {};\n google.visualization.DataTable.prototype.removeColumns = function(fromColIndex, numCols) {};\n google.visualization.DataTable.prototype.removeColumn = function(colIndex) {};\n\n /** @return {string} JSON representation. */\n google.visualization.DataTable.prototype.toJSON = function() {\n return copyJson(this.toJSON());\n };\n google.visualization.DataTable.prototype.toJSON.__subst__ = true;\n\n google.visualization.arrayToDataTable = function(arr) {};\n\n /** @constructor */\n google.visualization.AreaChart = function(container) {};\n google.visualization.AreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.AreaChart.__super__ = Object;\n google.visualization.AreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.AreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.AreaChart.prototype.clearChart = function() {};\n // google.visualization.AreaChart.prototype.getSelection = function() {};\n // google.visualization.AreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BarChart = function(container) {};\n google.visualization.BarChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BarChart.__super__ = Object;\n google.visualization.BarChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BarChart.prototype.clearChart = function() {};\n // google.visualization.BarChart.prototype.getSelection = function() {};\n // google.visualization.BarChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BubbleChart = function(container) {};\n google.visualization.BubbleChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BubbleChart.__super__ = Object;\n google.visualization.BubbleChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BubbleChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.BubbleChart.prototype.clearChart = function() {};\n // google.visualization.BubbleChart.prototype.getSelection = function() {};\n // google.visualization.BubbleChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.CandlestickChart = function(container) {};\n google.visualization.CandlestickChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.CandlestickChart.__super__ = Object;\n google.visualization.CandlestickChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.CandlestickChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.CandlestickChart.prototype.clearChart = function() {};\n // google.visualization.CandlestickChart.prototype.getSelection = function() {};\n // google.visualization.CandlestickChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ColumnChart = function(container) {};\n google.visualization.ColumnChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ColumnChart.__super__ = Object;\n google.visualization.ColumnChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ColumnChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ColumnChart.prototype.clearChart = function() {};\n // google.visualization.ColumnChart.prototype.getSelection = function() {};\n // google.visualization.ColumnChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ComboChart = function(container) {};\n google.visualization.ComboChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ComboChart.__super__ = Object;\n google.visualization.ComboChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ComboChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ComboChart.prototype.clearChart = function() {};\n // google.visualization.ComboChart.prototype.getSelection = function() {};\n // google.visualization.ComboChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Gauge = function(container) {};\n google.visualization.Gauge.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Gauge.__super__ = Object;\n google.visualization.Gauge.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Gauge.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Gauge.prototype.clearChart = function() {};\n\n /** @constructor */\n google.visualization.GeoChart = function(container) {};\n google.visualization.GeoChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.GeoChart.__super__ = Object;\n // google.visualization.GeoChart.mapExists = function(userOptions) {};\n google.visualization.GeoChart.prototype.clearChart = function() {};\n google.visualization.GeoChart.prototype.draw = function(dataTable, userOptions, opt_state) {};\n google.visualization.GeoChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n // google.visualization.GeoChart.prototype.getSelection = function() {};\n // google.visualization.GeoChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.LineChart = function(container) {};\n google.visualization.LineChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.LineChart.__super__ = Object;\n google.visualization.LineChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.LineChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.LineChart.prototype.clearChart = function() {};\n // google.visualization.LineChart.prototype.getSelection = function() {};\n // google.visualization.LineChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.PieChart = function(container) {};\n google.visualization.PieChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.PieChart.__super__ = Object;\n google.visualization.PieChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.PieChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.PieChart.prototype.clearChart = function() {};\n // google.visualization.PieChart.prototype.getSelection = function() {};\n // google.visualization.PieChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ScatterChart = function(container) {};\n google.visualization.ScatterChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ScatterChart.__super__ = Object;\n google.visualization.ScatterChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ScatterChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ScatterChart.prototype.clearChart = function() {};\n // google.visualization.ScatterChart.prototype.getSelection = function() {};\n // google.visualization.ScatterChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.SteppedAreaChart = function(container) {};\n google.visualization.SteppedAreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.SteppedAreaChart.__super__ = Object;\n google.visualization.SteppedAreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.SteppedAreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.SteppedAreaChart.prototype.clearChart = function() {};\n // google.visualization.SteppedAreaChart.prototype.getSelection = function() {};\n // google.visualization.SteppedAreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Table = function(container) {};\n google.visualization.Table.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Table.__super__ = Object;\n google.visualization.Table.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Table.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Table.prototype.clearChart = function() {};\n // google.visualization.Table.prototype.getSortInfo = function() {};\n // google.visualization.Table.prototype.getSelection = function() {};\n // google.visualization.Table.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.TreeMap = function(container) {};\n google.visualization.TreeMap.__before__ = [ opaqueNodeAdvice ];\n google.visualization.TreeMap.__super__ = Object;\n google.visualization.TreeMap.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.TreeMap.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.TreeMap.prototype.clearChart = function() {};\n // google.visualization.TreeMap.prototype.getSelection = function() {};\n // google.visualization.TreeMap.prototype.setSelection = function(selection) {};\n\n ////////////////////////////////////////////////////////////////////////\n // OnePick integration\n\n google.picker = {};\n\n google.picker.DocsUploadView = function() {};\n google.picker.DocsUploadView.__super__ = Object;\n google.picker.DocsUploadView.prototype.setIncludeFolders = function(boolean) {};\n\n google.picker.View = function() {};\n google.picker.View.__super__ = Object;\n google.picker.View.prototype.getId = function() {};\n google.picker.View.prototype.setMimeTypes = function() {};\n google.picker.View.prototype.setQuery = function() {};\n\n google.picker.DocsView = function() {};\n google.picker.DocsView.__super__ = ['google', 'picker', 'View'];\n google.picker.DocsView.prototype.setIncludeFolders = function() {};\n google.picker.DocsView.prototype.setMode = function() {};\n google.picker.DocsView.prototype.setOwnedByMe = function() {};\n google.picker.DocsView.prototype.setStarred = function() {};\n\n google.picker.DocsViewMode = {};\n google.picker.DocsViewMode.GRID = 1;\n google.picker.DocsViewMode.LIST = 1;\n\n google.picker.Feature = {};\n google.picker.Feature.MINE_ONLY = 1;\n google.picker.Feature.MULTISELECT_ENABLED = 1;\n google.picker.Feature.NAV_HIDDEN = 1;\n google.picker.Feature.SIMPLE_UPLOAD_ENABLED = 1;\n\n google.picker.ImageSearchView = function() {};\n google.picker.ImageSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.ImageSearchView.prototype.setLicense = function() {};\n google.picker.ImageSearchView.prototype.setSite = function() {};\n google.picker.ImageSearchView.prototype.setSize = function() {};\n\n google.picker.ImageSearchView.License = {};\n google.picker.ImageSearchView.License.NONE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE_WITH_MODIFICATION = 1;\n google.picker.ImageSearchView.License.REUSE = 1;\n google.picker.ImageSearchView.License.REUSE_WITH_MODIFICATION = 1;\n\n google.picker.ImageSearchView.Size = {};\n google.picker.ImageSearchView.Size.SIZE_QSVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_VGA = 1;\n google.picker.ImageSearchView.Size.SIZE_SVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_XGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA2 = 1;\n google.picker.ImageSearchView.Size.SIZE_2MP = 1;\n google.picker.ImageSearchView.Size.SIZE_4MP = 1;\n google.picker.ImageSearchView.Size.SIZE_6MP = 1;\n google.picker.ImageSearchView.Size.SIZE_8MP = 1;\n google.picker.ImageSearchView.Size.SIZE_10MP = 1;\n google.picker.ImageSearchView.Size.SIZE_12MP = 1;\n google.picker.ImageSearchView.Size.SIZE_15MP = 1;\n google.picker.ImageSearchView.Size.SIZE_20MP = 1;\n google.picker.ImageSearchView.Size.SIZE_40MP = 1;\n google.picker.ImageSearchView.Size.SIZE_70MP = 1;\n google.picker.ImageSearchView.Size.SIZE_140MP = 1;\n\n google.picker.MapsView = function() {};\n google.picker.MapsView.__super__ = ['google', 'picker', 'View'];\n google.picker.MapsView.prototype.setCenter = function() {};\n google.picker.MapsView.prototype.setZoom = function() {};\n\n google.picker.PhotoAlbumsView = function() {};\n google.picker.PhotoAlbumsView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.PhotosView = function() {};\n google.picker.PhotosView.__super__ = ['google', 'picker', 'View'];\n google.picker.PhotosView.prototype.setType = function() {};\n\n google.picker.PhotosView.Type = {};\n google.picker.PhotosView.Type.FEATURED = 1;\n google.picker.PhotosView.Type.UPLOADED = 1;\n\n var SECRET = {};\n\n google.picker.Picker = function() {\n if (arguments[0] !== SECRET) { throw new TypeError(); }\n this.v = arguments[1];\n };\n google.picker.Picker.__super__ = Object;\n google.picker.Picker.__subst__ = true;\n google.picker.Picker.prototype.isVisible = function() {\n return this.v.isVisible();\n };\n google.picker.Picker.prototype.setCallback = function(c) {\n this.v.setCallback(c);\n };\n google.picker.Picker.prototype.setRelayUrl = function(u) {\n this.v.setRelayUrl(u);\n };\n google.picker.Picker.prototype.setVisible = function(b) {\n this.v.setVisible(b);\n };\n\n/*\n google.picker.PickerBuilder = function() {};\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {};\n google.picker.PickerBuilder.prototype.addViewGroup = function() {};\n google.picker.PickerBuilder.prototype.build = function() {};\n google.picker.PickerBuilder.prototype.disableFeature = function() {};\n google.picker.PickerBuilder.prototype.enableFeature = function() {};\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.getTitle = function() {};\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {};\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {};\n google.picker.PickerBuilder.prototype.setAppId = function() {};\n google.picker.PickerBuilder.prototype.setAuthUser = function() {};\n google.picker.PickerBuilder.prototype.setCallback = function() {};\n google.picker.PickerBuilder.prototype.setDocument = function() {};\n google.picker.PickerBuilder.prototype.setLocale = function() {};\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {};\n google.picker.PickerBuilder.prototype.setSize = function() {};\n google.picker.PickerBuilder.prototype.setTitle = function() {}; // TODO: Add \"trusted path\" annotation\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {};\n google.picker.PickerBuilder.prototype.toUri = function() {};\n*/\n\n google.picker.PickerBuilder = function() {\n this.v = new window.google.picker.PickerBuilder();\n };\n google.picker.PickerBuilder.__subst__ = true;\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {\n this.v.addView.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.addViewGroup = function() {\n this.v.addViewGroup.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.disableFeature = function() {\n this.v.disableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.enableFeature = function() {\n this.v.enableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {\n this.v.getRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getTitle = function() {\n this.v.getTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {\n this.v.hideTitleBar.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {\n this.v.isFeatureEnabled.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAppId = function() {\n this.v.setAppId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAuthUser = function() {\n this.v.setAuthUser.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setCallback = function() {\n this.v.setCallback.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setDocument = function() {\n this.v.setDocument.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setLocale = function() {\n this.v.setLocale.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {\n this.v.setRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {\n this.v.setSelectableMimeTypes.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSize = function() {\n this.v.setSize.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setTitle = function() {\n this.v.setTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {\n this.v.setUploadToAlbumId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.toUri = function() {\n this.v.toUri.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.build = function() {\n return new google.picker.Picker(SECRET, this.v.build.apply(this.v, arguments));\n }; \n\n google.picker.ResourceId = {};\n google.picker.ResourceId.generate = function() {};\n\n google.picker.VideoSearchView = function() {};\n google.picker.VideoSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.VideoSearchView.prototype.setSite = function() {};\n\n google.picker.VideoSearchView.YOUTUBE = 1;\n\n google.picker.ViewGroup = function() {};\n google.picker.ViewGroup.__super__ = Object;\n google.picker.ViewGroup.prototype.addLabel = function() {};\n google.picker.ViewGroup.prototype.addView = function() {};\n google.picker.ViewGroup.prototype.addViewGroup = function() {};\n\n google.picker.ViewId = {};\n google.picker.ViewId.DOCS = 1;\n google.picker.ViewId.DOCS_IMAGES = 1;\n google.picker.ViewId.DOCS_IMAGES_AND_VIDEOS = 1;\n google.picker.ViewId.DOCS_VIDEOS = 1;\n google.picker.ViewId.DOCUMENTS = 1;\n google.picker.ViewId.FOLDERS = 1;\n google.picker.ViewId.FORMS = 1;\n google.picker.ViewId.IMAGE_SEARCH = 1;\n google.picker.ViewId.PDFS = 1;\n google.picker.ViewId.PHOTO_ALBUMS = 1;\n google.picker.ViewId.PHOTO_UPLOAD = 1;\n google.picker.ViewId.PHOTOS = 1;\n google.picker.ViewId.PRESENTATIONS = 1;\n google.picker.ViewId.RECENTLY_PICKED = 1;\n google.picker.ViewId.SPREADSHEETS = 1;\n google.picker.ViewId.VIDEO_SEARCH = 1;\n google.picker.ViewId.WEBCAM = 1;\n google.picker.ViewId.YOUTUBE = 1;\n\n google.picker.WebCamView = function() {};\n google.picker.WebCamView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.WebCamViewType = {};\n google.picker.WebCamViewType.STANDARD = 1;\n google.picker.WebCamViewType.VIDEOS = 1;\n\n google.picker.Action = {};\n google.picker.Action.CANCEL = 1;\n google.picker.Action.PICKED = 1;\n\n google.picker.Audience = {};\n google.picker.Audience.OWNER_ONLY = 1;\n google.picker.Audience.LIMITED = 1;\n google.picker.Audience.ALL_PERSONAL_CIRCLES = 1;\n google.picker.Audience.EXTENDED_CIRCLES = 1;\n google.picker.Audience.DOMAIN_PUBLIC = 1;\n google.picker.Audience.PUBLIC = 1;\n\n google.picker.Document = {};\n google.picker.Document.ADDRESS_LINES = 1;\n google.picker.Document.AUDIENCE = 1;\n google.picker.Document.DESCRIPTION = 1;\n google.picker.Document.DURATION = 1;\n google.picker.Document.EMBEDDABLE_URL = 1;\n google.picker.Document.ICON_URL = 1;\n google.picker.Document.ID = 1;\n google.picker.Document.IS_NEW = 1;\n google.picker.Document.LAST_EDITED_UTC = 1;\n google.picker.Document.LATITUDE = 1;\n google.picker.Document.LONGITUDE = 1;\n google.picker.Document.MIME_TYPE = 1;\n google.picker.Document.NAME = 1;\n google.picker.Document.NUM_CHILDREN = 1;\n google.picker.Document.PARENT_ID = 1;\n google.picker.Document.PHONE_NUMBERS = 1;\n google.picker.Document.SERVICE_ID = 1;\n google.picker.Document.THUMBNAILS = 1;\n google.picker.Document.TYPE = 1;\n google.picker.Document.URL = 1;\n\n google.picker.Response = {};\n google.picker.Response.ACTION = 1;\n google.picker.Response.DOCUMENTS = 1;\n google.picker.Response.PARENTS = 1;\n google.picker.Response.VIEW = 1;\n\n google.picker.ServiceId = {};\n google.picker.ServiceId.DOCS = 1;\n google.picker.ServiceId.MAPS = 1;\n google.picker.ServiceId.PHOTOS = 1;\n google.picker.ServiceId.SEARCH_API = 1;\n google.picker.ServiceId.URL = 1;\n google.picker.ServiceId.YOUTUBE = 1;\n\n google.picker.Thumbnail = {};\n google.picker.Thumbnail.HEIGHT = 1;\n google.picker.Thumbnail.WIDTH = 1;\n google.picker.Thumbnail.URL = 1;\n\n google.picker.Type = {};\n google.picker.Type.ALBUM = 1;\n google.picker.Type.DOCUMENT = 1;\n google.picker.Type.PHOTO = 1;\n google.picker.Type.URL = 1;\n google.picker.Type.VIDEO = 1;\n\n ////////////////////////////////////////////////////////////////////////\n\n google.setOnLoadCallback = function(olc) {\n throw 'Cannot set onLoadCallback once modules loaded';\n }\n google.setOnLoadCallback.__subst__ = true;\n\n return google;\n })();\n\n function copyJson(o) {\n if (!o) { return undefined; }\n return JSON.parse(JSON.stringify(o, function(key, value) {\n return /__$/.test(key) ? void 0 : value;\n }));\n }\n\n function opaqueNode(guestNode) {\n var d = guestNode.ownerDocument.createElement('div');\n frame.imports.tameNodeAsForeign___(d);\n guestNode.appendChild(d);\n return d;\n }\n\n function forallkeys(obj, cb) {\n for (var k in obj) {\n if (!/.*__$/.test(k)) {\n cb(k);\n }\n }\n }\n\n function targ(obj, policy) {\n return policy.__subst__ ? policy : obj;\n }\n\n ////////////////////////////////////////////////////////////////////////\n \n function grantRead(o, k) {\n if (o[k + '__grantRead__']) { return; }\n console.log(' + grantRead');\n caja.grantRead(o, k);\n o[k + '__grantRead__'] = true;\n }\n\n function grantMethod(o, k) {\n if (o[k + '__grantMethod__']) { return; }\n caja.grantMethod(o, k);\n console.log(' + grantMethod');\n o[k + '__grantMethod__'] = true;\n }\n\n function markFunction(o) {\n if (o.__markFunction__) { return o; }\n var r = caja.markFunction(o);\n console.log(' + markFunction');\n o.__markFunction__ = true;\n return r;\n }\n\n function markCtor(o, sup) {\n if (o.__markCtor__) { return o; }\n var r = caja.markCtor(o, sup);\n console.log(' + markCtor');\n o.__markCtor__ = true;\n return r;\n }\n\n function adviseFunctionBefore(o, advices) {\n if (o.__adviseFunctionBefore__) { return o; }\n for (var i = 0; i < advices.length; i++) {\n caja.adviseFunctionBefore(o, advices[i]);\n }\n console.log(' + adviseFunctionBefore');\n return o;\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n function defCtor(path, obj, policy) {\n console.log(path + ' defCtor');\n forallkeys(policy, function(name) {\n if (!obj[name]) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n console.log(path + '.' + name + ' grant static');\n grantRead(obj, name);\n if (typeof policy[name] === 'function') {\n markFunction(obj[name]);\n }\n });\n forallkeys(policy.prototype, function(name) {\n if (!obj.prototype[name]) {\n console.log(path + '.prototype.' + name + ' skip');\n return;\n }\n console.log(path + '.prototype.' + name + ' grant instance');\n if (typeof policy.prototype[name] === 'function') {\n if (policy.prototype[name].__before__) {\n adviseFunctionBefore(obj.prototype[name], policy.prototype[name].__before__);\n }\n grantMethod(obj.prototype, name);\n } else {\n grantRead(obj.prototype, name);\n }\n });\n var sup;\n if (policy.__super__ === Object) {\n sup = Object;\n } else {\n sup = window;\n for (var i = 0; i < policy.__super__.length; i++) {\n sup = sup[policy.__super__[i]];\n }\n }\n\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n\n return markCtor(obj, sup);\n }\n\n function defFcn(path, obj, policy) {\n console.log(path + ' defFcn');\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n return markFunction(obj);\n }\n\n function defObj(path, obj, policy) {\n console.log(path + ' defObj');\n var r = {};\n forallkeys(policy, function(name) {\n var sub_obj = obj[name];\n if (!sub_obj) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n var sub_policy = policy[name];\n var sub_path = path + '.' + name;\n var t_sub_policy = typeof sub_policy;\n if (t_sub_policy === 'function') {\n if (sub_policy.__super__) {\n r[name] = defCtor(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n r[name] = defFcn(sub_path, targ(sub_obj, sub_policy), sub_policy);\n }\n } else if (t_sub_policy === 'object'){\n r[name] = defObj(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n console.log(path + '.' + name + ' grant static');\n r[name] = targ(sub_obj, sub_policy);\n grantRead(r, name);\n }\n });\n return caja.markReadOnlyRecord(r);\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n return defObj('google', window['google'], googlePolicy);\n}", "googleLogin() { }", "function assertBase64Available(){if(!PlatformSupport.getPlatform().base64Available){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Blobs are unavailable in Firestore in this environment.');}}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n ];\n }", "get Android() {}", "function assertUint8ArrayAvailable(){if(typeof Uint8Array==='undefined'){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Uint8Arrays are not available in this environment.');}}", "isGMOnly() {\n return false\n }", "function xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function dc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || ea(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (ea(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Wu) h = Ku(t.firestore, ia), f = zt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](yc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Ku(t, Hu);\n h = Ku(p.firestore, ia), f = p._query;\n var y = new fc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Qa(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, Ha(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new lu(r), s = new gs(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ps, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(oa(h), f, l, c);\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "static get servicePath() {\n return 'logging.googleapis.com';\n }", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):a.src&&\"IMAGE\"==c&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function Pi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "static get apiEndpoint() {\n return 'securitycenter.googleapis.com';\n }", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "get service() {\n return this.canvas.__jsonld.service; // eslint-disable-line no-underscore-dangle\n }", "static get servicePath() {\n return 'securitycenter.googleapis.com';\n }", "transient final protected internal function m174() {}", "function Ci(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function WebIdUtils () {\n}", "function getGoogle(n) {\n\n}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n 'https://www.googleapis.com/auth/cloud-platform.read-only',\n 'https://www.googleapis.com/auth/logging.admin',\n 'https://www.googleapis.com/auth/logging.read',\n 'https://www.googleapis.com/auth/logging.write',\n ];\n }", "function ga4(){\n try {\n return window.gtag.apply(window.gtag, arguments);\n } catch (e) {\n console.error('Could not track event. Fine if this is a test.', e, Array.from(arguments));\n }\n}", "function trackInAnalytics(version) {\n // Create the random UUID from 30 random hex numbers gets them into the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (with y being 8, 9, a, or b).\n var uuid = \"\";\n for (var i = 0; i < 30; i++) {\n uuid += parseInt(Math.random() * 16).toString(16);\n }\n uuid = uuid.substr(0, 8) + \"-\" + uuid.substr(8, 4) + \"-4\" + uuid.substr(12, 3) + \"-\" + parseInt(Math.random() * 4 + 8).toString(16) + uuid.substr(15, 3) + \"-\" + uuid.substr(18, 12);\n\n var url = \"http://www.google-analytics.com/collect?v=1&t=event&tid=UA-74705456-1&cid=\" + uuid + \"&ds=adwordsscript&an=qstracker&av=\"\n + version\n + \"&ec=AdWords%20Scripts&ea=Script%20Execution&el=QS%20Tracker%20v\" + version;\n UrlFetchApp.fetch(url);\n}", "function fc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || Zu(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (Zu(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Qu) h = Bu(t.firestore, na), f = Qt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](dc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Bu(t, zu);\n h = Bu(p.firestore, na), f = p._query;\n var y = new cc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Ka(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, za(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new fu(r), s = new ms(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ls, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(ra(h), f, l, c);\n}", "static final private internal function m106() {}", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "function M() {\n if (\"undefined\" == typeof atob) throw new P(R.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function SigV4Utils() { }", "function getClientVersion() { return '0.14.4'; }", "transient private internal function m185() {}", "supportsPlatform() {\n return true;\n }", "transient private protected internal function m182() {}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Un = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.Qn(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && A(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "function start() {\n // console.log(typeof String(getKey('google')))\n // 2. Initialize the JavaScript client library.\n gapi.client.init({\n 'apiKey': \"AIzaSyABljrxKqX_RRid-9DZMq9aHGm65tuXSSk\"\n }).then(function () {\n // 3. Initialize and make the API request.\n gapi.client.request({\n 'path': `${defineRequest()}`,\n })\n }).then(function (response) {\n }, function (reason) {\n console.log(reason);\n console.log('Error: ' + reason.result.error.message);\n });\n }", "async function main() {\n try {\n const oAuth2Client = await getAuthenticatedClient();\n // Make a simple request to the Google Plus API using our pre-authenticated client. The `request()` method\n // takes an AxiosRequestConfig object. Visit https://github.com/axios/axios#request-config.\n // const url = 'https://www.googleapis.com/plus/v1/people?query=pizza';\n\n console.log(oAuth2Client);\n var call_creds = grpc.credentials.createFromGoogleCredential(oAuth2Client);\n var combined_creds = grpc.credentials.combineChannelCredentials(ssl_creds, call_creds);\n var stub = new authProto.Greeter('greeter.googleapis.com', combined_credentials);\n const res = await oAuth2Client.request({scope})\n console.log(res.data);\n } catch (e) {\n console.error(e);\n }\n process.exit();\n}", "function i(t){\"use strict\";var a=this,n=e;a.s=t,a._c=\"s_m\",n.s_c_in||(n.s_c_il=[],n.s_c_in=0),a._il=n.s_c_il,a._in=n.s_c_in,a._il[a._in]=a,n.s_c_in++,a.version=\"1.0\";var i,o,r,s=\"pending\",c=\"resolved\",d=\"rejected\",l=\"timeout\",u=!1,p={},m=[],g=[],f=0,b=!1,h=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var a=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(a),e.requiredVarList=e.requiredVarList.concat(a),e}();a.newCall=!1,a.newCallVariableOverrides=null,a.hitCount=0,a.timeout=1e3,a.currentHit=null,a.backup=function(e,t,a){var n,i,o,r;for(t=t||{},n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)r=i[o],t[r]=e[r],a||t[r]||(t[\"!\"+r]=1);return t},a.restore=function(e,t,a){var n,i,o,r,s,c,d=!0;for(n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)if(r=i[o],s=e[r],s||e[\"!\"+r]){if(!a&&(\"contextData\"==r||\"retrieveLightData\"==r)&&t[r])for(c in t[r])s[c]||(s[c]=t[r][c]);t[r]=s}return d},a.createHitMeta=function(e,t){var n,i=a.s,o=[],r=[];return t=t||{},n={id:e,delay:!1,restorePoint:f,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},o=a.replacePromises(i,n.values.s),r=a.replacePromises(t,n.values.variableOverrides),n.backup.s=a.backup(i),n.backup.sSet=a.backup(i,null,!0),n.backup.variableOverrides=t,(o&&o.length>0||r&&r.length>0)&&(n.delay=!0,n.status=s,n.promise=Promise.all([Promise.all(o),Promise.all(r)]).then(function(){n.delay=!1,n.status=c,n.timeout&&clearTimeout(n.timeout)}),a.timeout&&(n.timeout=setTimeout(function(){n.delay=!1,n.status=l,n.timeout&&clearTimeout(n.timeout),a.sendPendingHits()},a.timeout))),n},a.replacePromises=function(e,t){var a,n,i,o,r,l,u=[];t=t||{},o=function(e,t){return function(a){t[e].value=a,t[e].status=c}},r=function(e,t){return function(a){t[e].status=d,t[e].exception=a}},l=function(e,t,a){var n=e[t];n instanceof Promise?(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",a[t].status=s,u.push(n.then(o(t,a))[\"catch\"](r(t,a)))):\"object\"==typeof n&&null!==n&&n.promise instanceof Promise&&(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",n.hasOwnProperty(\"unresolved\")&&(a[t].value=n.unresolved),a[t].status=s,u.push(n.promise.then(o(t,a))[\"catch\"](r(t,a))))};for(a in e)if(e.hasOwnProperty(a))if(i=e[a],\"contextData\"===a||\"retrieveLightData\"===a)if(i instanceof Promise||\"object\"==typeof i&&null!==i&&i.promise instanceof Promise)l(e,a,t);else{t[a]={isGroup:!0};for(n in i)i.hasOwnProperty(n)&&l(i,n,t[a])}else l(e,a,t);return u},a.metaToObject=function(e){var t,n,i,o,r=(a.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(i=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!i.isGroup)i.value&&i.status===c&&(r[t]=i.value);else{r[t]={};for(n in i)i.hasOwnProperty(n)&&(o=i[n],o.value&&o.status===c&&(r[t][n]=o.value))}return r},a.getMeta=function(e){return e&&m[e]?m[e]:m},a.forceReady=function(){u=!0,a.sendPendingHits()},i=t.isReadyToTrack,t.isReadyToTrack=function(){return!!(!a.newCall&&i()&&g&&g.length>0&&(u||m[g[0]]&&!m[g[0]].delay))},o=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,n,i){var r,s;return n!==t.track?o(e,n,i):void(a.newCall&&(r=a.hitCount++,g.push(r),s=a.createHitMeta(r,a.newCallVariableOverrides),m[r]=s,b||(b=setInterval(a.sendPendingHits,100)),s.promise.then(function(){a.sendPendingHits()})))},r=t.t,t.t=t.track=function(e,t,n){n||(a.newCall=!0,a.newCallVariableOverrides=e),r(e,t),n||(a.newCall=!1,a.newCallVariableOverrides=null,a.sendPendingHits())},a.sendPendingHits=function(){for(var e,t,n,i,o,r=a.s;r.isReadyToTrack();){for(e=m[g[0]],a.currentHit=e,i={},o={},a.trigger(\"hitBeforeSend\",e),o.marketingCloudVisitorID=r.marketingCloudVisitorID,o.visitorOptedOut=r.visitorOptedOut,o.analyticsVisitorID=r.analyticsVisitorID,o.audienceManagerLocationHint=r.audienceManagerLocationHint,o.audienceManagerBlob=r.audienceManagerBlob,a.restore(e.backup.s,r),t=e.restorePoint;t<g[0];t++)n=a.metaToObject(m[t].values.s),delete n.referrer,delete n.resolution,delete n.colorDepth,delete n.javascriptVersion,delete n.javaEnabled,delete n.cookiesEnabled,delete n.browserWidth,delete n.browserHeight,delete n.connectionType,delete n.homepage,a.restore(n,o);a.restore(e.backup.sSet,o),a.restore(a.metaToObject(e.values.s),o),a.restore(e.backup.variableOverrides,i),a.restore(a.metaToObject(e.values.variableOverrides),i),r.track(i,o,!0),f=g.shift(),a.trigger(\"hitAfterSend\",e),a.currentHit=null}b&&g.length<1&&(clearInterval(b),b=!1)},i()||o(a,function(){a.sendPendingHits()},[]),a.on=function(e,t){p[e]||(p[e]=[]),p[e].push(t)},a.trigger=function(e,t){var a,n,i,o=!1;if(p[e])for(a=0,n=p[e].length;n>a;a++){i=p[e][a];try{i(t),o=!0}catch(e){}}else o=!0;return o},a._s=function(){a.trigger(\"_s\")},a._d=function(){return a.trigger(\"_d\"),0},a._g=function(){a.trigger(\"_g\")},a._t=function(){a.trigger(\"_t\")}}", "get api() {\n return google;\n }", "function version(){ return \"0.13.0\" }", "function vc() {\n if (\"undefined\" == typeof atob) throw new T(E.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function sdk(){\n}", "static transient final protected internal function m47() {}", "function AppMeasurement_Module_ActivityMap(h){function q(){var a=f.pageYOffset+(f.innerHeight||0);a&&a>+g&&(g=a)}function r(){if(e.scrollReachSelector){var a=h.d.querySelector&&h.d.querySelector(e.scrollReachSelector);a?(g=a.scrollTop||0,a.addEventListener(\"scroll\",function(){var d;(d=a&&a.scrollTop+a.clientHeight||0)>g&&(g=d)})):0<w--&&setTimeout(r,1E3)}}function l(a,d){var c,b,n;if(a&&d&&(c=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<c.length&&(b=c[n++]);)if(-1<a.indexOf(b))return null;p=1;return a}\nfunction s(a,d,c,b,e){var f,k;if(a.dataset&&(k=a.dataset[d]))f=k;else if(a.getAttribute)if(k=a.getAttribute(\"data-\"+c))f=k;else if(k=a.getAttribute(c))f=k;if(!f&&h.useForcedLinkTracking&&e){var g;a=a.onclick?\"\"+a.onclick:\"\";varValue=\"\";if(b&&a&&(d=a.indexOf(b),0<=d)){for(d+=b.length;d<a.length;)if(c=a.charAt(d++),0<=\"'\\\"\".indexOf(c)){g=c;break}for(k=!1;d<a.length&&g;){c=a.charAt(d);if(!k&&c===g)break;\"\\\\\"===c?k=!0:(varValue+=c,k=!1);d++}}(g=varValue)&&(h.w[b]=g)}return f||e&&h.w[b]}function t(a,d,\nc){var b;return(b=e[d](a,c))&&(p?(p=0,b):l(m(b),e[d+\"Exclusions\"]))}function u(a,d,c){var b;if(a&&!(1===(b=a.nodeType)&&(b=a.nodeName)&&(b=b.toUpperCase())&&x[b])&&(1===a.nodeType&&(b=a.nodeValue)&&(d[d.length]=b),c.a||c.t||c.s||!a.getAttribute||((b=a.getAttribute(\"alt\"))?c.a=b:(b=a.getAttribute(\"title\"))?c.t=b:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(b=a.getAttribute(\"src\")||a.src)&&(c.s=b)),(b=a.childNodes)&&b.length))for(a=0;a<b.length;a++)u(b[a],d,c)}function m(a){if(null==a||void 0==a)return a;\ntry{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=h;var f=window;f.s_c_in||(f.s_c_il=[],f.s_c_in=0);e._il=f.s_c_il;e._in=f.s_c_in;e._il[e._in]=e;f.s_c_in++;\ne._c=\"s_m\";var g=0,v,w=60;e.c={};var p=0,x={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,c,b=h.contextData,e=h.linkObject;(a=h.pageName||h.pageURL)&&(d=t(e,\"link\",h.linkName))&&(c=t(e,\"region\"))&&(b[\"a.activitymap.page\"]=a.substring(0,255),b[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,b[\"a.activitymap.region\"]=127<c.length?c.substring(0,127):c,0<g&&(b[\"a.activitymap.xy\"]=10*Math.floor(g/10)),b[\"a.activitymap.pageIDType\"]=h.pageName?1:0)};e.e=function(){e.trackScrollReach&&\n!v&&(e.scrollReachSelector?r():(q(),f.addEventListener&&f.addEventListener(\"scroll\",q,!1)),v=!0)};e.link=function(a,d){var c;if(d)c=l(m(d),e.linkExclusions);else if((c=a)&&!(c=s(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var b,f;(f=l(m(a.innerText||a.textContent),e.linkExclusions))||(u(a,b=[],c={a:void 0,t:void 0,s:void 0}),(f=l(m(b.join(\"\"))))||(f=l(m(c.a?c.a:c.t?c.t:c.s?c.s:void 0)))||!(b=(b=a.tagName)&&b.toUpperCase?b.toUpperCase():\"\")||(\"INPUT\"==b||\"SUBMIT\"==b&&a.value?f=l(m(a.value)):\"IMAGE\"==\nb&&a.src&&(f=l(m(a.src)))));c=f}return c};e.region=function(a){for(var d,c=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=s(a,c,c,c))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "async function main() {\n const bucketName = process.env.BUCKET_NAME;\n const objectName = process.env.OBJECT_NAME;\n // Defines a credential access boundary that grants objectViewer access in\n // the specified bucket.\n const cab = {\n accessBoundary: {\n accessBoundaryRules: [\n {\n availableResource: `//storage.googleapis.com/projects/_/buckets/${bucketName}`,\n availablePermissions: ['inRole:roles/storage.objectViewer'],\n availabilityCondition: {\n expression:\n \"resource.name.startsWith('projects/_/buckets/\" +\n `${bucketName}/objects/${objectName}')`,\n },\n },\n ],\n },\n };\n\n const googleAuth = new GoogleAuth({\n scopes: 'https://www.googleapis.com/auth/cloud-platform',\n });\n const projectId = await googleAuth.getProjectId();\n // Obtain an authenticated client via ADC.\n const client = await googleAuth.getClient();\n // Use the client to generate a DownscopedClient.\n const cabClient = new DownscopedClient(client, cab);\n\n // OAuth 2.0 Client\n const authClient = new OAuth2Client();\n // Define a refreshHandler that will be used to refresh the downscoped token\n // when it expires.\n authClient.refreshHandler = async () => {\n const refreshedAccessToken = await cabClient.getAccessToken();\n return {\n access_token: refreshedAccessToken.token,\n expiry_date: refreshedAccessToken.expirationTime,\n };\n };\n\n const storageOptions = {\n projectId,\n authClient: new GoogleAuth({authClient}),\n };\n\n const storage = new Storage(storageOptions);\n const downloadFile = await storage\n .bucket(bucketName)\n .file(objectName)\n .download();\n console.log('Successfully retrieved file. Contents:');\n console.log(downloadFile.toString('utf8'));\n}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Tt = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.It(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && S(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "function googleApiClientReady() {\n loadAPIClientInterfaces();\n /*console.log(\"Getting ready\");\n gapi.auth.init(function() {\n window.setTimeout(checkAuth, 1);\n });*/\n}", "static private protected internal function m118() {}", "function a(t){\"use strict\";var n=this,i=e;n.s=t,n._c=\"s_m\",i.s_c_in||(i.s_c_il=[],i.s_c_in=0),n._il=i.s_c_il,n._in=i.s_c_in,n._il[n._in]=n,i.s_c_in++,n.version=\"1.0\";var a,r,o,s=\"pending\",c=\"resolved\",u=\"rejected\",l=\"timeout\",d=!1,f={},p=[],g=[],h=0,m=!1,v=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var n=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(n),e.requiredVarList=e.requiredVarList.concat(n),e}(),b=!1;n.newHit=!1,n.newHitVariableOverrides=null,n.hitCount=0,n.timeout=1e3,n.currentHit=null,n.backup=function(e,t,n){var i,a,r,o;for(t=t||{},i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)o=a[r],t[o]=e[o],n||t[o]||(t[\"!\"+o]=1);return t},n.restore=function(e,t,n){var i,a,r,o,s,c,u=!0;for(i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)if(o=a[r],s=e[o],s||e[\"!\"+o]){if(!n&&(\"contextData\"==o||\"retrieveLightData\"==o)&&t[o])for(c in t[o])s[c]||(s[c]=t[o][c]);t[o]=s}return u},n.createHitMeta=function(e,t){var i,a=n.s,r=[],o=[];return b&&console.log(a.account+\" - createHitMeta\"),t=t||{},i={id:e,delay:!1,restorePoint:h,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},r=n.replacePromises(a,i.values.s),o=n.replacePromises(t,i.values.variableOverrides),i.backup.s=n.backup(a),i.backup.sSet=n.backup(a,null,!0),i.backup.variableOverrides=t,(r&&r.length>0||o&&o.length>0)&&(i.delay=!0,i.status=s,i.promise=Promise.all([Promise.all(r),Promise.all(o)]).then(function(){i.delay=!1,i.status=c,i.timeout&&clearTimeout(i.timeout)}),n.timeout&&(i.timeout=setTimeout(function(){i.delay=!1,i.status=l,i.timeout&&clearTimeout(i.timeout),n.sendPendingHits()},n.timeout))),i},n.replacePromises=function(e,t){var n,i,a,r,o,l,d=[];t=t||{},r=function(e,t){return function(n){t[e].value=n,t[e].status=c}},o=function(e,t){return function(n){t[e].status=u,t[e].exception=n}},l=function(e,t,n){var i=e[t];i instanceof Promise?(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",n[t].status=s,d.push(i.then(r(t,n))[\"catch\"](o(t,n)))):\"object\"==typeof i&&null!==i&&i.promise instanceof Promise&&(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",i.hasOwnProperty(\"unresolved\")&&(n[t].value=i.unresolved),n[t].status=s,d.push(i.promise.then(r(t,n))[\"catch\"](o(t,n))))};for(n in e)if(e.hasOwnProperty(n))if(a=e[n],\"contextData\"===n||\"retrieveLightData\"===n)if(a instanceof Promise||\"object\"==typeof a&&null!==a&&a.promise instanceof Promise)l(e,n,t);else{t[n]={isGroup:!0};for(i in a)a.hasOwnProperty(i)&&l(a,i,t[n])}else l(e,n,t);return d},n.metaToObject=function(e){var t,i,a,r,o=(n.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(a=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!a.isGroup)a.value&&a.status===c&&(o[t]=a.value);else{o[t]={};for(i in a)a.hasOwnProperty(i)&&(r=a[i],r.value&&r.status===c&&(o[t][i]=r.value))}return o},n.getMeta=function(e){return e&&p[e]?p[e]:p},n.forceReady=function(){d=!0,n.sendPendingHits()},a=t.isReadyToTrack,t.isReadyToTrack=function(){if(!n.newHit&&a()&&g&&g.length>0&&(d||p[g[0]]&&!p[g[0]].delay))return b&&console.log(t.account+\" - isReadyToTrack - true\"),!0;if(b&&(console.log(t.account+\" - isReadyToTrack - false\"),console.log(t.account+\" - isReadyToTrack - isReadyToTrack(original) - \"+a()),!a()))try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - isReadyToTrack - \"+e.stack)}return!1},r=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,i,a){var o,s;return b&&console.log(t.account+\" - callbackWhenReadyToTrack\"),i!==t.track?r(e,i,a):void(n.newHit&&(o=n.hitCount++,g.push(o),s=n.createHitMeta(o,n.newHitVariableOverrides),p[o]=s,m||(m=setInterval(n.sendPendingHits,100)),s.promise.then(function(){n.sendPendingHits()})))},o=t.t,t.t=t.track=function(e,i,a){b&&console.log(t.account+\" - track\"),a||(n.newHit=!0,n.newHitVariableOverrides=e),o(e,i),a||(n.newHit=!1,n.newHitVariableOverrides=null,n.sendPendingHits())},n.sendPendingHits=function(){var e,t,i,a,r,o=n.s;for(b&&console.log(o.account+\" - sendPendingHits\");o.isReadyToTrack();){for(e=p[g[0]],n.currentHit=e,a={},r={},n.trigger(\"hitBeforeSend\",e),r.marketingCloudVisitorID=o.marketingCloudVisitorID,r.visitorOptedOut=o.visitorOptedOut,r.analyticsVisitorID=o.analyticsVisitorID,r.audienceManagerLocationHint=o.audienceManagerLocationHint,r.audienceManagerBlob=o.audienceManagerBlob,b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.s,o),t=e.restorePoint;t<g[0];t++)i=n.metaToObject(p[t].values.s),delete i.referrer,delete i.resolution,delete i.colorDepth,delete i.javascriptVersion,delete i.javaEnabled,delete i.cookiesEnabled,delete i.browserWidth,delete i.browserHeight,delete i.connectionType,delete i.homepage,n.restore(i,r);b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.sSet,r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(n.metaToObject(e.values.s),r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.variableOverrides,a),n.restore(n.metaToObject(e.values.variableOverrides),a),o.track(a,r,!0),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),h=g.shift(),n.trigger(\"hitAfterSend\",e),n.currentHit=null}m&&g.length<1&&(clearInterval(m),m=!1)},b&&console.log(t.account+\" - INITIAL isReadyToTrack - \"+a()),a()||r(n,function(){if(b)try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - callbackWhenReadyToTrack - \"+e.stack)}n.sendPendingHits()},[]),n.on=function(e,t){f[e]||(f[e]=[]),f[e].push(t)},n.trigger=function(e,t){var n,i,a,r=!1;if(f[e])for(n=0,i=f[e].length;i>n;n++){a=f[e][n];try{a(t),r=!0}catch(o){}}else r=!0;return r},n._s=function(){n.trigger(\"_s\")},n._d=function(){return n.trigger(\"_d\"),0},n._g=function(){n.trigger(\"_g\")},n._t=function(){n.trigger(\"_t\")}}", "refreshCacheTTL() {\n // This comment is here to please Sonarqube. It requires a comment\n // explaining why a function is empty, but there is no sense\n // duplicating what has been just said in the JSDoc.\n // So, instead, here are the lyrics or Daft Punk's \"Around the world\":\n //\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // [repeat 66 more times]\n // Around the world, around the world.\n }", "function gc() {\n if (\"undefined\" == typeof atob) throw new S(_.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "onGoogleLogin(response) {\n console.log(response);\n }", "function tt() {\n if (\"undefined\" == typeof atob) throw new c(a.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function errorGoogle() {\r\n\t\twindow.alert('Your API is NOT Valid. Please check again');\r\n}", "function DWRUtil() { }", "function onYouTubeApiLoad() {\n // This API key is intended for use only in this lesson.\n // See http://goo.gl/PdPA1 to get a key for your own applications.\n gapi.client.setApiKey('AIzaSyBgAgZFXgrB_osmxLAYqTW3DAQOYKno3zI');\n\n \n}", "static transient final protected public internal function m46() {}", "function AppMeasurement_Module_ActivityMap(f) {\n function g(a, d) {\n var b, c, n;\n if (a && d && (b = e.c[d] || (e.c[d] = d.split(\",\"))))\n for (n = 0; n < b.length && (c = b[n++]) ;)\n if (-1 < a.indexOf(c)) return null;\n p = 1;\n return a;\n }\n\n function q(a, d, b, c, e) {\n var g, h;\n if (a.dataset && (h = a.dataset[d])) g = h;\n else if (a.getAttribute)\n if (h = a.getAttribute(\"data-\" + b)) g = h;\n else if (h = a.getAttribute(b)) g = h;\n if (!g && f.useForcedLinkTracking && e && (g = \"\", d = a.onclick ? \"\" + a.onclick : \"\")) {\n b = d.indexOf(c);\n var l, k;\n if (0 <= b) {\n for (b += 10; b < d.length && 0 <= \"= \\t\\r\\n\".indexOf(d.charAt(b)) ;) b++;\n if (b < d.length) {\n h = b;\n for (l = k = 0; h < d.length && (\";\" != d.charAt(h) || l) ;) l ? d.charAt(h) != l || k ? k = \"\\\\\" == d.charAt(h) ? !k : 0 : l = 0 : (l = d.charAt(h), '\"' != l && \"'\" != l && (l = 0)), h++;\n if (d = d.substring(b, h)) a.e = new Function(\"s\", \"var e;try{s.w.\" + c + \"=\" + d + \"}catch(e){}\"), a.e(f);\n }\n }\n }\n return g || e && f.w[c];\n }\n\n function r(a, d, b) {\n var c;\n return (c = e[d](a, b)) && (p ? (p = 0, c) : g(k(c), e[d + \"Exclusions\"]));\n }\n\n function s(a, d, b) {\n var c;\n if (a && !(1 === (c = a.nodeType) && (c = a.nodeName) && (c = c.toUpperCase()) && t[c]) && (1 === a.nodeType && (c = a.nodeValue) && (d[d.length] = c), b.a ||\n b.t || b.s || !a.getAttribute || ((c = a.getAttribute(\"alt\")) ? b.a = c : (c = a.getAttribute(\"title\")) ? b.t = c : \"IMG\" == (\"\" + a.nodeName).toUpperCase() && (c = a.getAttribute(\"src\") || a.src) && (b.s = c)), (c = a.childNodes) && c.length))\n for (a = 0; a < c.length; a++) s(c[a], d, b);\n }\n\n function k(a) {\n if (null == a || void 0 == a) return a;\n try {\n return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\", \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\", \"mg\"), \" \").substring(0, 254);\n } catch (d) { }\n }\n var e = this;\n e.s = f;\n var m = window;\n m.s_c_in || (m.s_c_il = [], m.s_c_in = 0);\n e._il = m.s_c_il;\n e._in = m.s_c_in;\n e._il[e._in] = e;\n m.s_c_in++;\n e._c = \"s_m\";\n e.c = {};\n var p = 0,\n t = {\n SCRIPT: 1,\n STYLE: 1,\n LINK: 1,\n CANVAS: 1\n };\n e._g = function () {\n var a, d, b, c = f.contextData,\n e = f.linkObject;\n (a = f.pageName || f.pageURL) && (d = r(e, \"link\", f.linkName)) && (b = r(e, \"region\")) && (c[\"a.activitymap.page\"] = a.substring(0,\n 255), c[\"a.activitymap.link\"] = 128 < d.length ? d.substring(0, 128) : d, c[\"a.activitymap.region\"] = 127 < b.length ? b.substring(0, 127) : b, c[\"a.activitymap.pageIDType\"] = f.pageName ? 1 : 0);\n };\n e.link = function (a, d) {\n var b;\n if (d) b = g(k(d), e.linkExclusions);\n else if ((b = a) && !(b = q(a, \"sObjectId\", \"s-object-id\", \"s_objectID\", 1))) {\n var c, f;\n (f = g(k(a.innerText || a.textContent), e.linkExclusions)) || (s(a, c = [], b = {\n a: void 0,\n t: void 0,\n s: void 0\n }), (f = g(k(c.join(\"\")))) || (f = g(k(b.a ? b.a : b.t ? b.t : b.s ? b.s : void 0))) || !(c = (c = a.tagName) && c.toUpperCase ? c.toUpperCase() :\n \"\") || (\"INPUT\" == c || \"SUBMIT\" == c && a.value ? f = g(k(a.value)) : a.src && \"IMAGE\" == c && (f = g(k(a.src)))));\n b = f;\n }\n return b;\n };\n e.region = function (a) {\n for (var d, b = e.regionIDAttribute || \"id\"; a && (a = a.parentNode) ;) {\n if (d = q(a, b, b, b)) return d;\n if (\"BODY\" == a.nodeName) return \"BODY\";\n }\n };\n }", "transient protected internal function m189() {}", "function Ec() {\n if (\"undefined\" == typeof atob) throw new G(j.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "getGoogleResponse() {\n return this.getNormalResponse();\n }", "function initializeApi() {\n gapi.client.load('storage', API_VERSION);\n}", "function isSupported() {\r\n return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var isDBOpenable, error_1;\r\n return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (Object(__WEBPACK_IMPORTED_MODULE_4__firebase_util__[\"isBrowserExtension\"])()) {\r\n return [2 /*return*/, false];\r\n }\r\n if (!Object(__WEBPACK_IMPORTED_MODULE_4__firebase_util__[\"areCookiesEnabled\"])()) {\r\n return [2 /*return*/, false];\r\n }\r\n if (!Object(__WEBPACK_IMPORTED_MODULE_4__firebase_util__[\"isIndexedDBAvailable\"])()) {\r\n return [2 /*return*/, false];\r\n }\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, Object(__WEBPACK_IMPORTED_MODULE_4__firebase_util__[\"validateIndexedDBOpenable\"])()];\r\n case 2:\r\n isDBOpenable = _a.sent();\r\n return [2 /*return*/, isDBOpenable];\r\n case 3:\r\n error_1 = _a.sent();\r\n return [2 /*return*/, false];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}", "function initGAPI() {\r\n if (!app.google.api.length) {\r\n jQuery(\".az-gg-login-btn\").remove();\r\n return;\r\n }\r\n gapi.load(\"auth2\", function () {\r\n gapi.auth2.init({\r\n client_id: app.google.api\r\n })\r\n .then(function (response) {\r\n // console.log('Google API Success');\r\n app.google.hasValidApi = true;\r\n // console.log(response);\r\n })\r\n .catch(function (error) {\r\n console.log('Google API Error');\r\n app.google.hasValidApi = false;\r\n // console.log(error);\r\n });\r\n });\r\n}", "function getGAauthenticationToken(email, password) {\n password = encodeURIComponent(password);\n var response = UrlFetchApp.fetch(\"https://www.google.com/accounts/ClientLogin\", {\n method: \"post\",\n payload: \"accountType=GOOGLE&Email=\" + email + \"&Passwd=\" + password + \"&service=fusiontables&Source=testing\"\n });\n \n\tvar responseStr = response.getContentText();\n\tresponseStr = responseStr.slice(responseStr.search(\"Auth=\") + 5, responseStr.length);\n\tresponseStr = responseStr.replace(/\\n/g, \"\");\n\treturn responseStr;\n}", "transient final private internal function m170() {}", "function getGoogleData () {\n var googleIds = main(1)\n for (var googleObject in googleIds) {\n var gId = googleIds[googleObject].cellValue\n gStore.app({appId: gId}).then((data) => {\n console.log({\n dataId: data.appId, \n price: data.price,\n versionText: data.androidVersionText, \n developer: data.developer, \n developerWebsite: data.developerWebsite\n }) \n console.log(\"\")\n }).catch( (err) => {\n });\n }\n}", "transient final private protected public internal function m166() {}", "function wi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.i || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * Implements `LocalStore` interface.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */;\n}", "static get HEADERS() {\n return 1;\n }", "static final private public function m104() {}", "static get servicePath() {\n return 'spanner.googleapis.com';\n }", "function main(bucketName = 'my-bucket') {\n // [START storage_get_uniform_bucket_level_access]\n /**\n * TODO(developer): Uncomment the following lines before running the sample.\n */\n // The ID of your GCS bucket\n // const bucketName = 'your-unique-bucket-name';\n\n // Imports the Google Cloud client library\n const {Storage} = require('@google-cloud/storage');\n\n // Creates a client\n const storage = new Storage();\n\n async function getUniformBucketLevelAccess() {\n // Gets Bucket Metadata and checks if uniform bucket-level access is enabled.\n const [metadata] = await storage.bucket(bucketName).getMetadata();\n\n if (metadata.iamConfiguration) {\n const uniformBucketLevelAccess =\n metadata.iamConfiguration.uniformBucketLevelAccess;\n console.log(`Uniform bucket-level access is enabled for ${bucketName}.`);\n console.log(\n `Bucket will be locked on ${uniformBucketLevelAccess.lockedTime}.`\n );\n } else {\n console.log(\n `Uniform bucket-level access is not enabled for ${bucketName}.`\n );\n }\n }\n\n getUniformBucketLevelAccess().catch(console.error);\n\n // [END storage_get_uniform_bucket_level_access]\n}", "static transient final private internal function m43() {}", "async function getDeprecated() {\n try {\n let IdsEvents = await EventsModule.ReferenceKeysSent(); // Get the events for this data (that anyone can read)\n let IdsList = await EventsModule.EventsToIds(IdsEvents); // Transforming into list of Ids, to later have more info\n\n let Ids = await EventsModule.GetRefs(IdsList); //Now getting the real reference objects\n return await Ids;\n } catch (e) {\n throw e;\n }\n}", "static hd() {\n return firebase.storage();\n }", "function onApiLoaded() {\n GMapApi.gmapApi = {}\n return window.google\n }", "function setupGoogleServices(auth) {\n const PROJECT_ID = 'fitly-327819';\n const TOPIC_ID = PROJECT_ID + '-topic';\n const SUB_ID = 'projects/' + PROJECT_ID + '/subscriptions/' + TOPIC_ID + '-sub';\n\n const GOOGLE_GMAIL_USER = google.gmail({version: 'v1'}).users;\n const TOPIC_STR = 'projects/' + PROJECT_ID + '/topics/' + TOPIC_ID;\n initGmailWatcher(\n GOOGLE_GMAIL_USER,\n {\n userId: 'me',\n auth: auth,\n resource: {\n labelIds: ['INBOX'],\n topicName : TOPIC_STR\n }\n }\n );\n\n const messageHandler = message => {\n const gmailQuery = \"from:\" + config.PHONE_NUMBER_EMAIL;\n GOOGLE_GMAIL_USER.messages.list({userId: 'me', auth: auth, q: gmailQuery}).then((listData) => {\n GOOGLE_GMAIL_USER.messages.get({userId: 'me', auth: auth, id: listData.data.messages[0].id}).then((messageData) => {\n let dataPoints = messageData.data.snippet.split('; ');\n\n // we want to verify the list split\n // we're expecting something like \"[ '10/02/21', '4.52km', '35:00', '346' ]\"\n if(dataPoints.length === 4) {\n console.log('Creating database entry...');\n run.createRun(dataPoints[0], dataPoints[1], dataPoints[2], dataPoints[3]);\n }\n });\n });\n\n message.ack();\n };\n\n new PubSub({\n PROJECT_ID,\n keyFilename: '/home/john/Desktop/fit-ly/fitly-service.json'\n }).subscription(SUB_ID).on('message', messageHandler);\n}", "static transient final private protected internal function m40() {}", "getGoogleId(){\n return this.google_id;\n }", "function Ic() {\n if (\"undefined\" == typeof atob) throw new q(M.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "static createFromGoogleCredential(googleCredentials) {\n return CallCredentials.createFromMetadataGenerator((options, callback) => {\n let getHeaders;\n if (isCurrentOauth2Client(googleCredentials)) {\n getHeaders = googleCredentials.getRequestHeaders(options.service_url);\n }\n else {\n getHeaders = new Promise((resolve, reject) => {\n googleCredentials.getRequestMetadata(options.service_url, (err, headers) => {\n if (err) {\n reject(err);\n return;\n }\n if (!headers) {\n reject(new Error('Headers not set by metadata plugin'));\n return;\n }\n resolve(headers);\n });\n });\n }\n getHeaders.then((headers) => {\n const metadata = new metadata_1.Metadata();\n for (const key of Object.keys(headers)) {\n metadata.add(key, headers[key]);\n }\n callback(null, metadata);\n }, (err) => {\n callback(err);\n });\n });\n }", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "protected internal function m252() {}", "function googleAPIError() {\n alert('Fail to connect to Google API.');\n}", "_getSVGHandler(e){let root=this,temp=document.createElement(\"div\"),getID=function(element,alt){if(null===element.getAttribute(\"id\"))element.setAttribute(\"id\",alt);return element.getAttribute(\"id\")},setAriaLabelledBy=function(source,target,prefix){// adds title and desc elements to target and sets the aria-labelledby attribute\nlet svgElem=function(nodename){source=null!==source?source:root;//adds title or desc element to target\nlet attr=\"title\"===nodename?\"label\":nodename,query=source.querySelector(\"#\"+attr);var label=target.querySelector(nodename);//if the target doesn't have the element, add it\nif(null===label){label=document.createElement(nodename);target.prepend(label)}//populates the element with data from the source element\nif(null!==source.getAttribute(attr)){label.innerHTML=source.getAttribute(attr)}else if(null!==query&&\"\"!==query.innerHTML){label.innerHTML=query.innerHTML}//returns the new element's id\nreturn getID(label,prefix+\"-\"+attr)};//set aria-labelledby to the id's for title and descriptions\ntarget.setAttribute(\"aria-labelledby\",svgElem(\"desc\")+\" \"+svgElem(\"label\"))};//set up main svg and append to document\ntemp.innerHTML=e.detail.response;let svg=temp.querySelector(\"svg\"),svgid=getID(svg,\"svg-\"+Date.now()),hdata=dom(root).querySelectorAll(\"lrndesign-imagemap-hotspot\");setAriaLabelledBy(root,svg,svgid);this.shadowRoot.querySelector(\"#svg\").appendChild(svg);for(let i=0;i<hdata.length;i++){let hid=hdata[i].getAttribute(\"hotspot-id\"),hotspot=svg.querySelector(\"#\"+hid),clone=svg.cloneNode(!0);//clone svg for print versions and show hotspot as selected\nsetAriaLabelledBy(hdata[i],clone,hid);hdata[i].appendChild(clone);hdata[i].querySelector(\"#\"+hid).classList.add(\"selected\");hdata[i].setParentHeading(root.shadowRoot.querySelector(\"#heading\"));for(let j=0;j<hdata.length;j++){hdata[i].querySelector(\"#\"+hdata[j].getAttribute(\"hotspot-id\")).classList.add(\"hotspot\")}//configure hotspot on main (interactive) svg\nlet hbutton=document.createElement(\"button\");hbutton.setAttribute(\"tabindex\",0);hbutton.setAttribute(\"aria-label\",hdata[i].label);root.shadowRoot.querySelector(\"#buttons\").appendChild(hbutton);hbutton.addEventListener(\"focus\",function(){hotspot.classList.add(\"focus\")});hbutton.addEventListener(\"blur\",function(){hotspot.classList.remove(\"focus\")});hotspot.classList.add(\"hotspot\");hotspot.addEventListener(\"click\",e=>{this.openHotspot(hotspot,hdata[i])});hbutton.addEventListener(\"keyup\",e=>{if(13===e.keyCode||32===e.keyCode){if(!hotspot.classList.contains(\"selected\")){this.openHotspot(hotspot,hdata[i])}}})}}" ]
[ "0.5676421", "0.5331158", "0.52144086", "0.5159942", "0.50609404", "0.50609404", "0.50272703", "0.5010954", "0.50075173", "0.49805543", "0.49349123", "0.4913257", "0.4901761", "0.4898656", "0.48451033", "0.48356208", "0.48282546", "0.48129523", "0.47906247", "0.47881243", "0.4745258", "0.47282118", "0.46903884", "0.4689918", "0.46882293", "0.46882293", "0.4687763", "0.46876684", "0.46756145", "0.46756145", "0.46601412", "0.4645434", "0.46423236", "0.46369785", "0.46320593", "0.46232888", "0.4620744", "0.46201634", "0.4615956", "0.46014822", "0.45904535", "0.458865", "0.45875266", "0.45862082", "0.45744023", "0.45698377", "0.45643872", "0.45619908", "0.45484525", "0.45416826", "0.45379004", "0.45359802", "0.45087636", "0.45005465", "0.44975162", "0.44896248", "0.44872916", "0.4470904", "0.44662026", "0.44615188", "0.44523776", "0.44503695", "0.44433773", "0.4441975", "0.4438659", "0.44353893", "0.44348416", "0.44335002", "0.44302905", "0.44160086", "0.44124666", "0.4409134", "0.4404482", "0.44023436", "0.43964708", "0.43963677", "0.4393268", "0.4393233", "0.43921363", "0.4380192", "0.43783998", "0.43696922", "0.43672967", "0.43663585", "0.43651685", "0.43619138", "0.43615633", "0.43591845", "0.43580672", "0.43576956", "0.43561685", "0.43553057", "0.43527493", "0.43523476", "0.4348616", "0.4346906", "0.43467498", "0.4345422", "0.43452033", "0.43418202", "0.43383792" ]
0.0
-1
Portions of this code are from MochiKit, received by The Closure Authors under the MIT license. All other code is Copyright 20052009 The Closure Authors. All Rights Reserved.
function qh(a, b) { this.g = [];this.v = a;this.u = b || null;this.f = this.a = !1;this.c = void 0;this.m = this.w = this.i = !1;this.h = 0;this.b = null;this.l = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient private protected public internal function m181() {}", "transient final protected internal function m174() {}", "static private protected internal function m118() {}", "static transient final protected public internal function m46() {}", "static transient final private internal function m43() {}", "static private protected public internal function m117() {}", "static transient private protected internal function m55() {}", "static private public function m119() {}", "static final private protected public internal function m102() {}", "static protected internal function m125() {}", "static final protected internal function m110() {}", "transient final private internal function m170() {}", "static transient final protected internal function m47() {}", "static transient private internal function m58() {}", "static final private public function m104() {}", "static transient final private protected internal function m40() {}", "static final private protected internal function m103() {}", "transient final private protected public internal function m166() {}", "static transient private public function m56() {}", "static transient private protected public internal function m54() {}", "transient final private protected internal function m167() {}", "transient private public function m183() {}", "function _____SHARED_functions_____(){}", "static transient protected internal function m62() {}", "function o0(stdlib,o1,buffer) {\n try {\nthis.o559 = this.o560;\n}catch(e){}\n var o2 = o254 = [].fround;\n //views\n var charCodeAt =new Map.prototype.keys.call(buffer);\n\n function o4(){\n var o5 = 0.5\n var o35 = { writable: false, value: 1, configurable: false, enumerable: false };\n try {\no849 = o6;\n}catch(e){}\n try {\nreturn +(o0[o1])\n}catch(e){}\n }\n try {\nreturn o4;\n}catch(e){}\n}", "function ie(a,b,c){this.$=a;this.M=[];this.ga=n;this.Fd=b;this.Jb=c}", "function CIQ(){}", "function M(){}", "function mbcs() {}", "function mbcs() {}", "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being that we just join them anyways\n var o840 = name ? o591.resolve(o591.o592(o502, name)) : o502;\n\n function o841(o842) {\n function o843(o842) {\n try {\nif (!o838) {\n try {\no474.o800(o502, name, o842, o781, o782, o549);\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o837) try {\no837();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n }\n var o844 = false;\n try {\nModule['preloadPlugins'].forEach(function (o845) {\n try {\nif (o844) try {\nreturn;\n}catch(e){}\n}catch(e){}\n try {\nif (o845['canHandle'](o840)) {\n try {\no845['handle'](o842, o840, o843, function () {\n try {\nif (o585) try {\no585();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n });\n}catch(e){}\n try {\no844 = true;\n}catch(e){}\n }\n}catch(e){}\n });\n}catch(e){}\n try {\nif (!o844) try {\no843(o842);\n}catch(e){}\n}catch(e){}\n }\n try {\no332('cp ' + o840);\n}catch(e){}\n try {\nif (typeof o38 == 'string') {\n try {\no839.o846(o38, function (o842) {\n try {\no841(o842);\n}catch(e){}\n }, o585);\n}catch(e){}\n } else {\n try {\no841(o38);\n}catch(e){}\n }\n}catch(e){}\n })\n {\n try {\nif (o1[o3] == undefined)\n {\n try {\nif (o2 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -1)\n {\n try {\no4.o5(o2 + \"-\" + (o3-1) + \" = undefined\");\n}catch(e){}\n try {\no2 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "function Macex() {\r\n}", "function kd(){this.gc=void 0;this.group=w.i.Ik;this.Ob=w.i.Ob}", "function Kutility() {\n\n}", "function Kutility() {\n\n}", "static transient final protected function m44() {}", "function miFuncion (){}", "function o0(stdlib,o1,buffer) {\n try {\no8[4294967294];\n}catch(e){}\n function o104(o49, o50, o73) {\n try {\no95(o49, o50, o73, this);\n}catch(e){}\n\n try {\no489.o767++;\n}catch(e){}\n\n try {\nif (o97 === o49) {\n try {\nreturn true;\n}catch(e){}\n }\n}catch(e){}\n\n try {\nreturn false;\n}catch(e){}\n };\n //views\n var o3 =this;\n\n function o4(){\n var o30\n var o6 = o2(1.5);\n try {\no3[1] = o6;\n}catch(e){}\n try {\nreturn +(o3[1])\n}catch(e){}\n }\n try {\nreturn o4;\n}catch(e){}\n}", "function aI(dI){var dH,dF;if(dI){dH=self;dH.options=dF=dI.data;dH.WRCp=dH.WRCp||dG}function dG(dM,dR){(function(dT){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=dT()}else{if(typeof pakoDefine===\"function\"&&pakoDefine.amd){pakoDefine([],dT)}else{var dS;if(typeof window!==\"undefined\"){dS=window}else{if(typeof dM!==\"undefined\"){dS=dM}else{if(typeof self!==\"undefined\"){dS=self}else{dS=this}}}dS.pako=dT()}}})(function(){return(function dS(dU,dY,dW){function dV(d3,d1){if(!dY[d3]){if(!dU[d3]){var d0=typeof require==\"function\"&&require;if(!d1&&d0){return d0(d3,!0)}if(dT){return dT(d3,!0)}var d2=new Error(\"Cannot find module '\"+d3+\"'\");throw d2.code=\"MODULE_NOT_FOUND\",d2}var dZ=dY[d3]={exports:{}};dU[d3][0].call(dZ.exports,function(d4){var d5=dU[d3][1][d4];return dV(d5?d5:d4)},dZ,dZ.exports,dS,dU,dY,dW)}return dY[d3].exports}var dT=typeof require==\"function\"&&require;for(var dX=0;dX<dW.length;dX++){dV(dW[dX])}return dV})({1:[function(d2,dU,ee){var d7=d2(\"./zlib/deflate.js\");var ed=d2(\"./utils/common\");var dY=d2(\"./utils/strings\");var d0=d2(\"./zlib/messages\");var ec=d2(\"./zlib/zstream\");var d9=Object.prototype.toString;var d8=0;var eg=4;var dZ=0;var d4=1;var dV=-1;var dW=0;var d5=8;var ef=function(ei){this.options=ed.assign({level:dV,method:d5,chunkSize:16384,windowBits:15,memLevel:8,strategy:dW,to:\"\"},ei||{});var ej=this.options;if(ej.raw&&(ej.windowBits>0)){ej.windowBits=-ej.windowBits}else{if(ej.gzip&&(ej.windowBits>0)&&(ej.windowBits<16)){ej.windowBits+=16}}this.err=0;this.msg=\"\";this.ended=false;this.chunks=[];this.strm=new ec();this.strm.avail_out=0;var eh=d7.deflateInit2(this.strm,ej.level,ej.method,ej.windowBits,ej.memLevel,ej.strategy);if(eh!==dZ){throw new Error(d0[eh])}if(ej.header){d7.deflateSetHeader(this.strm,ej.header)}};ef.prototype.pushSingleChunk=function(ek,el){var ei=this.strm;var em=this.options.chunkSize;var eh,ej;if(this.ended){return false}ej=(el===~~el)?el:((el===true)?eg:d8);if(typeof ek===\"string\"){ei.input=dY.string2buf(ek)}else{if(d9.call(ek)===\"[object ArrayBuffer]\"){ei.input=new Uint8Array(ek)}else{ei.input=ek}}ei.next_in=0;ei.avail_in=ei.input.length;dX.call(this,ej);if(dN){return}if(ej===eg){eh=d7.deflateEnd(this.strm);this.onEnd(eh);this.ended=true;return eh===dZ}return true};function d1(eh){return eh<26?eh+65:eh<52?eh+71:eh<62?eh-4:eh===62?43:eh===63?47:65}function d6(eh){var ei=dM.btoa(String.fromCharCode.apply(null,eh));return ei}function eb(em){var ei,el=\"\";if(dM.btoa){return d6(em)}for(var ek=em.length,eh=0,ej=0;ej<ek;ej++){ei=ej%3;eh|=em[ej]<<(16>>>ei&24);if(ei===2||em.length-ej===1){el+=String.fromCharCode(d1(eh>>>18&63),d1(eh>>>12&63),d1(eh>>>6&63),d1(eh&63));eh=0}}return el.replace(/A(?=A$|$)/g,\"=\")}function dX(el){dL();var ej;var ei=this.strm;var em=this.options.chunkSize;var eh,ek;dT.call(this,ei,ek);if(dN){return}if(this.ended){return false}ek=(el===~~el)?el:((el===true)?eg:d8);if(ei.avail_out===0){ei.output=new ed.Buf8(em);ei.next_out=0;ei.avail_out=em;if(dQ()){ej=dO(dX,this,ek,null);dJ(ej);return}}eh=d7.deflate(ei,ek);if(eh===\"defer\"){ej=dO(dX,this,ek,null);dJ(ej);return}if(dQ()){ej=dO(dX,this,ek,null);dJ(ej);return}if(eh!==d4&&eh!==dZ){this.onEnd(eh);this.ended=true;return false}dT.call(this,ei,ek);if((ei.avail_in>0||ei.avail_out===0)&&eh!==d4){if(ei.avail_out===0){ei.output=new ed.Buf8(em);ei.next_out=0;ei.avail_out=em}dX.call(this,ek)}}function dT(ei,ek){if(ei.output&&(ei.avail_out===0||(ei.avail_in===0&&ek===eg))){if(this.options.to===\"string\"){var eh=eb(ed.shrinkBuf(ei.output,ei.next_out));this.onData(eh)}else{this.onData(ed.shrinkBuf(ei.output,ei.next_out))}if(dQ()){var ej=dO(dX,this,ek,null);dJ(ej);return}}}ef.prototype.push=function(el,em){var ej=this.strm;var en=this.options.chunkSize;var ei,ek,eh;if(this.ended){return false}ek=(em===~~em)?em:((em===true)?eg:d8);if(typeof el===\"string\"){ej.input=dY.string2buf(el)}else{if(d9.call(el)===\"[object ArrayBuffer]\"){ej.input=new Uint8Array(el)}else{ej.input=el}}ej.next_in=0;ej.avail_in=ej.input.length;do{if(ej.avail_out===0){ej.output=new ed.Buf8(en);ej.next_out=0;ej.avail_out=en}ei=d7.deflate(ej,ek);if(ei!==d4&&ei!==dZ){this.onEnd(ei);this.ended=true;return false}if(ej.avail_out===0|0|(ej.avail_in===0&&ek===eg)){if(this.options.to===\"string\"){eh=eb(ed.shrinkBuf(ej.output,ej.next_out));this.onData(eh)}else{this.onData(ed.shrinkBuf(ej.output,ej.next_out))}}}while((ej.avail_in>0||ej.avail_out===0)&&ei!==d4);if(ek===eg){ei=d7.deflateEnd(this.strm);this.onEnd(ei);this.ended=true;dM.options=undefined;dM.deflate=undefined;return ei===dZ}return true};ef.prototype.onData=function(eh){this.chunks.push(eh)};ef.prototype.onEnd=function(eh){if(eh===dZ){if(this.options.to===\"string\"){this.result=this.chunks.join(\"\")}else{this.result=ed.flattenChunks(this.chunks)}}this.chunks=[];this.err=eh;this.msg=this.strm.msg};function d3(eh,ei){var ej;if(!ei.level){ei.level=dV}ej=new ef(ei);(!ei.async&&ei.useDefer)?ej.pushSingleChunk(eh,true):ej.push(eh,true);if(ej.err){throw ej.msg}return ej.result}function ea(eh,ei){ei=ei||{};ei.raw=true;return d3(eh,ei)}ee.Deflate=ef;ee.deflate=d3;ee.deflateRaw=ea},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/deflate.js\":8,\"./zlib/messages\":13,\"./zlib/zstream\":15}],2:[function(dU,dV,dT){},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/constants\":6,\"./zlib/gzheader\":9,\"./zlib/inflate.js\":11,\"./zlib/messages\":13,\"./zlib/zstream\":15}],3:[function(dU,dV,dT){var dY=(typeof Uint8Array!==\"undefined\")&&(typeof Uint16Array!==\"undefined\")&&(typeof Int32Array!==\"undefined\");dT.assign=function(d2){var dZ=Array.prototype.slice.call(arguments,1);while(dZ.length){var d0=dZ.shift();if(!d0){continue}if(typeof(d0)!==\"object\"){throw new TypeError(d0+\"must be non-object\")}for(var d1 in d0){if(d0.hasOwnProperty(d1)){d2[d1]=d0[d1]}}}return d2};dT.shrinkBuf=function(dZ,d0){if(dZ.length===d0){return dZ}if(dZ.subarray){return dZ.subarray(0,d0)}dZ.length=d0;return dZ};var dW={arraySet:function(d0,d2,d4,dZ,d3){if(d2.subarray&&d0.subarray){d0.set(d2.subarray(d4,d4+dZ),d3);return}for(var d1=0;d1<dZ;d1++){d0[d3+d1]=d2[d4+d1]}},flattenChunks:function(d5){var d3,d1,d0,d4,d2,dZ;d0=0;for(d3=0,d1=d5.length;d3<d1;d3++){d0+=d5[d3].length}dZ=new Uint8Array(d0);d4=0;for(d3=0,d1=d5.length;d3<d1;d3++){d2=d5[d3];dZ.set(d2,d4);d4+=d2.length}return dZ}};var dX={arraySet:function(d0,d2,d4,dZ,d3){for(var d1=0;d1<dZ;d1++){d0[d3+d1]=d2[d4+d1]}},flattenChunks:function(dZ){return[].concat.apply([],dZ)}};dT.setTyped=function(dZ){if(dZ&&(dR.useBinary||dM.btoa)){dT.Buf8=Uint8Array;dT.Buf16=Uint16Array;dT.Buf32=Int32Array;dT.assign(dT,dW)}else{dT.Buf8=Array;dT.Buf16=Array;dT.Buf32=Array;dT.assign(dT,dX)}};dT.setTyped(dY)},{}],4:[function(dV,dT,dW){var d2=dV(\"./common\");var d0=true;var dY=true;try{String.fromCharCode.apply(null,[0])}catch(d1){d0=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(d1){dY=false}var dU=new d2.Buf8(256);for(var dX=0;dX<256;dX++){dU[dX]=(dX>=252?6:dX>=248?5:dX>=240?4:dX>=224?3:dX>=192?2:1)}dU[254]=dU[254]=1;dW.string2buf=function(d9){var d3,ea,d5,d6,d4,d8=d9.length,d7=0;for(d6=0;d6<d8;d6++){ea=d9.charCodeAt(d6);if((ea&64512)===55296&&(d6+1<d8)){d5=d9.charCodeAt(d6+1);if((d5&64512)===56320){ea=65536+((ea-55296)<<10)+(d5-56320);d6++}}d7+=ea<128?1:ea<2048?2:ea<65536?3:4}d3=new d2.Buf8(d7);for(d4=0,d6=0;d4<d7;d6++){ea=d9.charCodeAt(d6);if((ea&64512)===55296&&(d6+1<d8)){d5=d9.charCodeAt(d6+1);if((d5&64512)===56320){ea=65536+((ea-55296)<<10)+(d5-56320);d6++}}if(ea<128){d3[d4++]=ea}else{if(ea<2048){d3[d4++]=192|(ea>>>6);d3[d4++]=128|(ea&63)}else{if(ea<65536){d3[d4++]=224|(ea>>>12);d3[d4++]=128|(ea>>>6&63);d3[d4++]=128|(ea&63)}else{d3[d4++]=240|(ea>>>18);d3[d4++]=128|(ea>>>12&63);d3[d4++]=128|(ea>>>6&63);d3[d4++]=128|(ea&63)}}}}return d3};function dZ(d5,d4){if(d4<65537){if((d5.subarray&&dY)||(!d5.subarray&&d0)){return String.fromCharCode.apply(null,d2.shrinkBuf(d5,d4))}}var d3=\"\";for(var d6=0;d6<d4;d6++){d3+=String.fromCharCode(d5[d6])}return d3}dW.buf2binstring=function(d3){return dZ(d3,d3.length)};dW.binstring2buf=function(d6){var d4=new d2.Buf8(d6.length);for(var d5=0,d3=d4.length;d5<d3;d5++){d4[d5]=d6.charCodeAt(d5)}return d4};dW.buf2string=function(d8,d5){var d9,d7,ea,d6;var d4=d5||d8.length;var d3=new Array(d4*2);for(d7=0,d9=0;d9<d4;){ea=d8[d9++];if(ea<128){d3[d7++]=ea;continue}d6=dU[ea];if(d6>4){d3[d7++]=65533;d9+=d6-1;continue}ea&=d6===2?31:d6===3?15:7;while(d6>1&&d9<d4){ea=(ea<<6)|(d8[d9++]&63);d6--}if(d6>1){d3[d7++]=65533;continue}if(ea<65536){d3[d7++]=ea}else{ea-=65536;d3[d7++]=55296|((ea>>10)&1023);d3[d7++]=56320|(ea&1023)}}return dZ(d3,d7)};dW.utf8border=function(d4,d3){var d5;d3=d3||d4.length;if(d3>d4.length){d3=d4.length}d5=d3-1;while(d5>=0&&(d4[d5]&192)===128){d5--}if(d5<0){return d3}if(d5===0){return d3}return(d5+dU[d4[d5]]>d3)?d5:d3}},{\"./common\":3}],5:[function(dU,dV,dT){},{}],6:[function(dU,dV,dT){dV.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(dU,dV,dT){},{}],8:[function(eY,fc,et){var eA=eY(\"../utils/common\");var fa=eY(\"./trees\");var es=eY(\"./adler32\");var eH=eY(\"./crc32\");var en=eY(\"./messages\");var ev=0;var eG=1;var e2=3;var d3=4;var eB=5;var d9=0;var ee=1;var eZ=-2;var ed=-3;var dX=-5;var dZ=-1;var ew=1;var el=2;var eh=3;var ea=4;var e3=0;var er=2;var eF=8;var e4=9;var ey=15;var d5=8;var eU=29;var e8=256;var fb=e8+1+eU;var ek=30;var eP=19;var eW=2*fb+1;var ez=15;var ep=3;var e0=258;var dV=(e0+ep+1);var d1=32;var eD=42;var d7=69;var eI=73;var eV=91;var d8=103;var ff=113;var ej=666;var eX=1;var eb=2;var eC=3;var dW=4;var e1=3;function eQ(fg,fh){fg.msg=en[fh];return fh}function ex(fg){return((fg)<<1)-((fg)>4?9:0)}function e7(fh){var fg=fh.length;while(--fg>=0){fh[fg]=0}}function dY(fh){var fi=fh.state;var fg=fi.pending;if(fg>fh.avail_out){fg=fh.avail_out}if(fg===0){return}eA.arraySet(fh.output,fi.pending_buf,fi.pending_out,fg,fh.next_out);fh.next_out+=fg;fi.pending_out+=fg;fh.total_out+=fg;fh.avail_out-=fg;fi.pending-=fg;if(fi.pending===0){fi.pending_out=0}}function d2(fg,fh){fa._tr_flush_block(fg,(fg.block_start>=0?fg.block_start:-1),fg.strstart-fg.block_start,fh);fg.block_start=fg.strstart;dY(fg.strm)}function dU(fh,fg){fh.pending_buf[fh.pending++]=fg}function ei(fh,fg){fh.pending_buf[fh.pending++]=(fg>>>8)&255;fh.pending_buf[fh.pending++]=fg&255}function em(fh,fi,fk,fj){var fg=fh.avail_in;if(fg>fj){fg=fj}if(fg===0){return 0}fh.avail_in-=fg;eA.arraySet(fi,fh.input,fh.next_in,fg,fk);if(fh.state.wrap===1){fh.adler=es(fh.adler,fi,fg,fk)}else{if(fh.state.wrap===2){fh.adler=eH(fh.adler,fi,fg,fk)}}fh.next_in+=fg;fh.total_in+=fg;return fg}function e6(ft,fk){var fn=ft.max_chain_length;var fu=ft.strstart;var fl;var fm;var fg=ft.prev_length;var fh=ft.nice_match;var fj=(ft.strstart>(ft.w_size-dV))?ft.strstart-(ft.w_size-dV):0;var fr=ft.window;var fo=ft.w_mask;var fi=ft.prev;var fq=ft.strstart+e0;var fs=fr[fu+fg-1];var fp=fr[fu+fg];if(ft.prev_length>=ft.good_match){fn>>=2}if(fh>ft.lookahead){fh=ft.lookahead}do{fl=fk;if(fr[fl+fg]!==fp||fr[fl+fg-1]!==fs||fr[fl]!==fr[fu]||fr[++fl]!==fr[fu+1]){continue}fu+=2;fl++;do{}while(fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fr[++fu]===fr[++fl]&&fu<fq);fm=e0-(fq-fu);fu=fq-e0;if(fm>fg){ft.match_start=fk;fg=fm;if(fm>=fh){break}fs=fr[fu+fg-1];fp=fr[fu+fg]}}while((fk=fi[fk&fo])>fj&&--fn!==0);if(fg<=ft.lookahead){return fg}return ft.lookahead}function eT(fi){var fm=fi.w_size;var fj,fl,fg,fh,fk;do{fh=fi.window_size-fi.lookahead-fi.strstart;if(fi.strstart>=fm+(fm-dV)){eA.arraySet(fi.window,fi.window,fm,fm,0);fi.match_start-=fm;fi.strstart-=fm;fi.block_start-=fm;fl=fi.hash_size;fj=fl;do{fg=fi.head[--fj];fi.head[fj]=(fg>=fm?fg-fm:0)}while(--fl);fl=fm;fj=fl;do{fg=fi.prev[--fj];fi.prev[fj]=(fg>=fm?fg-fm:0)}while(--fl);fh+=fm}if(fi.strm.avail_in===0){break}fl=em(fi.strm,fi.window,fi.strstart+fi.lookahead,fh);fi.lookahead+=fl;if(fi.lookahead+fi.insert>=ep){fk=fi.strstart-fi.insert;fi.ins_h=fi.window[fk];fi.ins_h=((fi.ins_h<<fi.hash_shift)^fi.window[fk+1])&fi.hash_mask;while(fi.insert){fi.ins_h=((fi.ins_h<<fi.hash_shift)^fi.window[fk+ep-1])&fi.hash_mask;fi.prev[fk&fi.w_mask]=fi.head[fi.ins_h];fi.head[fi.ins_h]=fk;fk++;fi.insert--;if(fi.lookahead+fi.insert<ep){break}}}}while(fi.lookahead<dV&&fi.strm.avail_in!==0)}function eu(fj,fg){var fi=65535;if(fi>fj.pending_buf_size-5){fi=fj.pending_buf_size-5}for(;;){if(fj.lookahead<=1){eT(fj);if(fj.lookahead===0&&fg===ev){return eX}if(fj.lookahead===0){break}}fj.strstart+=fj.lookahead;fj.lookahead=0;var fh=fj.block_start+fi;if(fj.strstart===0||fj.strstart>=fh){fj.lookahead=fj.strstart-fh;fj.strstart=fh;d2(fj,false);if(fj.strm.avail_out===0){return eX}}if(fj.strstart-fj.block_start>=(fj.w_size-dV)){d2(fj,false);if(fj.strm.avail_out===0){return eX}}}fj.insert=0;if(fg===d3){d2(fj,true);if(fj.strm.avail_out===0){return eC}return dW}if(fj.strstart>fj.block_start){d2(fj,false);if(fj.strm.avail_out===0){return eX}}return eX}function d4(fi,fg){var fj;var fh;for(;;){if(fi.lookahead<dV){eT(fi);if(fi.lookahead<dV&&fg===ev){return eX}if(fi.lookahead===0){break}}fj=0;if(fi.lookahead>=ep){fi.ins_h=((fi.ins_h<<fi.hash_shift)^fi.window[fi.strstart+ep-1])&fi.hash_mask;fj=fi.prev[fi.strstart&fi.w_mask]=fi.head[fi.ins_h];fi.head[fi.ins_h]=fi.strstart}if(fj!==0&&((fi.strstart-fj)<=(fi.w_size-dV))){fi.match_length=e6(fi,fj)}if(fi.match_length>=ep){fh=fa._tr_tally(fi,fi.strstart-fi.match_start,fi.match_length-ep);fi.lookahead-=fi.match_length;if(fi.match_length<=fi.max_lazy_match&&fi.lookahead>=ep){fi.match_length--;do{fi.strstart++;fi.ins_h=((fi.ins_h<<fi.hash_shift)^fi.window[fi.strstart+ep-1])&fi.hash_mask;fj=fi.prev[fi.strstart&fi.w_mask]=fi.head[fi.ins_h];fi.head[fi.ins_h]=fi.strstart}while(--fi.match_length!==0);fi.strstart++}else{fi.strstart+=fi.match_length;fi.match_length=0;fi.ins_h=fi.window[fi.strstart];fi.ins_h=((fi.ins_h<<fi.hash_shift)^fi.window[fi.strstart+1])&fi.hash_mask}}else{fh=fa._tr_tally(fi,0,fi.window[fi.strstart]);fi.lookahead--;fi.strstart++}if(fh){d2(fi,false);if(fi.strm.avail_out===0){return eX}}}fi.insert=((fi.strstart<(ep-1))?fi.strstart:ep-1);if(fg===d3){d2(fi,true);if(fi.strm.avail_out===0){return eC}return dW}if(fi.last_lit){d2(fi,false);if(fi.strm.avail_out===0){return eX}}return eb}function eR(fj,fh){var fk;var fi;var fg;for(;;){if(fj.lookahead<dV){eT(fj);if(fj.lookahead<dV&&fh===ev){return eX}if(fj.lookahead===0){break}}fk=0;if(fj.lookahead>=ep){fj.ins_h=((fj.ins_h<<fj.hash_shift)^fj.window[fj.strstart+ep-1])&fj.hash_mask;fk=fj.prev[fj.strstart&fj.w_mask]=fj.head[fj.ins_h];fj.head[fj.ins_h]=fj.strstart}fj.prev_length=fj.match_length;fj.prev_match=fj.match_start;fj.match_length=ep-1;if(fk!==0&&fj.prev_length<fj.max_lazy_match&&fj.strstart-fk<=(fj.w_size-dV)){fj.match_length=e6(fj,fk);if(fj.match_length<=5&&(fj.strategy===ew||(fj.match_length===ep&&fj.strstart-fj.match_start>4096))){fj.match_length=ep-1}}if(fj.prev_length>=ep&&fj.match_length<=fj.prev_length){fg=fj.strstart+fj.lookahead-ep;fi=fa._tr_tally(fj,fj.strstart-1-fj.prev_match,fj.prev_length-ep);fj.lookahead-=fj.prev_length-1;fj.prev_length-=2;do{if(++fj.strstart<=fg){fj.ins_h=((fj.ins_h<<fj.hash_shift)^fj.window[fj.strstart+ep-1])&fj.hash_mask;fk=fj.prev[fj.strstart&fj.w_mask]=fj.head[fj.ins_h];fj.head[fj.ins_h]=fj.strstart}}while(--fj.prev_length!==0);fj.match_available=0;fj.match_length=ep-1;fj.strstart++;if(fi){d2(fj,false);if(fj.strm.avail_out===0){return eX}}}else{if(fj.match_available){fi=fa._tr_tally(fj,0,fj.window[fj.strstart-1]);if(fi){d2(fj,false)}fj.strstart++;fj.lookahead--;if(fj.strm.avail_out===0){return eX}}else{fj.match_available=1;fj.strstart++;fj.lookahead--}}}if(fj.match_available){fi=fa._tr_tally(fj,0,fj.window[fj.strstart-1]);fj.match_available=0}fj.insert=fj.strstart<ep-1?fj.strstart:ep-1;if(fh===d3){d2(fj,true);if(fj.strm.avail_out===0){return eC}return dW}if(fj.last_lit){d2(fj,false);if(fj.strm.avail_out===0){return eX}}return eb}function eN(fk,fh){var fj;var fl;var fi,fg;var fm=fk.window;for(;;){if(fk.lookahead<=e0){eT(fk);if(fk.lookahead<=e0&&fh===ev){return eX}if(fk.lookahead===0){break}}fk.match_length=0;if(fk.lookahead>=ep&&fk.strstart>0){fi=fk.strstart-1;fl=fm[fi];if(fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]){fg=fk.strstart+e0;do{}while(fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fl===fm[++fi]&&fi<fg);fk.match_length=e0-(fg-fi);if(fk.match_length>fk.lookahead){fk.match_length=fk.lookahead}}}if(fk.match_length>=ep){fj=fa._tr_tally(fk,1,fk.match_length-ep);fk.lookahead-=fk.match_length;fk.strstart+=fk.match_length;fk.match_length=0}else{fj=fa._tr_tally(fk,0,fk.window[fk.strstart]);fk.lookahead--;fk.strstart++}if(fj){d2(fk,false);if(fk.strm.avail_out===0){return eX}}}fk.insert=0;if(fh===d3){d2(fk,true);if(fk.strm.avail_out===0){return eC}return dW}if(fk.last_lit){d2(fk,false);if(fk.strm.avail_out===0){return eX}}return eb}function eO(fi,fg){var fh;for(;;){if(fi.lookahead===0){eT(fi);if(fi.lookahead===0){if(fg===ev){return eX}break}}fi.match_length=0;fh=fa._tr_tally(fi,0,fi.window[fi.strstart]);fi.lookahead--;fi.strstart++;if(fh){d2(fi,false);if(fi.strm.avail_out===0){return eX}}}fi.insert=0;if(fg===d3){d2(fi,true);if(fi.strm.avail_out===0){return eC}return dW}if(fi.last_lit){d2(fi,false);if(fi.strm.avail_out===0){return eX}}return eb}var eL=function(fg,fk,fh,fj,fi){this.good_length=fg;this.max_lazy=fk;this.nice_length=fh;this.max_chain=fj;this.func=fi};var eK;eK=[new eL(0,0,0,0,eu),new eL(4,4,8,4,d4),new eL(4,5,16,8,d4),new eL(4,6,32,32,d4),new eL(4,4,16,16,eR),new eL(8,16,32,32,eR),new eL(8,16,128,128,eR),new eL(8,32,128,256,eR),new eL(32,128,258,1024,eR),new eL(32,258,258,4096,eR)];function eq(fg){fg.window_size=2*fg.w_size;e7(fg.head);fg.max_lazy_match=eK[fg.level].max_lazy;fg.good_match=eK[fg.level].good_length;fg.nice_match=eK[fg.level].nice_length;fg.max_chain_length=eK[fg.level].max_chain;fg.strstart=0;fg.block_start=0;fg.lookahead=0;fg.insert=0;fg.match_length=fg.prev_length=ep-1;fg.match_available=0;fg.ins_h=0}function dT(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=eF;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new eA.Buf16(eW*2);this.dyn_dtree=new eA.Buf16((2*ek+1)*2);this.bl_tree=new eA.Buf16((2*eP+1)*2);e7(this.dyn_ltree);e7(this.dyn_dtree);e7(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new eA.Buf16(ez+1);this.heap=new eA.Buf16(2*fb+1);e7(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new eA.Buf16(2*fb+1);e7(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function eS(fg){var fh;if(!fg||!fg.state){return eQ(fg,eZ)}fg.total_in=fg.total_out=0;fg.data_type=er;fh=fg.state;fh.pending=0;fh.pending_out=0;if(fh.wrap<0){fh.wrap=-fh.wrap}fh.status=(fh.wrap?eD:ff);fg.adler=(fh.wrap===2)?0:1;fh.last_flush=ev;fa._tr_init(fh);return d9}function ef(fg){var fh=eS(fg);if(fh===d9){eq(fg.state)}return fh}function fe(fg,fh){if(!fg||!fg.state){return eZ}if(fg.state.wrap!==2){return eZ}fg.state.gzhead=fh;return d9}function eo(fg,fn,fm,fj,fl,fk){if(!fg){return eZ}var fi=1;if(fn===dZ){fn=6}if(fj<0){fi=0;fj=-fj}else{if(fj>15){fi=2;fj-=16}}if(fl<1||fl>e4||fm!==eF||fj<8||fj>15||fn<0||fn>9||fk<0||fk>ea){return eQ(fg,eZ)}if(fj===8){fj=9}var fh=new dT();fg.state=fh;fh.strm=fg;fh.wrap=fi;fh.gzhead=null;fh.w_bits=fj;fh.w_size=1<<fh.w_bits;fh.w_mask=fh.w_size-1;fh.hash_bits=fl+7;fh.hash_size=1<<fh.hash_bits;fh.hash_mask=fh.hash_size-1;fh.hash_shift=~~((fh.hash_bits+ep-1)/ep);fh.window=new eA.Buf8(fh.w_size*2);fh.head=new eA.Buf16(fh.hash_size);fh.prev=new eA.Buf16(fh.w_size);fh.lit_bufsize=1<<(fl+6);fh.pending_buf_size=fh.lit_bufsize*4;fh.pending_buf=new eA.Buf8(fh.pending_buf_size);fh.d_buf=fh.lit_bufsize>>1;fh.l_buf=(1+2)*fh.lit_bufsize;fh.level=fn;fh.strategy=fk;fh.method=fm;return ef(fg)}function eE(fg,fh){return eo(fg,fh,eF,ey,d5,e3)}function d6(fi,fg,fl){var fk,fj,fh;dL();if(!fi||!fi.state||fg>eB||fg<0){return fi?eQ(fi,eZ):eZ}fj=fi.state;if(!fi.output||(!fi.input&&fi.avail_in!==0)||(fj.status===ej&&fg!==d3)){return eQ(fi,(fi.avail_out===0)?dX:eZ)}fj.strm=fi;fk=fj.last_flush;fj.last_flush=fg;if(fj.status===eD){eg(fj)}if(dQ()){return\"defer\"}if(fj.status===d7){e9(fj,fi)}if(dQ()){return\"defer\"}if(fj.status===eI){d0(fj,fi)}if(dQ()){return\"defer\"}if(fj.status===eV){eJ(fj,fi)}if(dQ()){return\"defer\"}if(fj.status===d8){fd(fj,fi)}if(dQ()){return\"defer\"}if(!fj.flushedPending){fh=eM(fj,fi,fg);if(typeof fh!==\"undefined\"){fj.flushedPending=null;return fh}}if(fg!==d3){return d9}if(fj.wrap<=0){return ee}if(dQ()){return\"defer\"}fj.flushedPending=null;ec(fj);dY(fj);if(fj.wrap>0){fj.wrap=-fj.wrap}return fj.pending!==0?d9:ee}function eg(fh,fg){if(fh.wrap===2){fg.adler=0;dU(fh,31);dU(fh,139);dU(fh,8);if(!fh.gzhead){dU(fh,0);dU(fh,0);dU(fh,0);dU(fh,0);dU(fh,0);dU(fh,fh.level===9?2:(fh.strategy>=el||fh.level<2?4:0));dU(fh,e1);fh.status=ff}else{dU(fh,(fh.gzhead.text?1:0)+(fh.gzhead.hcrc?2:0)+(!fh.gzhead.extra?0:4)+(!fh.gzhead.name?0:8)+(!fh.gzhead.comment?0:16));dU(fh,fh.gzhead.time&255);dU(fh,(fh.gzhead.time>>8)&255);dU(fh,(fh.gzhead.time>>16)&255);dU(fh,(fh.gzhead.time>>24)&255);dU(fh,fh.level===9?2:(fh.strategy>=el||fh.level<2?4:0));dU(fh,fh.gzhead.os&255);if(fh.gzhead.extra&&fh.gzhead.extra.length){dU(fh,fh.gzhead.extra.length&255);dU(fh,(fh.gzhead.extra.length>>8)&255)}if(fh.gzhead.hcrc){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending,0)}fh.gzindex=0;fh.status=d7}}else{var fj=(eF+((fh.w_bits-8)<<4))<<8;var fi=-1;if(fh.strategy>=el||fh.level<2){fi=0}else{if(fh.level<6){fi=1}else{if(fh.level===6){fi=2}else{fi=3}}}fj|=(fi<<6);if(fh.strstart!==0){fj|=d1}fj+=31-(fj%31);fh.status=ff;ei(fh,fj);if(fh.strstart!==0){ei(fh,fg.adler>>>16);ei(fh,fg.adler&65535)}fg.adler=1}}function e9(fh,fg){if(fh.gzhead.extra){beg=fh.pending;while(fh.gzindex<(fh.gzhead.extra.length&65535)){if(fh.pending===fh.pending_buf_size){if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}dY(fg);beg=fh.pending;if(fh.pending===fh.pending_buf_size){break}}dU(fh,fh.gzhead.extra[fh.gzindex]&255);fh.gzindex++}if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}if(fh.gzindex===fh.gzhead.extra.length){fh.gzindex=0;fh.status=eI}}else{fh.status=eI}}function d0(fh,fg){if(fh.gzhead.name){beg=fh.pending;do{if(fh.pending===fh.pending_buf_size){if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}dY(fg);beg=fh.pending;if(fh.pending===fh.pending_buf_size){val=1;break}}if(fh.gzindex<fh.gzhead.name.length){val=fh.gzhead.name.charCodeAt(fh.gzindex++)&255}else{val=0}dU(fh,val)}while(val!==0);if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}if(val===0){fh.gzindex=0;fh.status=eV}}else{fh.status=eV}}function eJ(fh,fg){if(fh.gzhead.comment){beg=fh.pending;do{if(fh.pending===fh.pending_buf_size){if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}dY(fg);beg=fh.pending;if(fh.pending===fh.pending_buf_size){val=1;break}}if(fh.gzindex<fh.gzhead.comment.length){val=fh.gzhead.comment.charCodeAt(fh.gzindex++)&255}else{val=0}dU(fh,val)}while(val!==0);if(fh.gzhead.hcrc&&fh.pending>beg){fg.adler=eH(fg.adler,fh.pending_buf,fh.pending-beg,beg)}if(val===0){fh.status=d8}}else{fh.status=d8}}function fd(fh,fg){if(fh.gzhead.hcrc){if(fh.pending+2>fh.pending_buf_size){dY(fg)}if(fh.pending+2<=fh.pending_buf_size){dU(fh,fg.adler&255);dU(fh,(fg.adler>>8)&255);fg.adler=0;fh.status=ff}}else{fh.status=ff}}function eM(fi,fh,fg){var fj=fi.last_flush;fi.flushedPending=true;if(fi.pending!==0){dY(fh);if(fh.avail_out===0){fi.last_flush=-1;return d9}}else{if(fh.avail_in===0&&ex(fg)<=ex(fj)&&fg!==d3){return eQ(fh,dX)}}if(fi.status===ej&&fh.avail_in!==0){return eQ(fh,dX)}if(fh.avail_in!==0||fi.lookahead!==0||(fg!==ev&&fi.status!==ej)){var fk=(fi.strategy===el)?eO(fi,fg):(fi.strategy===eh?eN(fi,fg):eK[fi.level].func(fi,fg));if(fk===eC||fk===dW){fi.status=ej}if(fk===eX||fk===eC){if(fh.avail_out===0){fi.last_flush=-1}return d9}if(fk===eb){if(fg===eG){fa._tr_align(fi)}else{if(fg!==eB){fa._tr_stored_block(fi,0,0,false);if(fg===e2){e7(fi.head);if(fi.lookahead===0){fi.strstart=0;fi.block_start=0;fi.insert=0}}}}dY(fh);if(fh.avail_out===0){fi.last_flush=-1;return d9}}}}function ec(fh,fg){if(fh.wrap===2){dU(fh,fg.adler&255);dU(fh,(fg.adler>>8)&255);dU(fh,(fg.adler>>16)&255);dU(fh,(fg.adler>>24)&255);dU(fh,fg.total_in&255);dU(fh,(fg.total_in>>8)&255);dU(fh,(fg.total_in>>16)&255);dU(fh,(fg.total_in>>24)&255)}else{ei(fh,fg.adler>>>16);ei(fh,fg.adler&65535)}}function e5(fh){var fg;if(!fh||!fh.state){return eZ}fg=fh.state.status;if(fg!==eD&&fg!==d7&&fg!==eI&&fg!==eV&&fg!==d8&&fg!==ff&&fg!==ej){return eQ(fh,eZ)}fh.state=null;return fg===ff?eQ(fh,ed):d9}et.deflateInit=eE;et.deflateInit2=eo;et.deflateReset=ef;et.deflateResetKeep=eS;et.deflateSetHeader=fe;et.deflate=d6;et.deflateEnd=e5;et.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./messages\":13,\"./trees\":14}],9:[function(dU,dV,dT){function dW(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name=\"\";this.comment=\"\";this.hcrc=0;this.done=false}dV.exports=dW},{}],10:[function(dU,dV,dT){},{}],11:[function(dU,dV,dT){},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./inffast\":10,\"./inftrees\":12}],12:[function(dV,dW,dU){var dT=dV(\"../utils/common\")},{\"../utils/common\":3}],13:[function(dU,dV,dT){},{}],14:[function(d1,dZ,eQ){var e0=d1(\"../utils/common\");var ey=4;var d9=0;var ej=1;var ek=2;function dT(e2){var e1=e2.length;while(--e1>=0){e2[e1]=0}}var eC=0;var eS=1;var er=2;var eZ=3;var el=258;var d6=29;var dW=256;var dX=dW+1+d6;var dU=30;var ec=19;var dY=2*dX+1;var eW=15;var ef=16;var eL=7;var dV=256;var eo=16;var en=17;var es=18;var d0=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var ed=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var ei=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var ez=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var eA=512;var eu=new Array((dX+2)*2);dT(eu);var eG=new Array(dU*2);dT(eG);var eM=new Array(eA);dT(eM);var eg=new Array(el-eZ+1);dT(eg);var et=new Array(d6);dT(et);var eV=new Array(dU);dT(eV);var eJ=function(e4,e3,e2,e1,e5){this.static_tree=e4;this.extra_bits=e3;this.extra_base=e2;this.elems=e1;this.max_length=e5;this.has_stree=e4&&e4.length};var eO;var eF;var ee;var eY=function(e2,e1){this.dyn_tree=e2;this.max_code=0;this.stat_desc=e1};function eH(e1){return e1<256?eM[e1]:eM[256+(e1>>>7)]}function d4(e2,e1){e2.pending_buf[e2.pending++]=(e1)&255;e2.pending_buf[e2.pending++]=(e1>>>8)&255}function eN(e1,e3,e2){if(e1.bi_valid>(ef-e2)){e1.bi_buf|=(e3<<e1.bi_valid)&65535;d4(e1,e1.bi_buf);e1.bi_buf=e3>>(ef-e1.bi_valid);e1.bi_valid+=e2-ef}else{e1.bi_buf|=(e3<<e1.bi_valid)&65535;e1.bi_valid+=e2}}function eR(e2,e3,e1){eN(e2,e1[e3*2],e1[e3*2+1])}function eh(e3,e1){var e2=0;do{e2|=e3&1;e3>>>=1;e2<<=1}while(--e1>0);return e2>>>1}function eb(e1){if(e1.bi_valid===16){d4(e1,e1.bi_buf);e1.bi_buf=0;e1.bi_valid=0}else{if(e1.bi_valid>=8){e1.pending_buf[e1.pending++]=e1.bi_buf&255;e1.bi_buf>>=8;e1.bi_valid-=8}}}function d3(ff,fa){var fg=fa.dyn_tree;var fb=fa.max_code;var fe=fa.stat_desc.static_tree;var e3=fa.stat_desc.has_stree;var e5=fa.stat_desc.extra_bits;var e1=fa.stat_desc.extra_base;var fd=fa.stat_desc.max_length;var e8;var e2,e4;var fc;var e7;var e9;var e6=0;for(fc=0;fc<=eW;fc++){ff.bl_count[fc]=0}fg[ff.heap[ff.heap_max]*2+1]=0;for(e8=ff.heap_max+1;e8<dY;e8++){e2=ff.heap[e8];fc=fg[fg[e2*2+1]*2+1]+1;if(fc>fd){fc=fd;e6++}fg[e2*2+1]=fc;if(e2>fb){continue}ff.bl_count[fc]++;e7=0;if(e2>=e1){e7=e5[e2-e1]}e9=fg[e2*2];ff.opt_len+=e9*(fc+e7);if(e3){ff.static_len+=e9*(fe[e2*2+1]+e7)}}if(e6===0){return}do{fc=fd-1;while(ff.bl_count[fc]===0){fc--}ff.bl_count[fc]--;ff.bl_count[fc+1]+=2;ff.bl_count[fd]--;e6-=2}while(e6>0);for(fc=fd;fc!==0;fc--){e2=ff.bl_count[fc];while(e2!==0){e4=ff.heap[--e8];if(e4>fb){continue}if(fg[e4*2+1]!==fc){ff.opt_len+=(fc-fg[e4*2+1])*fg[e4*2];fg[e4*2+1]=fc}e2--}}}function eP(e2,e8,e3){var e5=new Array(eW+1);var e4=0;var e6;var e7;for(e6=1;e6<=eW;e6++){e5[e6]=e4=(e4+e3[e6-1])<<1}for(e7=0;e7<=e8;e7++){var e1=e2[e7*2+1];if(e1===0){continue}e2[e7*2]=eh(e5[e1]++,e1)}}function eB(){var e6;var e4;var e3;var e2;var e5;var e1=new Array(eW+1);e3=0;for(e2=0;e2<d6-1;e2++){et[e2]=e3;for(e6=0;e6<(1<<d0[e2]);e6++){eg[e3++]=e2}}eg[e3-1]=e2;e5=0;for(e2=0;e2<16;e2++){eV[e2]=e5;for(e6=0;e6<(1<<ed[e2]);e6++){eM[e5++]=e2}}e5>>=7;for(;e2<dU;e2++){eV[e2]=e5<<7;for(e6=0;e6<(1<<(ed[e2]-7));e6++){eM[256+e5++]=e2}}for(e4=0;e4<=eW;e4++){e1[e4]=0}e6=0;while(e6<=143){eu[e6*2+1]=8;e6++;e1[8]++}while(e6<=255){eu[e6*2+1]=9;e6++;e1[9]++}while(e6<=279){eu[e6*2+1]=7;e6++;e1[7]++}while(e6<=287){eu[e6*2+1]=8;e6++;e1[8]++}eP(eu,dX+1,e1);for(e6=0;e6<dU;e6++){eG[e6*2+1]=5;eG[e6*2]=eh(e6,5)}eO=new eJ(eu,d0,dW+1,dX,eW);eF=new eJ(eG,ed,0,dU,eW);ee=new eJ(new Array(0),ei,0,ec,eL)}function eq(e1){var e2;for(e2=0;e2<dX;e2++){e1.dyn_ltree[e2*2]=0}for(e2=0;e2<dU;e2++){e1.dyn_dtree[e2*2]=0}for(e2=0;e2<ec;e2++){e1.bl_tree[e2*2]=0}e1.dyn_ltree[dV*2]=1;e1.opt_len=e1.static_len=0;e1.last_lit=e1.matches=0}function d2(e1){if(e1.bi_valid>8){d4(e1,e1.bi_buf)}else{if(e1.bi_valid>0){e1.pending_buf[e1.pending++]=e1.bi_buf}}e1.bi_buf=0;e1.bi_valid=0}function d8(e3,e2,e1,e4){d2(e3);if(e4){d4(e3,e1);d4(e3,~e1)}e0.arraySet(e3.pending_buf,e3.window,e2,e1,e3.pending);e3.pending+=e1}function eE(e2,e6,e1,e5){var e4=e6*2;var e3=e1*2;return(e2[e4]<e2[e3]||(e2[e4]===e2[e3]&&e5[e6]<=e5[e1]))}function eX(e5,e1,e3){var e2=e5.heap[e3];var e4=e3<<1;while(e4<=e5.heap_len){if(e4<e5.heap_len&&eE(e1,e5.heap[e4+1],e5.heap[e4],e5.depth)){e4++}if(eE(e1,e2,e5.heap[e4],e5.depth)){break}e5.heap[e3]=e5.heap[e4];e3=e4;e4<<=1}e5.heap[e3]=e2}function eU(e2,e8,e5){var e7;var e4;var e6=0;var e3;var e1;if(e2.last_lit!==0){do{e7=(e2.pending_buf[e2.d_buf+e6*2]<<8)|(e2.pending_buf[e2.d_buf+e6*2+1]);e4=e2.pending_buf[e2.l_buf+e6];e6++;if(e7===0){eR(e2,e4,e8)}else{e3=eg[e4];eR(e2,e3+dW+1,e8);e1=d0[e3];if(e1!==0){e4-=et[e3];eN(e2,e4,e1)}e7--;e3=eH(e7);eR(e2,e3,e5);e1=ed[e3];if(e1!==0){e7-=eV[e3];eN(e2,e7,e1)}}}while(e6<e2.last_lit)}eR(e2,dV,e8)}function eD(e9,e6){var fa=e6.dyn_tree;var e8=e6.stat_desc.static_tree;var e3=e6.stat_desc.has_stree;var e1=e6.stat_desc.elems;var e2,e5;var e7=-1;var e4;e9.heap_len=0;e9.heap_max=dY;for(e2=0;e2<e1;e2++){if(fa[e2*2]!==0){e9.heap[++e9.heap_len]=e7=e2;e9.depth[e2]=0}else{fa[e2*2+1]=0}}while(e9.heap_len<2){e4=e9.heap[++e9.heap_len]=(e7<2?++e7:0);fa[e4*2]=1;e9.depth[e4]=0;e9.opt_len--;if(e3){e9.static_len-=e8[e4*2+1]}}e6.max_code=e7;for(e2=(e9.heap_len>>1);e2>=1;e2--){eX(e9,fa,e2)}e4=e1;do{e2=e9.heap[1];e9.heap[1]=e9.heap[e9.heap_len--];eX(e9,fa,1);e5=e9.heap[1];e9.heap[--e9.heap_max]=e2;e9.heap[--e9.heap_max]=e5;fa[e4*2]=fa[e2*2]+fa[e5*2];e9.depth[e4]=(e9.depth[e2]>=e9.depth[e5]?e9.depth[e2]:e9.depth[e5])+1;fa[e2*2+1]=fa[e5*2+1]=e4;e9.heap[1]=e4++;eX(e9,fa,1)}while(e9.heap_len>=2);e9.heap[--e9.heap_max]=e9.heap[1];d3(e9,e6);eP(fa,e7,e9.bl_count)}function d7(e9,fa,e8){var e2;var e6=-1;var e1;var e4=fa[0*2+1];var e5=0;var e3=7;var e7=4;if(e4===0){e3=138;e7=3}fa[(e8+1)*2+1]=65535;for(e2=0;e2<=e8;e2++){e1=e4;e4=fa[(e2+1)*2+1];if(++e5<e3&&e1===e4){continue}else{if(e5<e7){e9.bl_tree[e1*2]+=e5}else{if(e1!==0){if(e1!==e6){e9.bl_tree[e1*2]++}e9.bl_tree[eo*2]++}else{if(e5<=10){e9.bl_tree[en*2]++}else{e9.bl_tree[es*2]++}}}}e5=0;e6=e1;if(e4===0){e3=138;e7=3}else{if(e1===e4){e3=6;e7=3}else{e3=7;e7=4}}}}function ea(e9,fa,e8){var e2;var e6=-1;var e1;var e4=fa[0*2+1];var e5=0;var e3=7;var e7=4;if(e4===0){e3=138;e7=3}for(e2=0;e2<=e8;e2++){e1=e4;e4=fa[(e2+1)*2+1];if(++e5<e3&&e1===e4){continue}else{if(e5<e7){do{eR(e9,e1,e9.bl_tree)}while(--e5!==0)}else{if(e1!==0){if(e1!==e6){eR(e9,e1,e9.bl_tree);e5--}eR(e9,eo,e9.bl_tree);eN(e9,e5-3,2)}else{if(e5<=10){eR(e9,en,e9.bl_tree);eN(e9,e5-3,3)}else{eR(e9,es,e9.bl_tree);eN(e9,e5-11,7)}}}}e5=0;e6=e1;if(e4===0){e3=138;e7=3}else{if(e1===e4){e3=6;e7=3}else{e3=7;e7=4}}}}function em(e2){var e1;d7(e2,e2.dyn_ltree,e2.l_desc.max_code);d7(e2,e2.dyn_dtree,e2.d_desc.max_code);eD(e2,e2.bl_desc);for(e1=ec-1;e1>=3;e1--){if(e2.bl_tree[ez[e1]*2+1]!==0){break}}e2.opt_len+=3*(e1+1)+5+5+4;return e1}function ew(e2,e3,e1,e4){var e5;eN(e2,e3-257,5);eN(e2,e1-1,5);eN(e2,e4-4,4);for(e5=0;e5<e4;e5++){eN(e2,e2.bl_tree[ez[e5]*2+1],3)}ea(e2,e2.dyn_ltree,e3-1);ea(e2,e2.dyn_dtree,e1-1)}function ev(e2){var e1=4093624447;var e3;for(e3=0;e3<=31;e3++,e1>>>=1){if((e1&1)&&(e2.dyn_ltree[e3*2]!==0)){return d9}}if(e2.dyn_ltree[9*2]!==0||e2.dyn_ltree[10*2]!==0||e2.dyn_ltree[13*2]!==0){return ej}for(e3=32;e3<dW;e3++){if(e2.dyn_ltree[e3*2]!==0){return ej}}return d9}var eK=false;function ep(e1){if(!eK){eB();eK=true}e1.l_desc=new eY(e1.dyn_ltree,eO);e1.d_desc=new eY(e1.dyn_dtree,eF);e1.bl_desc=new eY(e1.bl_tree,ee);e1.bi_buf=0;e1.bi_valid=0;eq(e1)}function ex(e3,e1,e2,e4){eN(e3,(eC<<1)+(e4?1:0),3);d8(e3,e1,e2,true)}function eI(e1){eN(e1,eS<<1,3);eR(e1,dV,eu);eb(e1)}function d5(e6,e3,e5,e7){var e2,e1;var e4=0;if(e6.level>0){if(e6.strm.data_type===ek){e6.strm.data_type=ev(e6)}eD(e6,e6.l_desc);eD(e6,e6.d_desc);e4=em(e6);e2=(e6.opt_len+3+7)>>>3;e1=(e6.static_len+3+7)>>>3;if(e1<=e2){e2=e1}}else{e2=e1=e5+5}if((e5+4<=e2)&&(e3!==-1)){ex(e6,e3,e5,e7)}else{if(e6.strategy===ey||e1===e2){eN(e6,(eS<<1)+(e7?1:0),3);eU(e6,eu,eG)}else{eN(e6,(er<<1)+(e7?1:0),3);ew(e6,e6.l_desc.max_code+1,e6.d_desc.max_code+1,e4+1);eU(e6,e6.dyn_ltree,e6.dyn_dtree)}}eq(e6);if(e7){d2(e6)}}function eT(e1,e3,e2){e1.pending_buf[e1.d_buf+e1.last_lit*2]=(e3>>>8)&255;e1.pending_buf[e1.d_buf+e1.last_lit*2+1]=e3&255;e1.pending_buf[e1.l_buf+e1.last_lit]=e2&255;e1.last_lit++;if(e3===0){e1.dyn_ltree[e2*2]++}else{e1.matches++;e3--;e1.dyn_ltree[(eg[e2]+dW+1)*2]++;e1.dyn_dtree[eH(e3)*2]++}return(e1.last_lit===e1.lit_bufsize-1)}eQ._tr_init=ep;eQ._tr_stored_block=ex;eQ._tr_flush_block=d5;eQ._tr_tally=eT;eQ._tr_align=eI},{\"../utils/common\":3}],15:[function(dU,dV,dT){function dW(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=\"\";this.state=null;this.data_type=2;this.adler=0}dV.exports=dW},{}],\"/\":[function(dV,dY,dU){var dT=dV(\"./lib/utils/common\").assign;var dX=dV(\"./lib/deflate\");var dW=dV(\"./lib/zlib/constants\");var dZ={};dT(dZ,dX,dW);dY.exports=dZ},{\"./lib/deflate\":1,\"./lib/inflate\":2,\"./lib/utils/common\":3,\"./lib/zlib/constants\":6}]},{},[])(\"/\")});function dO(dT,dS,dV,dU){return function(){dT.call(dS,dV,dU)}}function dQ(){if(!dR.async&&dR.useDefer&&!dN){var dS=new Date()-dL();if(dS>dR.threshold){return true}}return false}function dJ(dS){dN=true;setTimeout(function(){dN=false;dK();dS()},dR.defer);return true}pako.Deflate.prototype.onData=function(dS){dG.handler.apply(dG,[dS,this.strm.avail_out===0?false:true])};pako.Deflate.prototype.onEnd=function(dS){};this.options=dR;var dP=null;var dN=false;function dL(){return dP||(dP=new Date())}function dK(){return dP=null}}dG.prototype.deflate=function(dJ,dK){return pako.deflateRaw(dJ,dK)};dG.prototype.onEnd=function(){pako.onEnd.apply(this,arguments)};dG.prototype.process=function(dJ){dG.handler=dJ;if(!this.options.useBinary){this.options.to=\"string\"}pako.deflateRaw(this.options.text,this.options)};if(dH&&dH.options){if(!dH.deflate){dH.options.async=true;dH.options.useDefer=false;dH.deflate=new dG(self,dH.options)}dH.deflate.process(function(){postMessage({args:Array.prototype.slice.call(arguments),url:self.location&&self.location.href})})}return dG}", "static transient final private protected public internal function m39() {}", "function StupidBug() {}", "transient final private public function m168() {}", "function _G() {}", "function _G() {}", "function Mv(){var t=this;ci()(this,{$source:{enumerable:!0,get:function(){return t.$olObject}},$map:{enumerable:!0,get:function(){return t.$services&&uu()(t.$services)}},$view:{enumerable:!0,get:function(){return t.$services&&t.$services.view}},$sourceContainer:{enumerable:!0,get:function(){return t.$services&&t.$services.sourceContainer}}})}", "static transient final private protected public function m38() {}", "function o0(e,o1,buffer) {\n try {\n\"use asm\";\n}catch(e){}\n function o7(o2,o3) {\n try {\nset.o27 = +o2;\n}catch(e){}\n try {\no384 = +o28;\n}catch(e){}\n try {\nreturn o1083 = o1062;\n}catch(e){}\n }\n \n function o4(o2,o3){\n try {\no4212]o4.o6(function() { try {\nObject.defineProperty(o3, key, { value: 'something', enumerable: true });\n}catch(e){} }, \"Object.defineProperty uses ToPropertyKey. Property is added to the object\")] = 2;\n}catch(e){}\n try {\no39.o38(o34);\n}catch(e){}\n var o673 = o215(1, \"i32*\", o212);\n var o1103 = 0;\n try {\no5 = +o7[this.o565[o810]](o2,o3);\n}catch(e){}\n try {\nreturn +o5;\n}catch(e){}\n }\n \n var o7 = [add,add,add,add];\n \n \n try {\nreturn o4.o10;\n}catch(e){}\n}", "function i(e){var t=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),n=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),r=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),i=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),a=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),s=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),c=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),d=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),f=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),m=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),v=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),y=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),g=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),_=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),b=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),w=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),T=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),E=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),S=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),x=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),k=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),C=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),A=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),N=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),I=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x);(0,o.default)(e,{0:t,NetworkOrCORSError:t,400:n,BadRequest:n,401:r,Unauthorized:r,402:i,PaymentRequired:i,403:a,Forbidden:a,404:s,NotFound:s,405:c,MethodNotAllowed:c,406:d,NotAcceptable:d,407:f,ProxyAuthenticationRequired:f,408:m,RequestTimeout:m,409:v,Conflict:v,410:y,Gone:y,411:g,LengthRequired:g,412:_,PreconditionFailed:_,413:b,RequestEntityTooLarge:b,414:w,RequestUriTooLong:w,415:T,UnsupportedMediaType:T,416:E,RequestRangeNotSatisfiable:E,417:S,ExpectationFailed:S,500:x,InternalServerError:x,501:k,NotImplemented:k,502:C,BadGateway:C,503:A,ServiceUnavailable:A,504:N,GatewayTimeout:N,505:I,HttpVersionNotSupported:I,select:function(t){if(void 0===t||null===t)return e;t=t.statusCode||t;var n=e[t];return n||(t=t.toString().split(\"\").shift()+\"00\",t=parseInt(t,10),e[t]||e)}})}", "function i(e){return void 0===e&&(e=null),Object(r[\"m\"])(null!==e?e:o)}", "function i(e){return void 0===e&&(e=null),Object(r[\"m\"])(null!==e?e:o)}", "function WMCache(param, // @arg Object - { name, deny, allow, limit, garbage }\n callback, // @arg Function - cache ready callback(cache:WMCache, backend:StorageString):void\n errCallback) { // @arg Function - error callback(err:Error):void\n // @param.name String = \"void\" - application name\n // @param.deny URLStringArray = [] - deny URL pattern\n // @param.allow URLStringArray = [] - allow URL pattern\n // @param.garbage URLStringArray = [] - garbage URL pattern\n // @param.limit Integer = 0 - cache limit (unit MB)\n param = param || {};\n\n//{@dev\n $valid($type(param, \"Object\"), WMCache, \"param\");\n $valid($type(callback, \"Function\"), WMCache, \"callback\");\n $valid($type(errCallback, \"Function\"), WMCache, \"errCallback\");\n $valid($keys(param, \"name|deny|allow|garbage|limit\"), WMCache, \"param\");\n $valid($type(param.name, \"String|omit\"), WMCache, \"param.name\");\n $valid($type(param.deny, \"URLStringArray|omit\"), WMCache, \"param.deny\");\n $valid($type(param.allow, \"URLStringArray|omit\"), WMCache, \"param.allow\");\n $valid($type(param.garbage, \"URLStringArray|omit\"), WMCache, \"param.garbage\");\n $valid($type(param.limit, \"Integer|omit\"), WMCache, \"param.limit\");\n//}@dev\n\n var that = this;\n var name = param[\"name\"] || \"void\";\n var deny = param[\"deny\"] || [];\n var allow = param[\"allow\"] || [];\n var garbage = param[\"garbage\"] || [];\n\n this._limit = (param[\"limit\"] || 0) * 1024 * 1024; // to MB\n this._errCallback = errCallback;\n this._control = new WMCacheControl(allow, deny, garbage);\n this._storage = FS[\"ready\"] ? new FS(name, _ready, errCallback) :\n DB[\"ready\"] ? new DB(name, _ready, errCallback) :\n new BH(name, _ready, errCallback);\n function _ready() {\n callback(that);\n }\n}", "obtain(){}", "function al(df){var de,dd;if(df){de=self;de.options=dd=df.data;de.WRCt=de.WRCt||dc}function dc(dj,dp){(function(dr){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=dr()}else{if(typeof pakoDefine===\"function\"&&pakoDefine.amd){pakoDefine([],dr)}else{var dq;if(typeof window!==\"undefined\"){dq=window}else{if(typeof dj!==\"undefined\"){dq=dj}else{if(typeof self!==\"undefined\"){dq=self}else{dq=this}}}dq.pako=dr()}}})(function(){var dt,dr,dq;return(function ds(dv,dz,dx){function dw(dE,dC){if(!dz[dE]){if(!dv[dE]){var dB=typeof require==\"function\"&&require;if(!dC&&dB){return dB(dE,!0)}if(du){return du(dE,!0)}var dD=new Error(\"Cannot find module '\"+dE+\"'\");throw dD.code=\"MODULE_NOT_FOUND\",dD}var dA=dz[dE]={exports:{}};dv[dE][0].call(dA.exports,function(dF){var dG=dv[dE][1][dF];return dw(dG?dG:dF)},dA,dA.exports,ds,dv,dz,dx)}return dz[dE].exports}var du=typeof require==\"function\"&&require;for(var dy=0;dy<dx.length;dy++){dw(dx[dy])}return dw})({1:[function(dD,dv,dP){var dI=dD(\"./zlib/deflate.js\");var dO=dD(\"./utils/common\");var dz=dD(\"./utils/strings\");var dB=dD(\"./zlib/messages\");var dN=dD(\"./zlib/zstream\");var dK=Object.prototype.toString;var dJ=0;var dR=4;var dA=0;var dF=1;var dw=-1;var dx=0;var dG=8;var dQ=function(dT){this.options=dO.assign({level:dw,method:dG,chunkSize:16384,windowBits:15,memLevel:8,strategy:dx,to:\"\"},dT||{});var dU=this.options;if(dU.raw&&(dU.windowBits>0)){dU.windowBits=-dU.windowBits}else{if(dU.gzip&&(dU.windowBits>0)&&(dU.windowBits<16)){dU.windowBits+=16}}this.err=0;this.msg=\"\";this.ended=false;this.chunks=[];this.strm=new dN();this.strm.avail_out=0;var dS=dI.deflateInit2(this.strm,dU.level,dU.method,dU.windowBits,dU.memLevel,dU.strategy);if(dS!==dA){throw new Error(dB[dS])}if(dU.header){dI.deflateSetHeader(this.strm,dU.header)}};dQ.prototype.pushSingleChunk=function(dV,dW){var dT=this.strm;var dX=this.options.chunkSize;var dS,dU;if(this.ended){return false}dU=(dW===~~dW)?dW:((dW===true)?dR:dJ);if(typeof dV===\"string\"){dT.input=dz.string2buf(dV)}else{if(dK.call(dV)===\"[object ArrayBuffer]\"){dT.input=new Uint8Array(dV)}else{dT.input=dV}}dT.next_in=0;dT.avail_in=dT.input.length;dy.call(this,dU);if(dk){return}if(dU===dR){dS=dI.deflateEnd(this.strm);this.onEnd(dS);this.ended=true;return dS===dA}return true};function dC(dS){return dS<26?dS+65:dS<52?dS+71:dS<62?dS-4:dS===62?43:dS===63?47:65}function dH(dS){var dT=dj.btoa(String.fromCharCode.apply(null,dS));return dT}function dM(dX){var dT,dW=\"\";if(dj.btoa){return dH(dX)}for(var dV=dX.length,dS=0,dU=0;dU<dV;dU++){dT=dU%3;dS|=dX[dU]<<(16>>>dT&24);if(dT===2||dX.length-dU===1){dW+=String.fromCharCode(dC(dS>>>18&63),dC(dS>>>12&63),dC(dS>>>6&63),dC(dS&63));dS=0}}return dW.replace(/A(?=A$|$)/g,\"=\")}function dy(dX){di();var dV;var dU=this.strm;var dY=this.options.chunkSize;var dT,dW,dS;du.call(this,dU,dW);if(dk){return}if(this.ended){return false}dW=(dX===~~dX)?dX:((dX===true)?dR:dJ);if(dU.avail_out===0){dU.output=new dO.Buf8(dY);dU.next_out=0;dU.avail_out=dY;if(dn()){dV=dl(dy,this,dW,null);dg(dV);return}}dT=dI.deflate(dU,dW);if(dT===\"defer\"){dV=dl(dy,this,dW,null);dg(dV);return}if(dn()){dV=dl(dy,this,dW,null);dg(dV);return}if(dT!==dF&&dT!==dA){this.onEnd(dT);this.ended=true;return false}du.call(this,dU,dW);if((dU.avail_in>0||dU.avail_out===0)&&dT!==dF){if(dU.avail_out===0){dU.output=new dO.Buf8(dY);dU.next_out=0;dU.avail_out=dY}dy.call(this,dW)}}function du(dT,dV){if(dT.output&&(dT.avail_out===0||(dT.avail_in===0&&dV===dR))){if(this.options.to===\"string\"){var dS=dM(dO.shrinkBuf(dT.output,dT.next_out));this.onData(dS)}else{this.onData(dO.shrinkBuf(dT.output,dT.next_out))}if(dn()){var dU=dl(dy,this,dV,null);dg(dU);return}}}dQ.prototype.push=function(dW,dX){var dU=this.strm;var dY=this.options.chunkSize;var dT,dV,dS;if(this.ended){return false}dV=(dX===~~dX)?dX:((dX===true)?dR:dJ);if(typeof dW===\"string\"){dU.input=dz.string2buf(dW)}else{if(dK.call(dW)===\"[object ArrayBuffer]\"){dU.input=new Uint8Array(dW)}else{dU.input=dW}}dU.next_in=0;dU.avail_in=dU.input.length;do{if(dU.avail_out===0){dU.output=new dO.Buf8(dY);dU.next_out=0;dU.avail_out=dY}dT=dI.deflate(dU,dV);if(dT!==dF&&dT!==dA){this.onEnd(dT);this.ended=true;return false}if(dU.avail_out===0|0|(dU.avail_in===0&&dV===dR)){if(this.options.to===\"string\"){dS=dM(dO.shrinkBuf(dU.output,dU.next_out));this.onData(dS)}else{this.onData(dO.shrinkBuf(dU.output,dU.next_out))}}}while((dU.avail_in>0||dU.avail_out===0)&&dT!==dF);if(dV===dR){dT=dI.deflateEnd(this.strm);this.onEnd(dT);this.ended=true;dj.options=undefined;dj.deflate=undefined;return dT===dA}return true};dQ.prototype.onData=function(dS){this.chunks.push(dS)};dQ.prototype.onEnd=function(dS){if(dS===dA){if(this.options.to===\"string\"){this.result=this.chunks.join(\"\")}else{this.result=dO.flattenChunks(this.chunks)}}this.chunks=[];this.err=dS;this.msg=this.strm.msg};function dE(dS,dT){var dU;if(!dT.level){dT.level=dw}dU=new dQ(dT);(!dT.async&&dT.useDefer)?dU.pushSingleChunk(dS,true):dU.push(dS,true);if(dU.err){throw dU.msg}return dU.result}function dL(dS,dT){dT=dT||{};dT.raw=true;return dE(dS,dT)}dP.Deflate=dQ;dP.deflate=dE;dP.deflateRaw=dL},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/deflate.js\":8,\"./zlib/messages\":13,\"./zlib/zstream\":15}],2:[function(dv,dw,du){},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/constants\":6,\"./zlib/gzheader\":9,\"./zlib/inflate.js\":11,\"./zlib/messages\":13,\"./zlib/zstream\":15}],3:[function(dv,dw,du){var dz=(typeof Uint8Array!==\"undefined\")&&(typeof Uint16Array!==\"undefined\")&&(typeof Int32Array!==\"undefined\");du.assign=function(dD){var dA=Array.prototype.slice.call(arguments,1);while(dA.length){var dB=dA.shift();if(!dB){continue}if(typeof(dB)!==\"object\"){throw new TypeError(dB+\"must be non-object\")}for(var dC in dB){if(dB.hasOwnProperty(dC)){dD[dC]=dB[dC]}}}return dD};du.shrinkBuf=function(dA,dB){if(dA.length===dB){return dA}if(dA.subarray){return dA.subarray(0,dB)}dA.length=dB;return dA};var dx={arraySet:function(dB,dD,dF,dA,dE){if(dD.subarray&&dB.subarray){dB.set(dD.subarray(dF,dF+dA),dE);return}for(var dC=0;dC<dA;dC++){dB[dE+dC]=dD[dF+dC]}},flattenChunks:function(dG){var dE,dC,dB,dF,dD,dA;dB=0;for(dE=0,dC=dG.length;dE<dC;dE++){dB+=dG[dE].length}dA=new Uint8Array(dB);dF=0;for(dE=0,dC=dG.length;dE<dC;dE++){dD=dG[dE];dA.set(dD,dF);dF+=dD.length}return dA}};var dy={arraySet:function(dB,dD,dF,dA,dE){for(var dC=0;dC<dA;dC++){dB[dE+dC]=dD[dF+dC]}},flattenChunks:function(dA){return[].concat.apply([],dA)}};du.setTyped=function(dA){if(dA&&(dp.useBinary||dj.btoa)){du.Buf8=Uint8Array;du.Buf16=Uint16Array;du.Buf32=Int32Array;du.assign(du,dx)}else{du.Buf8=Array;du.Buf16=Array;du.Buf32=Array;du.assign(du,dy)}};du.setTyped(dz)},{}],4:[function(dw,du,dx){var dD=dw(\"./common\");var dB=true;var dz=true;try{String.fromCharCode.apply(null,[0])}catch(dC){dB=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(dC){dz=false}var dv=new dD.Buf8(256);for(var dy=0;dy<256;dy++){dv[dy]=(dy>=252?6:dy>=248?5:dy>=240?4:dy>=224?3:dy>=192?2:1)}dv[254]=dv[254]=1;dx.string2buf=function(dK){var dE,dL,dG,dH,dF,dJ=dK.length,dI=0;for(dH=0;dH<dJ;dH++){dL=dK.charCodeAt(dH);if((dL&64512)===55296&&(dH+1<dJ)){dG=dK.charCodeAt(dH+1);if((dG&64512)===56320){dL=65536+((dL-55296)<<10)+(dG-56320);dH++}}dI+=dL<128?1:dL<2048?2:dL<65536?3:4}dE=new dD.Buf8(dI);for(dF=0,dH=0;dF<dI;dH++){dL=dK.charCodeAt(dH);if((dL&64512)===55296&&(dH+1<dJ)){dG=dK.charCodeAt(dH+1);if((dG&64512)===56320){dL=65536+((dL-55296)<<10)+(dG-56320);dH++}}if(dL<128){dE[dF++]=dL}else{if(dL<2048){dE[dF++]=192|(dL>>>6);dE[dF++]=128|(dL&63)}else{if(dL<65536){dE[dF++]=224|(dL>>>12);dE[dF++]=128|(dL>>>6&63);dE[dF++]=128|(dL&63)}else{dE[dF++]=240|(dL>>>18);dE[dF++]=128|(dL>>>12&63);dE[dF++]=128|(dL>>>6&63);dE[dF++]=128|(dL&63)}}}}return dE};function dA(dG,dF){if(dF<65537){if((dG.subarray&&dz)||(!dG.subarray&&dB)){return String.fromCharCode.apply(null,dD.shrinkBuf(dG,dF))}}var dE=\"\";for(var dH=0;dH<dF;dH++){dE+=String.fromCharCode(dG[dH])}return dE}dx.buf2binstring=function(dE){return dA(dE,dE.length)};dx.binstring2buf=function(dH){var dF=new dD.Buf8(dH.length);for(var dG=0,dE=dF.length;dG<dE;dG++){dF[dG]=dH.charCodeAt(dG)}return dF};dx.buf2string=function(dJ,dG){var dK,dI,dL,dH;var dF=dG||dJ.length;var dE=new Array(dF*2);for(dI=0,dK=0;dK<dF;){dL=dJ[dK++];if(dL<128){dE[dI++]=dL;continue}dH=dv[dL];if(dH>4){dE[dI++]=65533;dK+=dH-1;continue}dL&=dH===2?31:dH===3?15:7;while(dH>1&&dK<dF){dL=(dL<<6)|(dJ[dK++]&63);dH--}if(dH>1){dE[dI++]=65533;continue}if(dL<65536){dE[dI++]=dL}else{dL-=65536;dE[dI++]=55296|((dL>>10)&1023);dE[dI++]=56320|(dL&1023)}}return dA(dE,dI)};dx.utf8border=function(dF,dE){var dG;dE=dE||dF.length;if(dE>dF.length){dE=dF.length}dG=dE-1;while(dG>=0&&(dF[dG]&192)===128){dG--}if(dG<0){return dE}if(dG===0){return dE}return(dG+dv[dF[dG]]>dE)?dG:dE}},{\"./common\":3}],5:[function(dv,dw,du){},{}],6:[function(dv,dw,du){dw.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(dv,dw,du){},{}],8:[function(ez,eN,d4){var eb=ez(\"../utils/common\");var eL=ez(\"./trees\");var d3=ez(\"./adler32\");var ei=ez(\"./crc32\");var dY=ez(\"./messages\");var d6=0;var eh=1;var eD=3;var dE=4;var ec=5;var dK=0;var dP=1;var eA=-2;var dO=-3;var dy=-5;var dA=-1;var d7=1;var dW=2;var dS=3;var dL=4;var eE=0;var d2=2;var eg=8;var eF=9;var d9=15;var dG=8;var ev=29;var eJ=256;var eM=eJ+1+ev;var dV=30;var eq=19;var ex=2*eM+1;var ea=15;var d0=3;var eB=258;var dw=(eB+d0+1);var dC=32;var ee=42;var dI=69;var ej=73;var ew=91;var dJ=103;var eQ=113;var dU=666;var ey=1;var dM=2;var ed=3;var dx=4;var eC=3;function er(eR,eS){eR.msg=dY[eS];return eS}function d8(eR){return((eR)<<1)-((eR)>4?9:0)}function eI(eS){var eR=eS.length;while(--eR>=0){eS[eR]=0}}function dz(eS){var eT=eS.state;var eR=eT.pending;if(eR>eS.avail_out){eR=eS.avail_out}if(eR===0){return}eb.arraySet(eS.output,eT.pending_buf,eT.pending_out,eR,eS.next_out);eS.next_out+=eR;eT.pending_out+=eR;eS.total_out+=eR;eS.avail_out-=eR;eT.pending-=eR;if(eT.pending===0){eT.pending_out=0}}function dD(eR,eS){eL._tr_flush_block(eR,(eR.block_start>=0?eR.block_start:-1),eR.strstart-eR.block_start,eS);eR.block_start=eR.strstart;dz(eR.strm)}function dv(eS,eR){eS.pending_buf[eS.pending++]=eR}function dT(eS,eR){eS.pending_buf[eS.pending++]=(eR>>>8)&255;eS.pending_buf[eS.pending++]=eR&255}function dX(eS,eT,eV,eU){var eR=eS.avail_in;if(eR>eU){eR=eU}if(eR===0){return 0}eS.avail_in-=eR;eb.arraySet(eT,eS.input,eS.next_in,eR,eV);if(eS.state.wrap===1){eS.adler=d3(eS.adler,eT,eR,eV)}else{if(eS.state.wrap===2){eS.adler=ei(eS.adler,eT,eR,eV)}}eS.next_in+=eR;eS.total_in+=eR;return eR}function eH(e4,eV){var eY=e4.max_chain_length;var e5=e4.strstart;var eW;var eX;var eR=e4.prev_length;var eS=e4.nice_match;var eU=(e4.strstart>(e4.w_size-dw))?e4.strstart-(e4.w_size-dw):0;var e2=e4.window;var eZ=e4.w_mask;var eT=e4.prev;var e1=e4.strstart+eB;var e3=e2[e5+eR-1];var e0=e2[e5+eR];if(e4.prev_length>=e4.good_match){eY>>=2}if(eS>e4.lookahead){eS=e4.lookahead}do{eW=eV;if(e2[eW+eR]!==e0||e2[eW+eR-1]!==e3||e2[eW]!==e2[e5]||e2[++eW]!==e2[e5+1]){continue}e5+=2;eW++;do{}while(e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e2[++e5]===e2[++eW]&&e5<e1);eX=eB-(e1-e5);e5=e1-eB;if(eX>eR){e4.match_start=eV;eR=eX;if(eX>=eS){break}e3=e2[e5+eR-1];e0=e2[e5+eR]}}while((eV=eT[eV&eZ])>eU&&--eY!==0);if(eR<=e4.lookahead){return eR}return e4.lookahead}function eu(eT){var eX=eT.w_size;var eU,eW,eR,eS,eV;do{eS=eT.window_size-eT.lookahead-eT.strstart;if(eT.strstart>=eX+(eX-dw)){eb.arraySet(eT.window,eT.window,eX,eX,0);eT.match_start-=eX;eT.strstart-=eX;eT.block_start-=eX;eW=eT.hash_size;eU=eW;do{eR=eT.head[--eU];eT.head[eU]=(eR>=eX?eR-eX:0)}while(--eW);eW=eX;eU=eW;do{eR=eT.prev[--eU];eT.prev[eU]=(eR>=eX?eR-eX:0)}while(--eW);eS+=eX}if(eT.strm.avail_in===0){break}eW=dX(eT.strm,eT.window,eT.strstart+eT.lookahead,eS);eT.lookahead+=eW;if(eT.lookahead+eT.insert>=d0){eV=eT.strstart-eT.insert;eT.ins_h=eT.window[eV];eT.ins_h=((eT.ins_h<<eT.hash_shift)^eT.window[eV+1])&eT.hash_mask;while(eT.insert){eT.ins_h=((eT.ins_h<<eT.hash_shift)^eT.window[eV+d0-1])&eT.hash_mask;eT.prev[eV&eT.w_mask]=eT.head[eT.ins_h];eT.head[eT.ins_h]=eV;eV++;eT.insert--;if(eT.lookahead+eT.insert<d0){break}}}}while(eT.lookahead<dw&&eT.strm.avail_in!==0)}function d5(eU,eR){var eT=65535;if(eT>eU.pending_buf_size-5){eT=eU.pending_buf_size-5}for(;;){if(eU.lookahead<=1){eu(eU);if(eU.lookahead===0&&eR===d6){return ey}if(eU.lookahead===0){break}}eU.strstart+=eU.lookahead;eU.lookahead=0;var eS=eU.block_start+eT;if(eU.strstart===0||eU.strstart>=eS){eU.lookahead=eU.strstart-eS;eU.strstart=eS;dD(eU,false);if(eU.strm.avail_out===0){return ey}}if(eU.strstart-eU.block_start>=(eU.w_size-dw)){dD(eU,false);if(eU.strm.avail_out===0){return ey}}}eU.insert=0;if(eR===dE){dD(eU,true);if(eU.strm.avail_out===0){return ed}return dx}if(eU.strstart>eU.block_start){dD(eU,false);if(eU.strm.avail_out===0){return ey}}return ey}function dF(eT,eR){var eU;var eS;for(;;){if(eT.lookahead<dw){eu(eT);if(eT.lookahead<dw&&eR===d6){return ey}if(eT.lookahead===0){break}}eU=0;if(eT.lookahead>=d0){eT.ins_h=((eT.ins_h<<eT.hash_shift)^eT.window[eT.strstart+d0-1])&eT.hash_mask;eU=eT.prev[eT.strstart&eT.w_mask]=eT.head[eT.ins_h];eT.head[eT.ins_h]=eT.strstart}if(eU!==0&&((eT.strstart-eU)<=(eT.w_size-dw))){eT.match_length=eH(eT,eU)}if(eT.match_length>=d0){eS=eL._tr_tally(eT,eT.strstart-eT.match_start,eT.match_length-d0);eT.lookahead-=eT.match_length;if(eT.match_length<=eT.max_lazy_match&&eT.lookahead>=d0){eT.match_length--;do{eT.strstart++;eT.ins_h=((eT.ins_h<<eT.hash_shift)^eT.window[eT.strstart+d0-1])&eT.hash_mask;eU=eT.prev[eT.strstart&eT.w_mask]=eT.head[eT.ins_h];eT.head[eT.ins_h]=eT.strstart}while(--eT.match_length!==0);eT.strstart++}else{eT.strstart+=eT.match_length;eT.match_length=0;eT.ins_h=eT.window[eT.strstart];eT.ins_h=((eT.ins_h<<eT.hash_shift)^eT.window[eT.strstart+1])&eT.hash_mask}}else{eS=eL._tr_tally(eT,0,eT.window[eT.strstart]);eT.lookahead--;eT.strstart++}if(eS){dD(eT,false);if(eT.strm.avail_out===0){return ey}}}eT.insert=((eT.strstart<(d0-1))?eT.strstart:d0-1);if(eR===dE){dD(eT,true);if(eT.strm.avail_out===0){return ed}return dx}if(eT.last_lit){dD(eT,false);if(eT.strm.avail_out===0){return ey}}return dM}function es(eU,eS){var eV;var eT;var eR;for(;;){if(eU.lookahead<dw){eu(eU);if(eU.lookahead<dw&&eS===d6){return ey}if(eU.lookahead===0){break}}eV=0;if(eU.lookahead>=d0){eU.ins_h=((eU.ins_h<<eU.hash_shift)^eU.window[eU.strstart+d0-1])&eU.hash_mask;eV=eU.prev[eU.strstart&eU.w_mask]=eU.head[eU.ins_h];eU.head[eU.ins_h]=eU.strstart}eU.prev_length=eU.match_length;eU.prev_match=eU.match_start;eU.match_length=d0-1;if(eV!==0&&eU.prev_length<eU.max_lazy_match&&eU.strstart-eV<=(eU.w_size-dw)){eU.match_length=eH(eU,eV);if(eU.match_length<=5&&(eU.strategy===d7||(eU.match_length===d0&&eU.strstart-eU.match_start>4096))){eU.match_length=d0-1}}if(eU.prev_length>=d0&&eU.match_length<=eU.prev_length){eR=eU.strstart+eU.lookahead-d0;eT=eL._tr_tally(eU,eU.strstart-1-eU.prev_match,eU.prev_length-d0);eU.lookahead-=eU.prev_length-1;eU.prev_length-=2;do{if(++eU.strstart<=eR){eU.ins_h=((eU.ins_h<<eU.hash_shift)^eU.window[eU.strstart+d0-1])&eU.hash_mask;eV=eU.prev[eU.strstart&eU.w_mask]=eU.head[eU.ins_h];eU.head[eU.ins_h]=eU.strstart}}while(--eU.prev_length!==0);eU.match_available=0;eU.match_length=d0-1;eU.strstart++;if(eT){dD(eU,false);if(eU.strm.avail_out===0){return ey}}}else{if(eU.match_available){eT=eL._tr_tally(eU,0,eU.window[eU.strstart-1]);if(eT){dD(eU,false)}eU.strstart++;eU.lookahead--;if(eU.strm.avail_out===0){return ey}}else{eU.match_available=1;eU.strstart++;eU.lookahead--}}}if(eU.match_available){eT=eL._tr_tally(eU,0,eU.window[eU.strstart-1]);eU.match_available=0}eU.insert=eU.strstart<d0-1?eU.strstart:d0-1;if(eS===dE){dD(eU,true);if(eU.strm.avail_out===0){return ed}return dx}if(eU.last_lit){dD(eU,false);if(eU.strm.avail_out===0){return ey}}return dM}function eo(eV,eS){var eU;var eW;var eT,eR;var eX=eV.window;for(;;){if(eV.lookahead<=eB){eu(eV);if(eV.lookahead<=eB&&eS===d6){return ey}if(eV.lookahead===0){break}}eV.match_length=0;if(eV.lookahead>=d0&&eV.strstart>0){eT=eV.strstart-1;eW=eX[eT];if(eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]){eR=eV.strstart+eB;do{}while(eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eW===eX[++eT]&&eT<eR);eV.match_length=eB-(eR-eT);if(eV.match_length>eV.lookahead){eV.match_length=eV.lookahead}}}if(eV.match_length>=d0){eU=eL._tr_tally(eV,1,eV.match_length-d0);eV.lookahead-=eV.match_length;eV.strstart+=eV.match_length;eV.match_length=0}else{eU=eL._tr_tally(eV,0,eV.window[eV.strstart]);eV.lookahead--;eV.strstart++}if(eU){dD(eV,false);if(eV.strm.avail_out===0){return ey}}}eV.insert=0;if(eS===dE){dD(eV,true);if(eV.strm.avail_out===0){return ed}return dx}if(eV.last_lit){dD(eV,false);if(eV.strm.avail_out===0){return ey}}return dM}function ep(eT,eR){var eS;for(;;){if(eT.lookahead===0){eu(eT);if(eT.lookahead===0){if(eR===d6){return ey}break}}eT.match_length=0;eS=eL._tr_tally(eT,0,eT.window[eT.strstart]);eT.lookahead--;eT.strstart++;if(eS){dD(eT,false);if(eT.strm.avail_out===0){return ey}}}eT.insert=0;if(eR===dE){dD(eT,true);if(eT.strm.avail_out===0){return ed}return dx}if(eT.last_lit){dD(eT,false);if(eT.strm.avail_out===0){return ey}}return dM}var em=function(eR,eV,eS,eU,eT){this.good_length=eR;this.max_lazy=eV;this.nice_length=eS;this.max_chain=eU;this.func=eT};var el;el=[new em(0,0,0,0,d5),new em(4,4,8,4,dF),new em(4,5,16,8,dF),new em(4,6,32,32,dF),new em(4,4,16,16,es),new em(8,16,32,32,es),new em(8,16,128,128,es),new em(8,32,128,256,es),new em(32,128,258,1024,es),new em(32,258,258,4096,es)];function d1(eR){eR.window_size=2*eR.w_size;eI(eR.head);eR.max_lazy_match=el[eR.level].max_lazy;eR.good_match=el[eR.level].good_length;eR.nice_match=el[eR.level].nice_length;eR.max_chain_length=el[eR.level].max_chain;eR.strstart=0;eR.block_start=0;eR.lookahead=0;eR.insert=0;eR.match_length=eR.prev_length=d0-1;eR.match_available=0;eR.ins_h=0}function du(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=eg;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new eb.Buf16(ex*2);this.dyn_dtree=new eb.Buf16((2*dV+1)*2);this.bl_tree=new eb.Buf16((2*eq+1)*2);eI(this.dyn_ltree);eI(this.dyn_dtree);eI(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new eb.Buf16(ea+1);this.heap=new eb.Buf16(2*eM+1);eI(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new eb.Buf16(2*eM+1);eI(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function et(eR){var eS;if(!eR||!eR.state){return er(eR,eA)}eR.total_in=eR.total_out=0;eR.data_type=d2;eS=eR.state;eS.pending=0;eS.pending_out=0;if(eS.wrap<0){eS.wrap=-eS.wrap}eS.status=(eS.wrap?ee:eQ);eR.adler=(eS.wrap===2)?0:1;eS.last_flush=d6;eL._tr_init(eS);return dK}function dQ(eR){var eS=et(eR);if(eS===dK){d1(eR.state)}return eS}function eP(eR,eS){if(!eR||!eR.state){return eA}if(eR.state.wrap!==2){return eA}eR.state.gzhead=eS;return dK}function dZ(eR,eY,eX,eU,eW,eV){if(!eR){return eA}var eT=1;if(eY===dA){eY=6}if(eU<0){eT=0;eU=-eU}else{if(eU>15){eT=2;eU-=16}}if(eW<1||eW>eF||eX!==eg||eU<8||eU>15||eY<0||eY>9||eV<0||eV>dL){return er(eR,eA)}if(eU===8){eU=9}var eS=new du();eR.state=eS;eS.strm=eR;eS.wrap=eT;eS.gzhead=null;eS.w_bits=eU;eS.w_size=1<<eS.w_bits;eS.w_mask=eS.w_size-1;eS.hash_bits=eW+7;eS.hash_size=1<<eS.hash_bits;eS.hash_mask=eS.hash_size-1;eS.hash_shift=~~((eS.hash_bits+d0-1)/d0);eS.window=new eb.Buf8(eS.w_size*2);eS.head=new eb.Buf16(eS.hash_size);eS.prev=new eb.Buf16(eS.w_size);eS.lit_bufsize=1<<(eW+6);eS.pending_buf_size=eS.lit_bufsize*4;eS.pending_buf=new eb.Buf8(eS.pending_buf_size);eS.d_buf=eS.lit_bufsize>>1;eS.l_buf=(1+2)*eS.lit_bufsize;eS.level=eY;eS.strategy=eV;eS.method=eX;return dQ(eR)}function ef(eR,eS){return dZ(eR,eS,eg,d9,dG,eE)}function dH(eW,eX,eY){var eV,eZ,eU,eR;var eT,eS;di();if(!eW||!eW.state||eX>ec||eX<0){return eW?er(eW,eA):eA}eZ=eW.state;if(!eW.output||(!eW.input&&eW.avail_in!==0)||(eZ.status===dU&&eX!==dE)){return er(eW,(eW.avail_out===0)?dy:eA)}eZ.strm=eW;eV=eZ.last_flush;eZ.last_flush=eX;if(eZ.status===ee){dR(eZ)}if(dn()){return\"defer\"}if(eZ.status===dI){eK(eZ,eW)}if(dn()){return\"defer\"}if(eZ.status===ej){dB(eZ,eW)}if(dn()){return\"defer\"}if(eZ.status===ew){ek(eZ,eW)}if(dn()){return\"defer\"}if(eZ.status===dJ){eO(eZ,eW)}if(dn()){return\"defer\"}if(!eZ.flushedPending){eR=en(eZ,eW,eX);if(typeof eR!==\"undefined\"){eZ.flushedPending=null;return eR}}if(eX!==dE){return dK}if(eZ.wrap<=0){return dP}if(dn()){return\"defer\"}eZ.flushedPending=null;dN(eZ);dz(eZ,eW);if(eZ.wrap>0){eZ.wrap=-eZ.wrap}return eZ.pending!==0?dK:dP}function dR(eS,eR){if(eS.wrap===2){eR.adler=0;dv(eS,31);dv(eS,139);dv(eS,8);if(!eS.gzhead){dv(eS,0);dv(eS,0);dv(eS,0);dv(eS,0);dv(eS,0);dv(eS,eS.level===9?2:(eS.strategy>=dW||eS.level<2?4:0));dv(eS,eC);eS.status=eQ}else{dv(eS,(eS.gzhead.text?1:0)+(eS.gzhead.hcrc?2:0)+(!eS.gzhead.extra?0:4)+(!eS.gzhead.name?0:8)+(!eS.gzhead.comment?0:16));dv(eS,eS.gzhead.time&255);dv(eS,(eS.gzhead.time>>8)&255);dv(eS,(eS.gzhead.time>>16)&255);dv(eS,(eS.gzhead.time>>24)&255);dv(eS,eS.level===9?2:(eS.strategy>=dW||eS.level<2?4:0));dv(eS,eS.gzhead.os&255);if(eS.gzhead.extra&&eS.gzhead.extra.length){dv(eS,eS.gzhead.extra.length&255);dv(eS,(eS.gzhead.extra.length>>8)&255)}if(eS.gzhead.hcrc){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending,0)}eS.gzindex=0;eS.status=dI}}else{var eU=(eg+((eS.w_bits-8)<<4))<<8;var eT=-1;if(eS.strategy>=dW||eS.level<2){eT=0}else{if(eS.level<6){eT=1}else{if(eS.level===6){eT=2}else{eT=3}}}eU|=(eT<<6);if(eS.strstart!==0){eU|=dC}eU+=31-(eU%31);eS.status=eQ;dT(eS,eU);if(eS.strstart!==0){dT(eS,eR.adler>>>16);dT(eS,eR.adler&65535)}eR.adler=1}}function eK(eS,eR){if(eS.gzhead.extra){beg=eS.pending;while(eS.gzindex<(eS.gzhead.extra.length&65535)){if(eS.pending===eS.pending_buf_size){if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}dz(eR);beg=eS.pending;if(eS.pending===eS.pending_buf_size){break}}dv(eS,eS.gzhead.extra[eS.gzindex]&255);eS.gzindex++}if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}if(eS.gzindex===eS.gzhead.extra.length){eS.gzindex=0;eS.status=ej}}else{eS.status=ej}}function dB(eS,eR){if(eS.gzhead.name){beg=eS.pending;do{if(eS.pending===eS.pending_buf_size){if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}dz(eR);beg=eS.pending;if(eS.pending===eS.pending_buf_size){val=1;break}}if(eS.gzindex<eS.gzhead.name.length){val=eS.gzhead.name.charCodeAt(eS.gzindex++)&255}else{val=0}dv(eS,val)}while(val!==0);if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}if(val===0){eS.gzindex=0;eS.status=ew}}else{eS.status=ew}}function ek(eS,eR){if(eS.gzhead.comment){beg=eS.pending;do{if(eS.pending===eS.pending_buf_size){if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}dz(eR);beg=eS.pending;if(eS.pending===eS.pending_buf_size){val=1;break}}if(eS.gzindex<eS.gzhead.comment.length){val=eS.gzhead.comment.charCodeAt(eS.gzindex++)&255}else{val=0}dv(eS,val)}while(val!==0);if(eS.gzhead.hcrc&&eS.pending>beg){eR.adler=ei(eR.adler,eS.pending_buf,eS.pending-beg,beg)}if(val===0){eS.status=dJ}}else{eS.status=dJ}}function eO(eS,eR){if(eS.gzhead.hcrc){if(eS.pending+2>eS.pending_buf_size){dz(eR)}if(eS.pending+2<=eS.pending_buf_size){dv(eS,eR.adler&255);dv(eS,(eR.adler>>8)&255);eR.adler=0;eS.status=eQ}}else{eS.status=eQ}}function en(eT,eS,eR){var eU=eT.last_flush;eT.flushedPending=true;if(eT.pending!==0){dz(eS);if(eS.avail_out===0){eT.last_flush=-1;return dK}}else{if(eS.avail_in===0&&d8(eR)<=d8(eU)&&eR!==dE){return er(eS,dy)}}if(eT.status===dU&&eS.avail_in!==0){return er(eS,dy)}if(eS.avail_in!==0||eT.lookahead!==0||(eR!==d6&&eT.status!==dU)){var eV=(eT.strategy===dW)?ep(eT,eR):(eT.strategy===dS?eo(eT,eR):el[eT.level].func(eT,eR));if(eV===ed||eV===dx){eT.status=dU}if(eV===ey||eV===ed){if(eS.avail_out===0){eT.last_flush=-1}return dK}if(eV===dM){if(eR===eh){eL._tr_align(eT)}else{if(eR!==ec){eL._tr_stored_block(eT,0,0,false);if(eR===eD){eI(eT.head);if(eT.lookahead===0){eT.strstart=0;eT.block_start=0;eT.insert=0}}}}dz(eS);if(eS.avail_out===0){eT.last_flush=-1;return dK}}}}function dN(eS,eR){if(eS.wrap===2){dv(eS,eR.adler&255);dv(eS,(eR.adler>>8)&255);dv(eS,(eR.adler>>16)&255);dv(eS,(eR.adler>>24)&255);dv(eS,eR.total_in&255);dv(eS,(eR.total_in>>8)&255);dv(eS,(eR.total_in>>16)&255);dv(eS,(eR.total_in>>24)&255)}else{dT(eS,eR.adler>>>16);dT(eS,eR.adler&65535)}}function eG(eS){var eR;if(!eS||!eS.state){return eA}eR=eS.state.status;if(eR!==ee&&eR!==dI&&eR!==ej&&eR!==ew&&eR!==dJ&&eR!==eQ&&eR!==dU){return er(eS,eA)}eS.state=null;return eR===eQ?er(eS,dO):dK}d4.deflateInit=ef;d4.deflateInit2=dZ;d4.deflateReset=dQ;d4.deflateResetKeep=et;d4.deflateSetHeader=eP;d4.deflate=dH;d4.deflateEnd=eG;d4.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./messages\":13,\"./trees\":14}],9:[function(dv,dw,du){function dx(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name=\"\";this.comment=\"\";this.hcrc=0;this.done=false}dw.exports=dx},{}],10:[function(dv,dw,du){},{}],11:[function(dv,dw,du){},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./inffast\":10,\"./inftrees\":12}],12:[function(dx,dv,dy){var dG=dx(\"../utils/common\");var dF=15;var dC=852;var dB=592;var dE=0;var dA=1;var dw=2;var dD=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var dH=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var dz=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var du=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]},{\"../utils/common\":3}],13:[function(dv,dw,du){},{}],14:[function(dC,dA,er){var eB=dC(\"../utils/common\");var d9=4;var dK=0;var dU=1;var dV=2;function du(eD){var eC=eD.length;while(--eC>=0){eD[eC]=0}}var ed=0;var et=1;var d2=2;var eA=3;var dW=258;var dH=29;var dx=256;var dy=dx+1+dH;var dv=30;var dN=19;var dz=2*dy+1;var ex=15;var dQ=16;var em=7;var dw=256;var dZ=16;var dY=17;var d3=18;var dB=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var dO=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var dT=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var eb=512;var d5=new Array((dy+2)*2);du(d5);var eh=new Array(dv*2);du(eh);var en=new Array(eb);du(en);var dR=new Array(dW-eA+1);du(dR);var d4=new Array(dH);du(d4);var ew=new Array(dv);du(ew);var ek=function(eF,eE,eD,eC,eG){this.static_tree=eF;this.extra_bits=eE;this.extra_base=eD;this.elems=eC;this.max_length=eG;this.has_stree=eF&&eF.length};var ep;var eg;var dP;var ez=function(eD,eC){this.dyn_tree=eD;this.max_code=0;this.stat_desc=eC};function ei(eC){return eC<256?en[eC]:en[256+(eC>>>7)]}function dF(eD,eC){eD.pending_buf[eD.pending++]=(eC)&255;eD.pending_buf[eD.pending++]=(eC>>>8)&255}function eo(eC,eE,eD){if(eC.bi_valid>(dQ-eD)){eC.bi_buf|=(eE<<eC.bi_valid)&65535;dF(eC,eC.bi_buf);eC.bi_buf=eE>>(dQ-eC.bi_valid);eC.bi_valid+=eD-dQ}else{eC.bi_buf|=(eE<<eC.bi_valid)&65535;eC.bi_valid+=eD}}function es(eD,eE,eC){eo(eD,eC[eE*2],eC[eE*2+1])}function dS(eE,eC){var eD=0;do{eD|=eE&1;eE>>>=1;eD<<=1}while(--eC>0);return eD>>>1}function dM(eC){if(eC.bi_valid===16){dF(eC,eC.bi_buf);eC.bi_buf=0;eC.bi_valid=0}else{if(eC.bi_valid>=8){eC.pending_buf[eC.pending++]=eC.bi_buf&255;eC.bi_buf>>=8;eC.bi_valid-=8}}}function dE(eQ,eL){var eR=eL.dyn_tree;var eM=eL.max_code;var eP=eL.stat_desc.static_tree;var eE=eL.stat_desc.has_stree;var eG=eL.stat_desc.extra_bits;var eC=eL.stat_desc.extra_base;var eO=eL.stat_desc.max_length;var eJ;var eD,eF;var eN;var eI;var eK;var eH=0;for(eN=0;eN<=ex;eN++){eQ.bl_count[eN]=0}eR[eQ.heap[eQ.heap_max]*2+1]=0;for(eJ=eQ.heap_max+1;eJ<dz;eJ++){eD=eQ.heap[eJ];eN=eR[eR[eD*2+1]*2+1]+1;if(eN>eO){eN=eO;eH++}eR[eD*2+1]=eN;if(eD>eM){continue}eQ.bl_count[eN]++;eI=0;if(eD>=eC){eI=eG[eD-eC]}eK=eR[eD*2];eQ.opt_len+=eK*(eN+eI);if(eE){eQ.static_len+=eK*(eP[eD*2+1]+eI)}}if(eH===0){return}do{eN=eO-1;while(eQ.bl_count[eN]===0){eN--}eQ.bl_count[eN]--;eQ.bl_count[eN+1]+=2;eQ.bl_count[eO]--;eH-=2}while(eH>0);for(eN=eO;eN!==0;eN--){eD=eQ.bl_count[eN];while(eD!==0){eF=eQ.heap[--eJ];if(eF>eM){continue}if(eR[eF*2+1]!==eN){eQ.opt_len+=(eN-eR[eF*2+1])*eR[eF*2];eR[eF*2+1]=eN}eD--}}}function eq(eD,eJ,eE){var eG=new Array(ex+1);var eF=0;var eH;var eI;for(eH=1;eH<=ex;eH++){eG[eH]=eF=(eF+eE[eH-1])<<1}for(eI=0;eI<=eJ;eI++){var eC=eD[eI*2+1];if(eC===0){continue}eD[eI*2]=dS(eG[eC]++,eC)}}function ec(){var eH;var eF;var eE;var eD;var eG;var eC=new Array(ex+1);eE=0;for(eD=0;eD<dH-1;eD++){d4[eD]=eE;for(eH=0;eH<(1<<dB[eD]);eH++){dR[eE++]=eD}}dR[eE-1]=eD;eG=0;for(eD=0;eD<16;eD++){ew[eD]=eG;for(eH=0;eH<(1<<dO[eD]);eH++){en[eG++]=eD}}eG>>=7;for(;eD<dv;eD++){ew[eD]=eG<<7;for(eH=0;eH<(1<<(dO[eD]-7));eH++){en[256+eG++]=eD}}for(eF=0;eF<=ex;eF++){eC[eF]=0}eH=0;while(eH<=143){d5[eH*2+1]=8;eH++;eC[8]++}while(eH<=255){d5[eH*2+1]=9;eH++;eC[9]++}while(eH<=279){d5[eH*2+1]=7;eH++;eC[7]++}while(eH<=287){d5[eH*2+1]=8;eH++;eC[8]++}eq(d5,dy+1,eC);for(eH=0;eH<dv;eH++){eh[eH*2+1]=5;eh[eH*2]=dS(eH,5)}ep=new ek(d5,dB,dx+1,dy,ex);eg=new ek(eh,dO,0,dv,ex);dP=new ek(new Array(0),dT,0,dN,em)}function d1(eC){var eD;for(eD=0;eD<dy;eD++){eC.dyn_ltree[eD*2]=0}for(eD=0;eD<dv;eD++){eC.dyn_dtree[eD*2]=0}for(eD=0;eD<dN;eD++){eC.bl_tree[eD*2]=0}eC.dyn_ltree[dw*2]=1;eC.opt_len=eC.static_len=0;eC.last_lit=eC.matches=0}function dD(eC){if(eC.bi_valid>8){dF(eC,eC.bi_buf)}else{if(eC.bi_valid>0){eC.pending_buf[eC.pending++]=eC.bi_buf}}eC.bi_buf=0;eC.bi_valid=0}function dJ(eE,eD,eC,eF){dD(eE);if(eF){dF(eE,eC);dF(eE,~eC)}eB.arraySet(eE.pending_buf,eE.window,eD,eC,eE.pending);eE.pending+=eC}function ef(eD,eH,eC,eG){var eF=eH*2;var eE=eC*2;return(eD[eF]<eD[eE]||(eD[eF]===eD[eE]&&eG[eH]<=eG[eC]))}function ey(eG,eC,eE){var eD=eG.heap[eE];var eF=eE<<1;while(eF<=eG.heap_len){if(eF<eG.heap_len&&ef(eC,eG.heap[eF+1],eG.heap[eF],eG.depth)){eF++}if(ef(eC,eD,eG.heap[eF],eG.depth)){break}eG.heap[eE]=eG.heap[eF];eE=eF;eF<<=1}eG.heap[eE]=eD}function ev(eD,eJ,eG){var eI;var eF;var eH=0;var eE;var eC;if(eD.last_lit!==0){do{eI=(eD.pending_buf[eD.d_buf+eH*2]<<8)|(eD.pending_buf[eD.d_buf+eH*2+1]);eF=eD.pending_buf[eD.l_buf+eH];eH++;if(eI===0){es(eD,eF,eJ)}else{eE=dR[eF];es(eD,eE+dx+1,eJ);eC=dB[eE];if(eC!==0){eF-=d4[eE];eo(eD,eF,eC)}eI--;eE=ei(eI);es(eD,eE,eG);eC=dO[eE];if(eC!==0){eI-=ew[eE];eo(eD,eI,eC)}}}while(eH<eD.last_lit)}es(eD,dw,eJ)}function ee(eK,eH){var eL=eH.dyn_tree;var eJ=eH.stat_desc.static_tree;var eE=eH.stat_desc.has_stree;var eC=eH.stat_desc.elems;var eD,eG;var eI=-1;var eF;eK.heap_len=0;eK.heap_max=dz;for(eD=0;eD<eC;eD++){if(eL[eD*2]!==0){eK.heap[++eK.heap_len]=eI=eD;eK.depth[eD]=0}else{eL[eD*2+1]=0}}while(eK.heap_len<2){eF=eK.heap[++eK.heap_len]=(eI<2?++eI:0);eL[eF*2]=1;eK.depth[eF]=0;eK.opt_len--;if(eE){eK.static_len-=eJ[eF*2+1]}}eH.max_code=eI;for(eD=(eK.heap_len>>1);eD>=1;eD--){ey(eK,eL,eD)}eF=eC;do{eD=eK.heap[1];eK.heap[1]=eK.heap[eK.heap_len--];ey(eK,eL,1);eG=eK.heap[1];eK.heap[--eK.heap_max]=eD;eK.heap[--eK.heap_max]=eG;eL[eF*2]=eL[eD*2]+eL[eG*2];eK.depth[eF]=(eK.depth[eD]>=eK.depth[eG]?eK.depth[eD]:eK.depth[eG])+1;eL[eD*2+1]=eL[eG*2+1]=eF;eK.heap[1]=eF++;ey(eK,eL,1)}while(eK.heap_len>=2);eK.heap[--eK.heap_max]=eK.heap[1];dE(eK,eH);eq(eL,eI,eK.bl_count)}function dI(eK,eL,eJ){var eD;var eH=-1;var eC;var eF=eL[0*2+1];var eG=0;var eE=7;var eI=4;if(eF===0){eE=138;eI=3}eL[(eJ+1)*2+1]=65535;for(eD=0;eD<=eJ;eD++){eC=eF;eF=eL[(eD+1)*2+1];if(++eG<eE&&eC===eF){continue}else{if(eG<eI){eK.bl_tree[eC*2]+=eG}else{if(eC!==0){if(eC!==eH){eK.bl_tree[eC*2]++}eK.bl_tree[dZ*2]++}else{if(eG<=10){eK.bl_tree[dY*2]++}else{eK.bl_tree[d3*2]++}}}}eG=0;eH=eC;if(eF===0){eE=138;eI=3}else{if(eC===eF){eE=6;eI=3}else{eE=7;eI=4}}}}function dL(eK,eL,eJ){var eD;var eH=-1;var eC;var eF=eL[0*2+1];var eG=0;var eE=7;var eI=4;if(eF===0){eE=138;eI=3}for(eD=0;eD<=eJ;eD++){eC=eF;eF=eL[(eD+1)*2+1];if(++eG<eE&&eC===eF){continue}else{if(eG<eI){do{es(eK,eC,eK.bl_tree)}while(--eG!==0)}else{if(eC!==0){if(eC!==eH){es(eK,eC,eK.bl_tree);eG--}es(eK,dZ,eK.bl_tree);eo(eK,eG-3,2)}else{if(eG<=10){es(eK,dY,eK.bl_tree);eo(eK,eG-3,3)}else{es(eK,d3,eK.bl_tree);eo(eK,eG-11,7)}}}}eG=0;eH=eC;if(eF===0){eE=138;eI=3}else{if(eC===eF){eE=6;eI=3}else{eE=7;eI=4}}}}function dX(eD){var eC;dI(eD,eD.dyn_ltree,eD.l_desc.max_code);dI(eD,eD.dyn_dtree,eD.d_desc.max_code);ee(eD,eD.bl_desc);for(eC=dN-1;eC>=3;eC--){if(eD.bl_tree[ea[eC]*2+1]!==0){break}}eD.opt_len+=3*(eC+1)+5+5+4;return eC}function d7(eD,eE,eC,eF){var eG;eo(eD,eE-257,5);eo(eD,eC-1,5);eo(eD,eF-4,4);for(eG=0;eG<eF;eG++){eo(eD,eD.bl_tree[ea[eG]*2+1],3)}dL(eD,eD.dyn_ltree,eE-1);dL(eD,eD.dyn_dtree,eC-1)}function d6(eD){var eC=4093624447;var eE;for(eE=0;eE<=31;eE++,eC>>>=1){if((eC&1)&&(eD.dyn_ltree[eE*2]!==0)){return dK}}if(eD.dyn_ltree[9*2]!==0||eD.dyn_ltree[10*2]!==0||eD.dyn_ltree[13*2]!==0){return dU}for(eE=32;eE<dx;eE++){if(eD.dyn_ltree[eE*2]!==0){return dU}}return dK}var el=false;function d0(eC){if(!el){ec();el=true}eC.l_desc=new ez(eC.dyn_ltree,ep);eC.d_desc=new ez(eC.dyn_dtree,eg);eC.bl_desc=new ez(eC.bl_tree,dP);eC.bi_buf=0;eC.bi_valid=0;d1(eC)}function d8(eE,eC,eD,eF){eo(eE,(ed<<1)+(eF?1:0),3);dJ(eE,eC,eD,true)}function ej(eC){eo(eC,et<<1,3);es(eC,dw,d5);dM(eC)}function dG(eH,eE,eG,eI){var eD,eC;var eF=0;if(eH.level>0){if(eH.strm.data_type===dV){eH.strm.data_type=d6(eH)}ee(eH,eH.l_desc);ee(eH,eH.d_desc);eF=dX(eH);eD=(eH.opt_len+3+7)>>>3;eC=(eH.static_len+3+7)>>>3;if(eC<=eD){eD=eC}}else{eD=eC=eG+5}if((eG+4<=eD)&&(eE!==-1)){d8(eH,eE,eG,eI)}else{if(eH.strategy===d9||eC===eD){eo(eH,(et<<1)+(eI?1:0),3);ev(eH,d5,eh)}else{eo(eH,(d2<<1)+(eI?1:0),3);d7(eH,eH.l_desc.max_code+1,eH.d_desc.max_code+1,eF+1);ev(eH,eH.dyn_ltree,eH.dyn_dtree)}}d1(eH);if(eI){dD(eH)}}function eu(eC,eE,eD){eC.pending_buf[eC.d_buf+eC.last_lit*2]=(eE>>>8)&255;eC.pending_buf[eC.d_buf+eC.last_lit*2+1]=eE&255;eC.pending_buf[eC.l_buf+eC.last_lit]=eD&255;eC.last_lit++;if(eE===0){eC.dyn_ltree[eD*2]++}else{eC.matches++;eE--;eC.dyn_ltree[(dR[eD]+dx+1)*2]++;eC.dyn_dtree[ei(eE)*2]++}return(eC.last_lit===eC.lit_bufsize-1)}er._tr_init=d0;er._tr_stored_block=d8;er._tr_flush_block=dG;er._tr_tally=eu;er._tr_align=ej},{\"../utils/common\":3}],15:[function(dv,dw,du){function dx(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=\"\";this.state=null;this.data_type=2;this.adler=0}dw.exports=dx},{}],\"/\":[function(dw,dz,dv){var du=dw(\"./lib/utils/common\").assign;var dy=dw(\"./lib/deflate\");var dx=dw(\"./lib/zlib/constants\");var dA={};du(dA,dy,dx);dz.exports=dA},{\"./lib/deflate\":1,\"./lib/inflate\":2,\"./lib/utils/common\":3,\"./lib/zlib/constants\":6}]},{},[])(\"/\")});function dl(dr,dq,dt,ds){return function(){dr.call(dq,dt,ds)}}function dn(){if(!dp.async&&dp.useDefer&&!dk){var dq=new Date()-di();if(dq>dp.threshold){return true}}return false}function dg(dq){dk=true;setTimeout(function(){dk=false;dh();dq()},dp.defer);return true}pako.Deflate.prototype.onData=function(dq){dc.handler.apply(dc,[dq,this.strm.avail_out===0?false:true])};pako.Deflate.prototype.onEnd=function(dq){};this.options=dp;var dm=null;var dk=false;function di(){return dm||(dm=new Date())}function dh(){return dm=null}}dc.prototype.deflate=function(dg,dh){return pako.deflateRaw(dg,dh)};dc.prototype.onEnd=function(){pako.onEnd.apply(this,arguments)};dc.prototype.process=function(dg){dc.handler=dg;if(!this.options.useBinary){this.options.to=\"string\"}pako.deflateRaw(this.options.text,this.options)};if(de&&de.options){if(!de.deflate){de.options.async=true;de.options.useDefer=false;de.deflate=new dc(self,de.options)}de.deflate.process(function(){postMessage({args:Array.prototype.slice.call(arguments),url:self.location&&self.location.href})})}return dc}", "function Hx(a){return a&&a.ic?a.Mb():a}", "function pm(t,e){0}", "function CCUtility() {}", "function o0(o1)\n{\n var o11 = function () {\n try {\nreturn (this.o4 - this.o5) + \" (overwritten)\";\n}catch(this.o665()){}\n};\n try {\nfor (var o2 = 0; __defineGetter__[o1091 >> [4.4, 5.5, 6.6]]; this.o391[0xFF68] = this.o902)\n {\n try {\nif (o6(o29) == \"this.lastOutput[\" + o214 + \"] = output\" + o214)\n {\n try {\nif (o259[10724 >> 2] = o1098 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -\"Array.prototype.copyWithin called on an object with length > 2^32 and a source range completely > 2^32 and destination range crossing 2^32\")\n {\n try {\no4.o5(o2 + \"-\" + (o3-'error!') + \" = undefined\");\n}catch(e){}\n try {\no421 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "init() { }", "init() { }", "init() { }", "init() { }", "init() { }", "function cc(){var a;!(a=Ja()&&!Zb(10))&&(a=bc||ac)&&(a=!(0<=ua($b,10)));this.ae=a;this.fg=!(this.ae||Jb&&!Zb(10));!Jb||Zb(11);this.Ug=Ka()||Ja();this.ug=n(window.Map)&&n(window.Map.prototype.values)&&n(window.Map.prototype.forEach)&&!this.ae;this.vg=n(window.Set)&&n(window.Set.prototype.values)&&n(window.Set.prototype.forEach)&&!this.ae}", "init () {}", "init () {}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}" ]
[ "0.70165133", "0.682409", "0.64743537", "0.6454304", "0.63657933", "0.63591665", "0.62854725", "0.62560505", "0.6183157", "0.60627335", "0.6007949", "0.5904859", "0.5879616", "0.5859123", "0.58283687", "0.5816589", "0.58119327", "0.57961977", "0.5786329", "0.5773027", "0.5771876", "0.5766624", "0.5732132", "0.5672127", "0.56541485", "0.5646417", "0.559718", "0.559109", "0.5550611", "0.55495733", "0.55123186", "0.55015093", "0.547481", "0.54196304", "0.54052615", "0.54030573", "0.5388591", "0.5388591", "0.53691715", "0.536751", "0.5353938", "0.53534675", "0.53534675", "0.5343713", "0.532168", "0.5311919", "0.5290598", "0.5281824", "0.52295405", "0.52287954", "0.5226558", "0.5226558", "0.51971376", "0.51914424", "0.5176816", "0.5175489", "0.51636076", "0.51636076", "0.5162948", "0.51469", "0.51403755", "0.51396495", "0.51313734", "0.5130563", "0.5120015", "0.5119587", "0.5119587", "0.5119587", "0.5119587", "0.5119587", "0.51195735", "0.5115064", "0.5115064", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088", "0.51088" ]
0.0
-1
Gives you an instance of a Logger to capture messages according to Firebase's logging scheme.
function Logger(name) { this.name = name; /** * The log level of the given Logger instance. */ this._logLevel = defaultLogLevel; /** * The log handler for the Logger instance. */ this._logHandler = defaultLogHandler; /** * Capture the current instance for later use */ instances.push(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLogger() {\n if (logger) return logger;\n var ccLogger = ccHandler(serializer);\n logger = new logger$1.Logger('@firebase/performance/cc');\n logger.logHandler = ccLogger;\n return logger;\n}", "function getLogger() {\r\n if (logger) {\r\n return logger;\r\n }\r\n var ccLogger = ccHandler(serializer);\r\n logger = new logger$1.Logger('@firebase/performance/cc');\r\n logger.logHandler = ccLogger;\r\n return logger;\r\n}", "constructor() {\n // Implementing singleton pattern\n if (!Logger.exists) {\n this.provider = this.createLogger()\n this.stream = this.buildStream()\n this.levels = this.buildLoggingLevels()\n Logger.instance = this\n Logger.exists = true\n }\n return Logger.instance\n }", "function LoggerService() {\n return through.obj(function (msg, enc, cb) {\n if (msg.type !== types.LOG) return cb();\n\n console.log(\"LOGGING >>\", msg.log);\n cb();\n })\n}", "function getLogger() {\n return logger;\n}", "function Logger() {\n this.buffer = [];\n this.plugins = {};\n\n this.url = _DEFAULTS.url;\n this.flushInterval = _DEFAULTS.flushInterval;\n this.collectMetrics = _DEFAULTS.collectMetrics;\n this.logLevels = _DEFAULTS.logLevels;\n this.maxAttempts = _DEFAULTS.maxAttempts;\n}", "constructor() {\n this.logger = new Logger();\n }", "constructor() {\n this.logger = new Logger();\n }", "static get(lgr = \"anon\", maxLog = \"default\", force = \"default\") {\nvar i, len, lg, ref, ref1, ref2, ref3, stat, theLogger;\ntheLogger = null;\nref = Logger._loggers;\nfor (i = 0, len = ref.length; i < len; i++) {\nlg = ref[i];\nif (lg.modName === lgr) {\nif (theLogger == null) {\ntheLogger = lg;\n}\n}\n}\nstat = theLogger != null ? \"Updated\" : \"Created\";\nif (theLogger != null) {\nif (maxLog === \"default\") {\nmaxLog = theLogger.maxLog;\n}\nif (force === \"default\") {\nforce = theLogger.force;\n}\nif ((ref1 = Logger._modLogger) != null) {\nif (typeof ref1.trace === \"function\") {\nref1.trace(`get: Updating ${theLogger.modName} Logger. MaxLog ${theLogger.maxLog} -> ${maxLog}`);\n}\n}\ntheLogger._setLoggers(maxLog, force);\n} else {\nif (maxLog === \"default\") {\nmaxLog = Logger._defaultMaxLog;\n}\nif (force === \"default\") {\nforce = \"noforce\";\n}\nif ((ref2 = Logger._modLogger) != null) {\nif (typeof ref2.trace === \"function\") {\nref2.trace(`get: Create ${lgr} logger`);\n}\n}\ntheLogger = new Logger(lgr, maxLog, force);\n}\nif ((ref3 = Logger._modLogger) != null) {\nif (typeof ref3.debug === \"function\") {\nref3.debug(`${theLogger.modName} ${stat}: ${theLogger.maxLog} (${theLogger.maxLogLev}) ${theLogger.force}`);\n}\n}\nreturn theLogger;\n}", "function Logger() {\n return new require( './real-logger-private' ).Logger();\n}", "function getLogger() {\n if (logger) {\n return logger;\n }\n\n logger = fh_logger.createLogger({\n name: 'default-logger',\n streams: [\n {\n \"type\": \"stream\",\n \"level\": \"error\",\n \"stream\": \"process.stdout\"\n }\n ]\n });\n return logger;\n}", "function Logger() {\n this.subscribers = [];\n this.INFO = \"INFO\";\n this.WARNING = \"WARNING\";\n this.ASSERT = \"ASSERT\";\n this.ERROR = \"ERROR\";\n\n this.subscriptions = {};\n this.subscriptions[this.INFO] = 0;\n this.subscriptions[this.WARNING] = 0;\n this.subscriptions[this.ASSERT] = 0;\n this.subscriptions[this.ERROR] = 0;\n}", "function Logger() {\n this._logHandler = new NullLogHandler();\n }", "function Logger(config) {\n if (config == void 0)\n config = {};\n _.defaultsDeep(config, defaultConfig);\n config.isEnabled = config.namespace != void 0 && process.env.DEBUG != \"*\" && (process.env.DEBUG || \"\").match(config.namespace) == void 0 ? false : true;\n config.lastLogged = moment.utc();\n this.config = config;\n this.buffer = [];\n this.bufferMode = false;\n this.children = [];\n this.parent = null;\n}", "getLogger() {\n return this.logger;\n }", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n \n return function (store) {\n var prevState = deepCopy(store.state);\n \n if (typeof logger === 'undefined') {\n return\n }\n \n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n \n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n \n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n \n prevState = nextState;\n });\n }\n \n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n \n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n }", "function logger() {}", "function getAPILogger() {\n return apiLogger;\n}", "initLogger() {\n this.logger = this.getLogger();\n }", "log(name) {\n name = name || 'default';\n let log = this._loggers.get(name);\n if (!log) {\n log = new Logger(\n name,\n this._configurer.level(name),\n this._format,\n this._out\n );\n this._loggers.set(name, log);\n }\n return log;\n }", "function Logger() {\n var _this = _super.call(this) || this;\n _this.handle = new native.COMMON.Logger();\n return _this;\n }", "function Logger () {\r\n this.loggingLevel = DEFAULT_LOG_LEVEL;\r\n}", "function createLogger(ref) {\n if (ref === void 0) ref = {\n };\n var collapsed = ref.collapsed;\n if (collapsed === void 0) collapsed = true;\n var filter = ref.filter;\n if (filter === void 0) filter = function(mutation, stateBefore, stateAfter) {\n return true;\n };\n var transformer = ref.transformer;\n if (transformer === void 0) transformer = function(state) {\n return state;\n };\n var mutationTransformer = ref.mutationTransformer;\n if (mutationTransformer === void 0) mutationTransformer = function(mut) {\n return mut;\n };\n var actionFilter = ref.actionFilter;\n if (actionFilter === void 0) actionFilter = function(action, state) {\n return true;\n };\n var actionTransformer = ref.actionTransformer;\n if (actionTransformer === void 0) actionTransformer = function(act) {\n return act;\n };\n var logMutations = ref.logMutations;\n if (logMutations === void 0) logMutations = true;\n var logActions = ref.logActions;\n if (logActions === void 0) logActions = true;\n var logger = ref.logger;\n if (logger === void 0) logger = console;\n return function(store) {\n var prevState = deepCopy(store.state);\n if (typeof logger === 'undefined') return;\n if (logMutations) store.subscribe(function(mutation, state) {\n var nextState = deepCopy(state);\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + mutation.type + formattedTime;\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n prevState = nextState;\n });\n if (logActions) store.subscribeAction(function(action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + action.type + formattedTime;\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n };\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}", "function getLogger() {\n var loggerName = (debugging) ? 'debug' : 'standard';\n var logger = winston.loggers.get(loggerName);\n logger.cli();\n return logger;\n}", "function Logger() {\n\tthis._currentLogLevel = Logger.ALL;\n\tthis._timestamps = true;\n}", "getLogger() {\n return this.s.db.s.logger;\n }", "function Logger(logLevel) {\n this.logLevel = logLevel;\n}", "function getLogger(options) {\n // A logger instance may be given in the options hash\n if (options.logger) {\n return options.logger\n }\n\n // Or as the only argument\n if (options instanceof Object && options.constructor !== Object) {\n return options\n }\n\n // Or simply a name to use for the logger and if you're really lazy just go\n // with the default name `access`\n return new Logger(options && options.hier,\n options.name || options || 'access',\n options && options.level)\n}", "initLogger() {\n this.logger = new ConsoleLogger({\n name: this.getServiceName()\n });\n }", "function Logger(name) {\n this.name = name;\n /**\r\n * The log level of the given Logger instance.\r\n */\n\n this._logLevel = defaultLogLevel;\n /**\r\n * The log handler for the Logger instance.\r\n */\n\n this._logHandler = defaultLogHandler;\n /**\r\n * Capture the current instance for later use\r\n */\n\n instances.push(this);\n }", "function Logger(name) {\n this._prefix = name + ':';\n}", "function getLogger() {\n const logger = createLogger({\n exitOnError: false,\n format: format.json(),\n });\n\n logger.add(\n new transports.Console({\n format: format.simple(),\n }),\n );\n\n return logger;\n}", "constructor(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function getLogger() {\n\tvar consoleOptions = {\"level\": config.log.console.level,\"silent\": config.log.console.silent,\"colorize\": config.log.console.colorize,\"timestamp\": config.log.console.timestamp, \"label\": config.log.console.label};\n\tvar fileOptions = {\"level\": config.log.file.level,\"silent\": config.log.file.silent,\"colorize\": config.log.file.colorize,\"timestamp\": config.log.file.timestamp,\"label\": config.log.file.label,\"filename\": config.log.file.filename, \"maxsize\": config.log.file.maxSize,\"maxFiles\": config.log.file.maxFiles,\"json\": config.log.file.json};\n\tvar logger = new (winston.Logger)({\n\t\t// set the custom log levels\n\t\tlevels: config.logger.levels,\n\t transports: [\n\t new (winston.transports.Console)(consoleOptions),\n\t new (winston.transports.File)(fileOptions)\n\t ]\n\t});\n\t// set the custom log colors for the levels\n\twinston.addColors(config.logger.colors);\n\treturn logger;\n}", "printLogger(){\n\t\treturn logger;\n\t}", "function Logger(confOrLogger, args) {\n var self = this;\n if (confOrLogger.constructor !== Logger) {\n // Create a new root logger\n var conf = this._processConf(confOrLogger);\n self._sampled_levels = conf.sampled_levels || {};\n delete conf.sampled_levels;\n self._logger = bunyan.createLogger(conf);\n self._levelMatcher = this._levelToMatcher(conf.level);\n\n // For each specially logged component we need to create\n // a child logger that accepts everything regardless of the level\n self._componentLoggers = {};\n Object.keys(self._sampled_levels).forEach(function(component) {\n self._componentLoggers[component] = self._logger.child({\n component: component,\n level: bunyan.TRACE\n });\n });\n\n self._traceLogger = self._logger.child({\n level: bunyan.TRACE\n });\n // Set up handlers for uncaught extensions\n self._setupRootHandlers();\n } else {\n self._sampled_levels = confOrLogger._sampled_levels;\n self._logger = confOrLogger._logger;\n self._levelMatcher = confOrLogger._levelMatcher;\n self._componentLoggers = confOrLogger._componentLoggers;\n self._traceLogger = confOrLogger._traceLogger;\n }\n this.args = args;\n}", "function Logger (confOrLogger, args) {\n if (confOrLogger.constructor !== Logger) {\n // Create a new root logger\n var conf = this._processConf(confOrLogger);\n this._logger = bunyan.createLogger(conf);\n var level = conf && conf.level || 'warn';\n this._levelMatcher = this._levelToMatcher(level);\n\n // Set up handlers for uncaught extensions\n this._setupRootHandlers();\n } else {\n this._logger = confOrLogger._logger;\n this._levelMatcher = confOrLogger._levelMatcher;\n }\n this.args = args;\n}", "async prepareLogger() {\n this.logger = await this.addService('logger', new this.LoggerTransport(this.options.logger));\n }", "async prepareLogger() {\n this.logger = await this.addService('logger', new this.LoggerTransport(this.options.logger));\n }", "function getMe(){\n let me = tg.getMe()\n return Logger.log(me)\n}", "function setLogger(l){\n\tlogger = l;\n}", "function createLogger() {\n\t var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var _ref$collapsed = _ref.collapsed;\n\t var collapsed = _ref$collapsed === undefined ? true : _ref$collapsed;\n\t var _ref$transformer = _ref.transformer;\n\t var transformer = _ref$transformer === undefined ? function (state) {\n\t return state;\n\t } : _ref$transformer;\n\t var _ref$mutationTransfor = _ref.mutationTransformer;\n\t var mutationTransformer = _ref$mutationTransfor === undefined ? function (mut) {\n\t return mut;\n\t } : _ref$mutationTransfor;\n\t\n\t return {\n\t snapshot: true,\n\t onMutation: function onMutation(mutation, nextState, prevState) {\n\t if (typeof console === 'undefined') {\n\t return;\n\t }\n\t var time = new Date();\n\t var formattedTime = ' @ ' + pad(time.getHours(), 2) + ':' + pad(time.getMinutes(), 2) + ':' + pad(time.getSeconds(), 2) + '.' + pad(time.getMilliseconds(), 3);\n\t var formattedMutation = mutationTransformer(mutation);\n\t var message = 'mutation ' + mutation.type + formattedTime;\n\t var startMessage = collapsed ? console.groupCollapsed : console.group;\n\t\n\t // render\n\t try {\n\t startMessage.call(console, message);\n\t } catch (e) {\n\t console.log(message);\n\t }\n\t\n\t console.log('%c prev state', 'color: #9E9E9E; font-weight: bold', prevState);\n\t console.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n\t console.log('%c next state', 'color: #4CAF50; font-weight: bold', nextState);\n\t\n\t try {\n\t console.groupEnd();\n\t } catch (e) {\n\t console.log('—— log end ——');\n\t }\n\t }\n\t };\n\t}", "function Logger() {\n\n }", "function Logger(name) {\n this.name = name;\n /**\r\n * The log level of the given Logger instance.\r\n */\n\n this._logLevel = defaultLogLevel;\n /**\r\n * The log handler for the Logger instance.\r\n */\n\n this._logHandler = defaultLogHandler;\n /**\r\n * Capture the current instance for later use\r\n */\n\n instances.push(this);\n }", "function createLogger (ref) {\n\t if ( ref === void 0 ) ref = {};\n\t var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n\t var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n\t var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n\t\n\t return function (store) {\n\t var prevState = deepCopy(store.state);\n\t\n\t store.subscribe(function (mutation, state) {\n\t if (typeof console === 'undefined') {\n\t return\n\t }\n\t var nextState = deepCopy(state);\n\t var time = new Date();\n\t var formattedTime = \" @ \" + (pad(time.getHours(), 2)) + \":\" + (pad(time.getMinutes(), 2)) + \":\" + (pad(time.getSeconds(), 2)) + \".\" + (pad(time.getMilliseconds(), 3));\n\t var formattedMutation = mutationTransformer(mutation);\n\t var message = \"mutation \" + (mutation.type) + formattedTime;\n\t var startMessage = collapsed\n\t ? console.groupCollapsed\n\t : console.group;\n\t\n\t // render\n\t try {\n\t startMessage.call(console, message);\n\t } catch (e) {\n\t console.log(message);\n\t }\n\t\n\t console.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n\t console.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n\t console.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n\t\n\t try {\n\t console.groupEnd();\n\t } catch (e) {\n\t console.log('—— log end ——');\n\t }\n\t\n\t prevState = nextState;\n\t });\n\t }\n\t}", "function Logger(component, type) {\n component = component || 'nodegs';\n type = type || '';\n return function(msg) { \n var message = '['+component+']' + (type ? ' ' + type : type) + ': ';\n if (typeof msg == \"object\") {\n sys.log(message + JSON.stringify(msg));\n }\n else {\n sys.log(message + msg);\n }\n }; \n}", "curryLogger (src) {\n return {\n info: msg => {\n this._log(src, this.LEVEL_INFO, msg)\n },\n debug: msg => {\n this._log(src, this.LEVEL_DEBUG, msg)\n },\n error: msg => {\n this._log(src, this.LEVEL_ERROR, msg)\n }\n }\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The log handler for the Logger instance.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The log handler for the Logger instance.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The log handler for the Logger instance.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The log handler for the Logger instance.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The log handler for the Logger instance.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "setLogger (logger) {\n this._logger = logger\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }", "_subscribeForLogging() {\n const oThis = this;\n\n oThis.client.on('log', function(level, className, message, furtherInfo) {\n const msg = `cassandra log event: ${level} -- ${message}`;\n\n switch (level) {\n case 'info': {\n break;\n }\n case 'warning': {\n logger.warn('l_cw_2', msg);\n break;\n }\n case 'error': {\n logger.error('l_cw_3', msg);\n const errorObject = responseHelper.error({\n internal_error_identifier: 'l_cw_3',\n api_error_identifier: 'something_went_wrong',\n debug_options: {\n message: message,\n className: className,\n furtherInfo: furtherInfo\n }\n });\n\n createErrorLogsEntry.perform(errorObject, errorLogsConstants.highSeverity);\n break;\n }\n case 'verbose': {\n break;\n }\n default: {\n logger.log(`Current level: ${level}.--${msg}`);\n break;\n }\n }\n });\n }", "function createLogger() {\n var winston = require('winston');\n\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({\n timestamp: true\n }),\n new (winston.transports.File)({\n filename: 'api.log',\n json: true,\n timestamp: true,\n maxFiles: 1,\n maxsize: 1000000\n })\n ]\n });\n return logger;\n}", "requestLogger(options = defaultLoggerOptions) {\n let logger = null;\n try {\n // make logger avail in requests;\n logger = buildLogger(options, this.loggingConf);\n } catch (e) {\n // so using console as last resort\n console.error('Error when creating logger', e); // eslint-disable-line no-console\n }\n\n return (req, res, next) => {\n if (!req.logger) {\n req.logger = logger;\n }\n\n try {\n req.logger.info({ req });\n } catch (e) {\n console.error('Error while logging request', e); // eslint-disable-line no-console\n } finally {\n next();\n }\n };\n }", "constructor() {\n this.logger = console;\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The log handler for the Logger instance.\n */\n this._logHandler = defaultLogHandler;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The log handler for the Logger instance.\n */\n this._logHandler = defaultLogHandler;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function setLogger(obj) {\n logger = obj;\n}", "function Logger(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n }", "function getMe() {\r\n let me = tg.getMe()\r\n return Logger.log(me)\r\n}", "function Logger(debug) {\n this._init(debug);\n}", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function Logger(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }", "function LoggerBase(){\n\n\t}", "function BackOfficeLogger() {\n var logger = this;\n\n logger.log = function (msg) { console.log(msg); }\n logger.alert = function (txt) { alert(txt); }\n\n return logger;\n }", "function createLogger() {\n // eslint-disable-next-line no-unused-vars\n return store => next => action => {\n let formattedPayload = '';\n const actionFormatter = actionFormatters[action.type];\n if (typeof actionFormatter === 'function') {\n formattedPayload = actionFormatter(action);\n } else if (action.toString !== Object.prototype.toString) {\n formattedPayload = action.toString();\n } else if (typeof action.payload !== 'undefined') {\n formattedPayload = inspectObject(action.payload);\n } else {\n formattedPayload = inspectObject(action);\n }\n\n console.log(` * ${action.type}: ${formattedPayload}`); // eslint-disable-line no-console\n return next(action);\n };\n}", "get log() {\n if (!this._log) {\n const instanceName = `${this.constructor.name}@${node.getObjectId(this).substring(0, 4)}`;\n this._log = logger.getLogger(instanceName);\n }\n return this._log;\n }", "log(...args) {\n return this.getInstance().log(...args);\n }", "function LoggerSettings() {\n NullHandler.call(this);\n\n this._handlers = [];\n}" ]
[ "0.69847864", "0.6932374", "0.65856093", "0.6470139", "0.6422159", "0.63105905", "0.62534165", "0.6230862", "0.6199978", "0.61954194", "0.6027098", "0.60160494", "0.5992496", "0.59455204", "0.5933633", "0.5930959", "0.59271234", "0.58996165", "0.5881013", "0.5873659", "0.58404624", "0.58242923", "0.57991266", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.5779713", "0.57749474", "0.5717461", "0.5717272", "0.5710334", "0.5709136", "0.5695279", "0.5690105", "0.5651252", "0.5646604", "0.56413573", "0.5626299", "0.5617894", "0.55961376", "0.5595802", "0.55924225", "0.55924225", "0.5576794", "0.55727947", "0.55587345", "0.55578697", "0.555495", "0.5530055", "0.5508633", "0.54974055", "0.54720104", "0.54720104", "0.54720104", "0.54720104", "0.54720104", "0.54655135", "0.5457782", "0.5457782", "0.5457782", "0.54516727", "0.54418933", "0.5436121", "0.5431432", "0.5424741", "0.5424741", "0.54241735", "0.54095215", "0.54048103", "0.54015356", "0.53993833", "0.53993833", "0.53993833", "0.53993833", "0.53993833", "0.53993833", "0.53993833", "0.53993833", "0.53990644", "0.5372477", "0.5358485", "0.5347583", "0.5343026", "0.5335846" ]
0.5479256
67
Build a destructive iterator for the value list
function iteratorFor(items) { var iterator = { next: function next() { var value = items.shift(); return { done: value === undefined, value: value }; } }; if (support.iterable) { iterator[Symbol.iterator] = function () { return iterator; }; } return iterator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createIteratorFromValue(value){\n return (function(){\n let used = false;\n\n return {\n next: function(){\n try {\n return used ? {done: true} : {value: value, done: false};\n }\n finally{\n used = !used;\n }\n }\n };\n })();\n }", "*[Symbol.iterator]() {\n for (let current = this.#head.next;\n current != this.#tail;\n current = current.next) {\n yield current.value;\n }\n }", "*values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i];\n if (v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield this.#valList[i];\n }\n }\n }", "*[Symbol.iterator]() {\n let values = this.values;\n for (let i = 0; i < values.length; i++)\n yield values[i];\n }", "[Symbol.iterator]() {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: val\n };\n }\n };\n }", "[Symbol.iterator]() {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: val\n };\n }\n };\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }", "*values() {\n\n let current = this[head];\n\n while (current !== null) {\n yield current.data;\n current = current.next;\n }\n }", "[Symbol.iterator]()\n {\n return this._iterate({ wrapPoint:false, includeEmpty:false });\n }", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "function iterContinue(value) {\n return { value, done: false };\n}", "function make_list (value, next) {\n\treturn {\n\t\tvalue: value,\n\t\tnext: next\n\t};\n}", "*entries() {\n for (const i of this.#indexes()) {\n if (this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield [this.#keyList[i], this.#valList[i]];\n }\n }\n }", "*[Symbol.iterator]() {\n for (let node = this.first, position = 0; node; position++, node = node.next) {\n yield node.value;\n }\n }", "[Symbol.iterator]() {\n this._update();\n return this._list[Symbol.iterator]();\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}", "function iterator(next) {\n return { next };\n}", "[Symbol.iterator]() {\n return this.values[Symbol.iterator]();\n }", "[Symbol.iterator]() {\n return this.values[Symbol.iterator]();\n }", "[Symbol.iterator]() {\n return this.items.values();\n }", "*[Symbol.iterator]() {\n let pointer = this.head\n while (pointer) {\n yield pointer\n pointer = pointer.next\n }\n }", "function ListIteratorBackwards__(List__instance) {\n this.List__instance_ = List__instance;\n this.reset()\n }", "function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m)\r\n return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length)\r\n o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }", "[Symbol.iterator]() {\n let index = -1;\n let keys = Object.keys(this.forecasts);\n return {\n next: () => ({\n value: this.forecasts[keys[++index]], done: !(index in keys)\n })\n };\n }", "[Symbol.iterator]() {\n //we need to set the starting values we'll use in the return val\n let iteratorVariable = 0;\n let lengthOfSet = this.group.length;\n let setArray = this.group;\n //We return the next() function which will then return the appropriate\n //object (including one with done:true when we're out of elements)\n return {\n next() {\n if (iteratorVariable == lengthOfSet) return {\n done: true\n }\n let value = setArray[iteratorVariable];\n iteratorVariable++\n return {\n value: value,\n done: false\n }\n }\n }\n }", "function ListIterator__(List__instance) {\n this.List__instance_ = List__instance;\n this.predicate_ = null;\n this.reset();\n }", "function reject(iterator, context) {\n var results = [];\n this.each(function(value, index) {\n if (!iterator.call(context, value, index))\n results.push(value);\n });\n return results;\n }", "function __values(o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n }", "static from(iter) {\n let outputGroup = new Group();\n let thisIter = iter[Symbol.iterator]();\n let currentVal = thisIter.next();\n\n //loops over the iterable until done is true\n while(!currentVal.done) {\n if(!outputGroup.has(currentVal.value)) {\n outputGroup.add(currentVal.value);\n }\n currentVal = thisIter.next();\n }\n\n //returns the new Group with the iterable's values, non-repeating!\n return outputGroup;\n }", "function __values(o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m)\n return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n }", "function backwardsIterator() {\n var array = this;\n var i = array.length;\n return {\n next() {\n var value = array[--i];\n return i < 0 ? { done: true } : { value };\n }\n };\n}", "[Symbol.iterator]() {\n return this.data.values();\n }", "[Symbol.iterator]() {\n return this.data.values();\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n \n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n \n return iterator\n }", "* values() {\n\t\tfor (const [, value] of this) {\n\t\t\tyield value;\n\t\t}\n\t}", "[Symbol.iterator]() {\n return this.storage.values[Symbol.iterator]();\n }", "[Symbol.iterator]() {\n return this.storage.values[Symbol.iterator]();\n }", "function iteratorFor(items) {\n\t\t var iterator = {\n\t\t next: function() {\n\t\t var value = items.shift()\n\t\t return {done: value === undefined, value: value}\n\t\t }\n\t\t }\n\t\t\n\t\t if (support.iterable) {\n\t\t iterator[Symbol.iterator] = function() {\n\t\t return iterator\n\t\t }\n\t\t }\n\t\t\n\t\t return iterator\n\t\t }", "[Symbol.iterator]() {\n let pre = 0, cur = 1;\n // The resulting iterator object has to have a next method:\n return {\n next() {\n // The result of next has to be an object with the property `done` that states whether or not the iterator is done.\n [pre, cur] = [cur, pre + cur];\n if (pre < 1000) return { done: false, value: pre };\n return { done: true };\n }\n }\n }", "function __values(o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n}", "function SetIterator() {}", "*[Symbol.iterator]() {\n const length = this.length;\n for (let i = 0 ; i < length ; i++) {\n yield this.get(i);\n }\n }", "dropWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n const iter = self[Symbol.iterator]();\n while (true) {\n const { value, done } = iter.next();\n if (done)\n break;\n if (!predicate(value)) {\n yield value;\n yield* iterableOfIterator(iter);\n }\n }\n });\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "[Symbol.iterator]() {}", "function keyValueIterable(target) {\n target[Symbol.iterator] = function () {\n const keys = Object.keys(target);\n return {\n next() {\n const done = keys.length === 0;\n const key = keys.shift();\n return {\n done,\n value: [key, target[key]]\n };\n }\n };\n };\n return target;\n}", "*[Symbol.iterator]() {\n let node = this.head;\n\n while(node) {\n yield node;\n node = node.next;\n }\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }" ]
[ "0.6567051", "0.61971587", "0.6129268", "0.60959846", "0.6081213", "0.6081213", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60395825", "0.6019784", "0.6000144", "0.593555", "0.59003186", "0.5864537", "0.58550805", "0.57782644", "0.57182074", "0.5696546", "0.5678825", "0.5650001", "0.5650001", "0.5626858", "0.5598189", "0.5578078", "0.5562323", "0.5553551", "0.5545673", "0.5522022", "0.5507745", "0.5497337", "0.54833496", "0.54804116", "0.5457861", "0.54544246", "0.54544246", "0.5451051", "0.54476434", "0.54418916", "0.54418916", "0.5426908", "0.542111", "0.5417031", "0.5406467", "0.5405448", "0.5399026", "0.5391502", "0.53890103", "0.53890103", "0.53890103", "0.5386343", "0.53807116", "0.5372553", "0.5366664", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894", "0.5363894" ]
0.0
-1
Copy properties from source to target (recursively allows extension of Objects and Arrays). Scalar values in the target are overwritten. If target is undefined, an object of the appropriate type will be created (and returned). We recursively copy all child properties of plain Objects in the source so that namespace like dictionaries are merged. Note that the target can be a function, in which case the properties in the source Object are copied onto it as static properties of the Function.
function deepExtend(target, source) { if (!(source instanceof Object)) { return source; } switch (source.constructor) { case Date: // Treat Dates like scalars; if the target date object had any child // properties - they will be lost! var dateValue = source; return new Date(dateValue.getTime()); case Object: if (target === undefined) { target = {}; } break; case Array: // Always copy the array source and overwrite the target. target = []; break; default: // Not a plain Object - treat it as a scalar. return source; } for (var prop in source) { if (!source.hasOwnProperty(prop)) { continue; } target[prop] = deepExtend(target[prop], source[prop]); } return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n\n break;\n\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n\n return target;\n }", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n\n break;\n\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n\n return target;\n} // TODO: Really needed (for JSCompiler type checking)?", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n return new Date(source.getTime());\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n return new Date(source.getTime());\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n const dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (const prop in source) {\r\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\r\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\r\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\n\t if (!(source instanceof Object)) {\n\t return source;\n\t }\n\t switch (source.constructor) {\n\t case Date:\n\t // Treat Dates like scalars; if the target date object had any child\n\t // properties - they will be lost!\n\t var dateValue = source;\n\t return new Date(dateValue.getTime());\n\t case Object:\n\t if (target === undefined) {\n\t target = {};\n\t }\n\t break;\n\t case Array:\n\t // Always copy the array source and overwrite the target.\n\t target = [];\n\t break;\n\t default:\n\t // Not a plain Object - treat it as a scalar.\n\t return source;\n\t }\n\t for (var prop in source) {\n\t if (!source.hasOwnProperty(prop)) {\n\t continue;\n\t }\n\t target[prop] = deepExtend(target[prop], source[prop]);\n\t }\n\t return target;\n\t}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n var dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (var prop in source) {\r\n if (!source.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}", "function _mergeProperties(target, source) {\n\t\tfor(var property in source) {\n\t\t\tif(source.hasOwnProperty(property)) {\n\t\t\t\tif(source[property] instanceof Array) {\n\t\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t\t} else if(\n\t\t\t\t\tsource[property] !== null &&\n\t\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\t\tsource[property].constructor === Object\n\t\t\t\t) {\n\t\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t\t} else {\n\t\t\t\t\ttarget[property] = source[property];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn target;\n\t}", "function _mergeProperties(target, source) {\n\tfor(var property in source) {\n\t\tif(source.hasOwnProperty(property)) {\n\t\t\tif(source[property] instanceof Array) {\n\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t} else if(\n\t\t\t\tsource[property] !== null &&\n\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\tsource[property].constructor === Object\n\t\t\t) {\n\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t} else {\n\t\t\t\ttarget[property] = source[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n}", "function _mergeProperties(target, source) {\n\tfor(var property in source) {\n\t\tif(source.hasOwnProperty(property)) {\n\t\t\tif(source[property] instanceof Array) {\n\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t} else if(\n\t\t\t\tsource[property] !== null &&\n\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\tsource[property].constructor === Object\n\t\t\t) {\n\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t} else {\n\t\t\t\ttarget[property] = source[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n}", "function _mergeProperties(target, source) {\n\tfor(var property in source) {\n\t\tif(source.hasOwnProperty(property)) {\n\t\t\tif(source[property] instanceof Array) {\n\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t} else if(\n\t\t\t\tsource[property] !== null &&\n\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\tsource[property].constructor === Object\n\t\t\t) {\n\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t} else {\n\t\t\t\ttarget[property] = source[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n}", "function _mergeProperties(target, source) {\n\tfor(var property in source) {\n\t\tif(source.hasOwnProperty(property)) {\n\t\t\tif(source[property] instanceof Array) {\n\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t} else if(\n\t\t\t\tsource[property] !== null &&\n\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\tsource[property].constructor === Object\n\t\t\t) {\n\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t} else {\n\t\t\t\ttarget[property] = source[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n}", "function _mergeProperties(target, source) {\n\t\t\tfor(var property in source) {\n\t\t\t\tif(source.hasOwnProperty(property)) {\n\t\t\t\t\tif(source[property] instanceof Array) {\n\t\t\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t\t\t} else if(\n\t\t\t\t\t\tsource[property] !== null &&\n\t\t\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\t\t\tsource[property].constructor === Object\n\t\t\t\t\t) {\n\t\t\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget[property] = source[property];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn target;\n\t\t}", "function mergeDeep(target, source) {\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach(key => {\n if (isObject(source[key])) {\n if (!target[key]) Object.assign(target, {\n [key]: {}\n });\n mergeDeep(target[key], source[key]);\n } else {\n Object.assign(target, {\n [key]: source[key]\n });\n }\n });\n }\n return target;\n }", "function copyProperties(source, target) {\n _Object__WEBPACK_IMPORTED_MODULE_6__[\"each\"](source, function (key, value) {\n // only if value is set\n if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"hasValue\"](value)) {\n target[key] = value;\n }\n });\n return target;\n}", "function _mergeProperties(target, source) {\n for (var property in source) {\n if (Object.prototype.hasOwnProperty.call(source, property)) {\n if (source[property] instanceof Array) {\n target[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n } else if (\n source[property] !== null &&\n typeof source[property] === 'object' &&\n source[property].constructor === Object\n ) {\n target[property] = _mergeProperties(target[property] || {}, source[property]);\n } else {\n target[property] = source[property];\n }\n }\n }\n\n return target;\n}", "function _mergeProperties(target, source) {\n for (var property in source) {\n if (Object.prototype.hasOwnProperty.call(source, property)) {\n if (source[property] instanceof Array) {\n target[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n } else if (\n source[property] !== null &&\n typeof source[property] === 'object' &&\n source[property].constructor === Object\n ) {\n target[property] = _mergeProperties(target[property] || {}, source[property]);\n } else {\n target[property] = source[property];\n }\n }\n }\n\n return target;\n}", "function merge( target, source ) {\r\n \r\n if ( typeof target !== 'object' ) {\r\n target = {};\r\n }\r\n \r\n for (var property in source) {\r\n \r\n if ( source.hasOwnProperty(property) ) {\r\n \r\n var sourceProperty = source[ property ];\r\n \r\n if ( typeof sourceProperty === 'object' ) {\r\n target[ property ] = merge( target[ property ], sourceProperty );\r\n continue;\r\n }\r\n \r\n target[ property ] = sourceProperty;\r\n \r\n }\r\n \r\n }\r\n \r\n for (var a = 2, l = arguments.length; a < l; a++) {\r\n merge(target, arguments[a]);\r\n }\r\n \r\n return target;\r\n \r\n }", "function recursiveMerge(target, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop)) {\n if (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {\n // If the target object is a constructor override off prototype.\n target.prototype[prop] = src[prop];\n } else {\n target[prop] = typeof src[prop] === 'object' ? recursiveMerge(\n target[prop], src[prop]) : src[prop];\n }\n }\n }\n return target;\n}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key]}}}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key];}}}", "function mergeDeep(target, source) {\r\n if ( isObject(target) && isObject(source) ) {\r\n for ( var key in source ) {\r\n if ( isObject(source[key]) ) {\r\n if ( !target[key] || typeof target[key] !== typeof source[key] ) {\r\n Object.assign(target, {\r\n [key]: {}\r\n });\r\n }\r\n mergeDeep(target[key], source[key]);\r\n } else {\r\n Object.assign(target, {\r\n [key]: source[key]\r\n });\r\n }\r\n }\r\n }\r\n\r\n return target;\r\n }", "function merge_objs(source, target) {\n for (var k in source) {\n if (source.hasOwnProperty(k)) {\n target[k] = source[k]; // TODO: does this need to be recursive for our purposes?\n }\n }\n return target;\n }", "static extend(target, source) {\n if (typeof Object.assign !== 'function') {\n ;(function() {\n Object.assign = function(target) {\n 'use strict'\n // We must check against these specific cases.\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object')\n }\n\n let output = Object(target)\n for (let index = 1; index < arguments.length; index++) {\n let source = arguments[index]\n if (source !== undefined && source !== null) {\n for (let nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey]\n }\n }\n }\n }\n return output\n }\n })()\n }\n\n let output = Object.assign({}, target)\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (this.isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, {\n [key]: source[key]\n })\n } else {\n output[key] = this.extend(target[key], source[key])\n }\n } else {\n Object.assign(output, {\n [key]: source[key]\n })\n }\n })\n }\n return output\n }", "function merge(target, source) {\n\n if (typeof target !== 'object') {\n target = {};\n }\n\n for (var property in source) {\n if (source.hasOwnProperty(property)) {\n var sourceProperty = source[ property ];\n\n if (typeof sourceProperty === 'object') {\n target[ property ] = merge(target[ property ], sourceProperty);\n continue;\n }\n target[ property ] = sourceProperty;\n }\n }\n\n for (var a = 2, l = arguments.length; a < l; a++) {\n merge(target, arguments[a]);\n }\n return target;\n}", "function deepExtend (destination, source) {\n for (var property in source) {\n if (source[property] && source[property].constructor &&\n source[property].constructor === Object) {\n destination[property] = destination[property] || {};\n arguments.callee(destination[property], source[property]);\n } else {\n destination[property] = source[property];\n }\n }\n return destination;\n }", "function recursiveMerge(target, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop)) {\n if (target.prototype && target.prototype.constructor === target) {\n // If the target object is a constructor override off prototype.\n clobber(target.prototype, prop, src[prop]);\n } else {\n if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n recursiveMerge(target[prop], src[prop]);\n } else {\n clobber(target, prop, src[prop]);\n }\n }\n }\n }\n}", "function recursiveMerge(target, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop)) {\n if (target.prototype && target.prototype.constructor === target) {\n // If the target object is a constructor override off prototype.\n clobber(target.prototype, prop, src[prop]);\n } else {\n if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n recursiveMerge(target[prop], src[prop]);\n } else {\n clobber(target, prop, src[prop]);\n }\n }\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function extend(target, source) {\n target = target || {};\n for (var prop in source) {\n if (typeof source[prop] === 'object') {\n target[prop] = extend(target[prop], source[prop]);\n }\n else {\n target[prop] = source[prop];\n }\n }\n return target;\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function deepExtend(destination, source) {\n destination = destination || {};\n for (var property in source) {\n if (source[property] && source[property].constructor && source[property].constructor === Object) {\n destination[property] = destination[property] || {};\n deepExtend(destination[property], source[property]);\n } else {\n destination[property] = source[property];\n }\n }\n return destination;\n }", "function deepExtend(destination, source) {\n destination = destination || {};\n for (var property in source) {\n if (source[property] && source[property].constructor && source[property].constructor === Object) {\n destination[property] = destination[property] || {};\n deepExtend(destination[property], source[property]);\n } else {\n destination[property] = source[property];\n }\n }\n return destination;\n }", "function deepExtend(destination, source) {\n destination = destination || {};\n for (var property in source) {\n if (source[property] && source[property].constructor && source[property].constructor === Object) {\n destination[property] = destination[property] || {};\n deepExtend(destination[property], source[property]);\n } else {\n destination[property] = source[property];\n }\n }\n return destination;\n }", "function deepExtend(destination, source) {\r\n destination = destination || {};\r\n for (var property in source) {\r\n if (source[property] && source[property].constructor && source[property].constructor === Object) {\r\n destination[property] = destination[property] || {};\r\n deepExtend(destination[property], source[property]);\r\n } else {\r\n destination[property] = source[property];\r\n }\r\n }\r\n return destination;\r\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function merge_objs(source,target) {\n\t\tfor (var k in source) { if (source.hasOwnProperty(k)) {\n\t\t\ttarget[k] = source[k]; // TODO: does this need to be recursive for our purposes?\n\t\t}}\n\t\treturn target;\n\t}", "merge (target, source) {\n if (_.isObject(target) && _.isObject(source)) {\n Object.keys(source).forEach(key => {\n if (_.isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, { [key]: {} });\n }\n\n _.merge(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n });\n }\n return target;\n }", "merge (target, source) {\n if (_.isObject(target) && _.isObject(source)) {\n Object.keys(source).forEach(key => {\n if (_.isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, { [key]: {} });\n }\n\n _.merge(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n });\n }\n return target;\n }", "function objectAssign(target, source) {\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n target[prop] = source[prop];\n }\n }\n return target;\n}", "function deepExtend(destination, source) {\n\t destination = destination || {};\n\t for (var property in source) {\n\t if (source[property] && source[property].constructor && source[property].constructor === Object) {\n\t destination[property] = destination[property] || {};\n\t deepExtend(destination[property], source[property]);\n\t } else {\n\t destination[property] = source[property];\n\t }\n\t }\n\t return destination;\n\t }", "function cloneUtil(target, source) {\n if (source === void 0) { source = null; }\n if (!source) {\n source = target;\n target = {};\n }\n if (isObject(target) && isObject(source)) {\n for (var key in source) {\n if (isObject(source[key])) {\n if (!target[key])\n Object.assign(target, (_a = {}, _a[key] = {}, _a));\n cloneUtil(target[key], source[key]);\n }\n else {\n Object.assign(target, (_b = {}, _b[key] = source[key], _b));\n }\n }\n }\n return target;\n var _a, _b;\n}", "function cloneUtil(target, source) {\n if (source === void 0) {\n source = null;\n }\n\n if (!source) {\n source = target;\n target = {};\n }\n\n if (isObject(target) && isObject(source)) {\n for (var key in source) {\n if (isObject(source[key])) {\n if (!target[key]) Object.assign(target, (_a = {}, _a[key] = {}, _a));\n cloneUtil(target[key], source[key]);\n } else {\n Object.assign(target, (_b = {}, _b[key] = source[key], _b));\n }\n }\n }\n\n return target;\n\n var _a, _b;\n}", "function softCopyProperties(source, target) {\n _Object__WEBPACK_IMPORTED_MODULE_6__[\"each\"](source, function (key, value) {\n // only if value is set\n if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"hasValue\"](value) && !(_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"hasValue\"](target[key]))) {\n target[key] = value;\n }\n });\n return target;\n}", "function _extend(source, target) {\n const sourceKeys = Object.keys(source);\n const targetKeys = Object.keys(target);\n const n = {};\n let key;\n let i;\n\n if (typeof(source) !== typeof(target)) {\n throw new Error('mismatched types in _extend');\n }\n\n if (Array.isArray(target)) {\n return source.concat(target);\n }\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n n[key] = source[key];\n }\n\n for (i = 0; i < targetKeys.length; i++) {\n key = targetKeys[i];\n if (source.hasOwnProperty(key) &&\n typeof(n[key]) === 'object') {\n n[key] = _extend(source[key], target[key]);\n }\n else {\n n[key] = target[key];\n }\n }\n\n return n;\n}", "static defaults(target, ...sources) {\r\n sources.forEach(source => {\r\n for (const key in source) {\r\n if (!source.hasOwnProperty(key))\r\n return;\r\n if (target[key] === null || target[key] === undefined) {\r\n target[key] = source[key];\r\n }\r\n else if (typeof source[key] === 'object' && typeof target[key] === 'object') {\r\n // property is an object, recursively add it's field over... #1373\r\n this.defaults(target[key], source[key]);\r\n }\r\n }\r\n });\r\n return target;\r\n }", "function Extend(target, source){\r\n if((target) && (source) && (typeof source == 'object')) {\r\n for(var property in source) {\r\n if (source.hasOwnProperty(property)) {\r\n try { target[property] = source[property]; } catch (exception) { ; }\r\n }\r\n }\r\n }\r\n return target;\r\n}", "function copyProperties(source, target) {\n for (var key in source) {\n target[key] = source[key];\n }\n }", "function deepMixIn(target, objects) {\n\t var i = 0,\n\t n = arguments.length,\n\t obj;\n\n\t while(++i < n){\n\t obj = arguments[i];\n\t if (obj) {\n\t forOwn(obj, copyProp, target);\n\t }\n\t }\n\n\t return target;\n\t }", "function deepAssign(target, source, dereference = false)\r\n{\r\n\tif (dereference)\r\n\t{\r\n\t\tsource = Object.assign(Array.isArray(source) ? [] : {}, source)\r\n\t}\r\n\r\n\tfor (let i in source)\r\n\t{\r\n\t\tif (source.hasOwnProperty(i))\r\n\t\t{\r\n\t\t\tif (dereference && source[i] instanceof Object)\r\n\t\t\t{\r\n\t\t\t\tsource[i] = Object.assign(Array.isArray(source[i]) ? [] : {}, source[i])\r\n\t\t\t}\r\n\r\n\t\t\tif (target.hasOwnProperty(i))\r\n\t\t\t{\r\n\t\t\t\tif (dereference && target[i] instanceof Object)\r\n\t\t\t\t{\r\n\t\t\t\t\ttarget[i] = Object.assign(Array.isArray(target[i]) ? [] : {}, target[i])\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (target[i] instanceof Object && source[i] instanceof Object && !(target[i] instanceof Function || source[i] instanceof Function))\r\n\t\t\t\t{\r\n\t\t\t\t\tdeepAssign(target[i], source[i])\r\n\t\t\t\t}\r\n\t\t\t\telse if (target[i] != source[i])\r\n\t\t\t\t{\r\n\t\t\t\t\ttarget[i] = source[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttarget[i] = source[i]\r\n\t\t\t}\r\n\r\n\t\t\tif (Array.isArray(target[i]) && Array.isArray(source[i]) && source[i].length == 0 && target[i].length != 0)\r\n\t\t\t{\r\n\t\t\t\ttarget[i] = []\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn target // For simpler dereference usage\r\n}", "function merge(target) {\n var source, length, i;\n var sources = Array.prototype.slice.call(arguments, 1);\n target = target || {};\n\n // Allow `n` params to be passed in to extend this object\n for (i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n for (var property in source) {\n if (source.hasOwnProperty(property)) {\n if (isPlainObject(source[property])) {\n target[property] = merge(target[property], source[property]);\n }\n else {\n target[property] = source[property];\n }\n }\n }\n }\n\n return target;\n }", "function extend (target, source) {\n for(prop in source) {\n target[prop] = source[prop];\n }\n return target;\n }", "function deepMixIn(target, objects) {\n var i = 0,\n n = arguments.length,\n obj;\n\n while(++i < n){\n obj = arguments[i];\n if (obj) {\n forOwn(obj, copyProp, target);\n }\n }\n\n return target;\n }", "function deepMixIn(target, objects) {\n var i = 0,\n n = arguments.length,\n obj;\n\n while(++i < n){\n obj = arguments[i];\n if (obj) {\n forOwn(obj, copyProp, target);\n }\n }\n\n return target;\n }", "function copyOwnProperties(source, target) {\n var ignorePropertyNames = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];\n\n Object.getOwnPropertyNames(source).forEach(function (name) {\n if (ignorePropertyNames.indexOf(name) < 0) {\n var descriptor = Object.getOwnPropertyDescriptor(source, name);\n Object.defineProperty(target, name, descriptor);\n }\n });\n return target;\n}", "function copyOwnProperties(source, target) {\n var ignorePropertyNames = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];\n\n Object.getOwnPropertyNames(source).forEach(function (name) {\n if (ignorePropertyNames.indexOf(name) < 0) {\n var descriptor = Object.getOwnPropertyDescriptor(source, name);\n Object.defineProperty(target, name, descriptor);\n }\n });\n return target;\n}" ]
[ "0.75014603", "0.74398065", "0.7425828", "0.7425828", "0.7425828", "0.7425828", "0.7425828", "0.7425828", "0.7419184", "0.7419184", "0.73876894", "0.736244", "0.73570776", "0.7340579", "0.7340579", "0.7340579", "0.7340579", "0.7340579", "0.7340579", "0.7340579", "0.7340579", "0.7260315", "0.7230047", "0.7230047", "0.7230047", "0.7230047", "0.7215386", "0.71480364", "0.7146627", "0.7132263", "0.7132263", "0.7094348", "0.7087769", "0.7019051", "0.70159197", "0.6999109", "0.69907147", "0.6984501", "0.6976261", "0.69522244", "0.6948697", "0.6948697", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.69232786", "0.6919417", "0.6916208", "0.6891583", "0.6891583", "0.6891583", "0.68903744", "0.68903744", "0.68903744", "0.68903744", "0.68611854", "0.68611854", "0.68611854", "0.68596584", "0.68240124", "0.6813404", "0.6807852", "0.6807852", "0.68059486", "0.67715997", "0.675335", "0.674558", "0.6735745", "0.66895497", "0.6623299", "0.6593953", "0.6586489", "0.6572554", "0.6560829", "0.65442747", "0.6473954", "0.64690137", "0.64690137", "0.6466611", "0.6466611" ]
0.7410317
21
TODO: Really needed (for JSCompiler type checking)?
function patchProperty(obj, prop, value) { obj[prop] = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Js(e){return(Js=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}", "function Type() {}", "__eval__(__source__, __boundValues__) { return eval(__source__) }", "type() { }", "type(_obj) {\n return this.typeChr(_obj);\n }", "function Type() {\r\n}", "function JavascriptType(typeSpec) {\n if (Object.keys(typeSpec).length > 0) {\n throw new Error('JavascriptType can not be customized');\n }\n}", "function J(t,i,r,a){function s(e){var o;return u[e]=!0,me.each(t[e]||[],function(e,t){var n=t(i,r,a);return\"string\"!=typeof n||c||u[n]?c?!(o=n):void 0:(i.dataTypes.unshift(n),s(n),!1)}),o}var u={},c=t===Ut;return s(i.dataTypes[0])||!u[\"*\"]&&s(\"*\")}", "private public function m246() {}", "function $JS2Py(src){\n if(src===null||src===undefined){return None}\n if(typeof src==='number'){\n if(src%1===0){return src}\n else{return float(src)}\n }\n if(src.__class__!==undefined){\n if(src.__class__===$ListDict){\n for(var i=0;i<src.length;i++){\n src[i] = $JS2Py(src[i])\n }\n }\n return src\n }\n if(typeof src==\"object\"){\n if($isNode(src)){return $DOMNode(src)}\n else if($isEvent(src)){return $DOMEvent(src)}\n else if(src.constructor===Array||$isNodeList(src)){\n var res = []\n for(var i=0;i<src.length;i++){\n res.push($JS2Py(src[i]))\n }\n return res\n }\n }\n return JSObject(src)\n}", "function ecma (){}", "function resolveJsType(val) {\n switch (toString.call(val)) {\n case '[object Function]':\n return 'function';\n\n case '[object Date]':\n return 'date';\n\n case '[object RegExp]':\n return 'regexp';\n\n case '[object Arguments]':\n return 'arguments';\n\n case '[object Array]':\n return 'array';\n\n case '[object String]':\n return 'string';\n\n default:\n }\n\n if (typeof val == 'object' && val && typeof val.length == 'number') {\n try {\n if (typeof val.callee == 'function') {\n // eslint-disable-line max-depth\n return 'arguments';\n }\n } catch (ex) {\n if (ex instanceof TypeError) {\n // eslint-disable-line max-depth\n return 'arguments';\n }\n }\n }\n\n if (val === null) {\n return 'null';\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (val && val.nodeType === 1) {\n return 'element';\n }\n\n if (val === Object(val)) {\n return 'object';\n }\n\n return typeof val;\n}", "function c(t){return!0===s(t)&&\"[object Object]\"===Object.prototype.toString.call(t)}", "function t(a){return typeof Function!=\"undefined\"&&a instanceof Function||Object.prototype.toString.call(a)===\"[object Function]\"}", "function x(e) {\n var t = typeof e;\n return Array.isArray(e) ? \"array\" : e instanceof RegExp ? \"object\" : b(t, e) ? \"symbol\" : t;\n }", "function Type() {\n}", "function example(arg1: number, arg2: MyObject): Array<Object> {\n// ^ variable\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.primitive.flowtype\n// ^ variable\n// ^ support.type.class.flowtype\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n}", "function r(i){return typeof Function!=\"undefined\"&&i instanceof Function||Object.prototype.toString.call(i)===\"[object Function]\"}", "function t(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function ji(e){return(ji=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}", "function toJs(v) { return v; } //D: compatibilidad con rt_java ", "typeScript(entry, output) {\n return this.ts(entry, output);\n }", "function c(e){return null!==e&&\"object\"==typeof e}", "function staticallyVerifyType(node, types) {\n if (isNodeNully(node)) {\n return types.indexOf(\"null\") > -1 || types.indexOf(\"undefined\") > -1 ? TYPE_VALID : TYPE_INVALID;\n } else if (node.type === \"Literal\") {\n if (node.regex) {\n return types.indexOf(\"object\") > -1 || types.some(identifierMatcher(\"RegExp\")) ? TYPE_VALID : TYPE_INVALID;\n } else {\n return types.indexOf(typeof node.value) > -1 ? TYPE_VALID : TYPE_INVALID;\n }\n } else if (node.type === \"ObjectExpression\") {\n return types.indexOf(\"object\") > -1 || types.indexOf(\"shape\") > -1 ? TYPE_VALID : TYPE_INVALID;\n } else if (node.type === \"ArrayExpression\") {\n return types.indexOf(\"array\") > -1 || types.indexOf(\"object\") > -1 ? TYPE_VALID : TYPE_INVALID;\n } else if (t.isFunction(node)) {\n return types.indexOf(\"function\") > -1 || types.indexOf(\"object\") > -1 ? TYPE_VALID : TYPE_INVALID;\n } else if (node.type === 'NewExpression' && node.callee.type === 'Identifier') {\n // this is of the form `return new SomeClass()`\n // @fixme it should be possible to do this with non computed member expressions too\n return types.indexOf(\"object\") > -1 || types.some(identifierMatcher(node.callee.name)) ? TYPE_VALID : TYPE_UNKNOWN;\n } else if (isBooleanExpression(node)) {\n return types.indexOf('boolean') > -1 ? TYPE_VALID : TYPE_INVALID;\n } else if (node.type === 'Identifier') {\n // check the scope to see if this is a `const` value\n return node;\n } else {\n return TYPE_UNKNOWN; // will produce a runtime type check\n }\n }", "function o(e){switch(e.type){case V.BlockStatement:case V.BreakStatement:case V.CatchClause:case V.ContinueStatement:case V.ClassDeclaration:case V.ClassBody:case V.DirectiveStatement:case V.DoWhileStatement:case V.DebuggerStatement:case V.EmptyStatement:case V.ExpressionStatement:case V.ForStatement:case V.ForInStatement:case V.ForOfStatement:case V.FunctionDeclaration:case V.IfStatement:case V.LabeledStatement:case V.ModuleDeclaration:case V.Program:case V.ReturnStatement:case V.SwitchStatement:case V.SwitchCase:case V.ThrowStatement:case V.TryStatement:case V.VariableDeclaration:case V.VariableDeclarator:case V.WhileStatement:case V.WithStatement:return!0}return!1}", "function Obj(){ return Literal.apply(this,arguments) }", "function x(e) {\n var t = typeof e;\n return Array.isArray(e) ? \"array\" : e instanceof RegExp ? \"object\" : b(t, e) ? \"symbol\" : t;\n }", "function t(e){switch(e.type){case V.AssignmentExpression:case V.ArrayExpression:case V.ArrayPattern:case V.BinaryExpression:case V.CallExpression:case V.ConditionalExpression:case V.ClassExpression:case V.ExportBatchSpecifier:case V.ExportSpecifier:case V.FunctionExpression:case V.Identifier:case V.ImportSpecifier:case V.Literal:case V.LogicalExpression:case V.MemberExpression:case V.MethodDefinition:case V.NewExpression:case V.ObjectExpression:case V.ObjectPattern:case V.Property:case V.SequenceExpression:case V.ThisExpression:case V.UnaryExpression:case V.UpdateExpression:case V.YieldExpression:return!0}return!1}", "function Compiler() {\n}", "'getType'() {\n\t\tthrow new Error('Not implemented.');\n\t}", "function UnderreactType() {}", "function n(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function u(e){switch(e){case\"class\":case\"enum\":case\"export\":case\"extends\":case\"import\":case\"super\":return!0;default:return!1}}", "function r(t){return typeof Function!=\"undefined\"&&t instanceof Function||Object.prototype.toString.call(t)===\"[object Function]\"}", "function Je(t){return(Je=\"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})(t)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return\"string\"==typeof e}", "function r(e){return\"string\"==typeof e}", "getType() {}", "function t(e){switch(e.type){case V.AssignmentExpression:case V.ArrayExpression:case V.ArrayPattern:case V.BinaryExpression:case V.CallExpression:case V.ConditionalExpression:case V.ClassExpression:case V.ExportBatchSpecifier:case V.ExportSpecifier:case V.FunctionExpression:case V.Identifier:case V.ImportSpecifier:case V.Literal:case V.LogicalExpression:case V.MemberExpression:case V.MethodDefinition:case V.NewExpression:case V.ObjectExpression:case V.ObjectPattern:case V.Property:case V.SequenceExpression:case V.ThisExpression:case V.UnaryExpression:case V.UpdateExpression:case V.YieldExpression:return!0}return!1}// Generation is done by generateStatement.", "function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "isDummy()\n{\n return 'dummy' == this.__type;\n}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}" ]
[ "0.62902296", "0.58050174", "0.5695141", "0.56580913", "0.56333554", "0.5606612", "0.5565383", "0.5545024", "0.5512546", "0.55076134", "0.55066526", "0.5505603", "0.54781395", "0.5472474", "0.5468769", "0.5468146", "0.54635763", "0.5463289", "0.5453843", "0.54421264", "0.5437041", "0.5432612", "0.5427195", "0.54081416", "0.5395338", "0.5390415", "0.53825927", "0.53809476", "0.53777266", "0.5376692", "0.53749347", "0.533763", "0.53325987", "0.53257567", "0.53245187", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.53205895", "0.5320558", "0.5320558", "0.5319214", "0.53047454", "0.53039074", "0.5300075", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882", "0.5292882" ]
0.0
-1
Export for faking in tests
function patchCapture(captureFake) { var result = captureStackTrace; captureStackTrace = captureFake; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {}", "setup() {}", "setup() {}", "setup() {}", "function fakeUsage() {\n var fakeObj = fake('example');\n fakeObj.mock('foo').map([], 'bar');\n fakeObj.foo();\n }", "function AeUtil() {}", "async setup() { }", "function MockedProvider() {\n /* ... */\n}", "expected(_utils) {\n return 'nothing';\n }", "verify() {\n // TODO\n }", "function setUp() {\n}", "function TestMethods() {}", "function Utils() {}", "function Utils() {}", "function setUpMocks() {\n\n global.window = {\n self: 'https://me.edu',\n top: 'https://you.edu',\n name: 'DCE-iframe-API-ZYXABC',\n parent: {\n postMessage: (msg) => {}\n }\n };\n global.paella = _.cloneDeep(mockPaellaObject);\n global.class = function (classDef) {\n function createClass() {\n return _.cloneDeep(classDef);\n };\n global.paella.plugins['test'] = createClass();\n };\n}", "function generateTest() {\n // TODO\n}", "function Setup() {\n}", "function _setup () {\n }", "function Util() {}", "private public function m246() {}", "function Helper() {}", "setup() {\n return { args };\n }", "function Utils(){}", "patch() {\n }", "function setup() {\n /**\n * Expect the content of a file with an optional encoding.\n */\n expect.file = (filename, encoding) => {\n return expect(readFileSync(filename, encoding));\n };\n}", "function TestRoot() {}", "function setUp()/* : void*/\n {\n }", "static getHelpers() {}", "setup () {\n // NOOP\n }", "get Baked() {}", "function setUp() {\nbitgo = new BitGoJS.BitGo({ env: 'test', accessToken: configData.accessToken });\n}", "function test_service_bundle_vms() {}", "constructor(setup) {\n this.setup = setup;\n }", "function exposeTestFunctionNames()\n{\nreturn ['XPathResult_resultType'];\n}", "function test_utilization_host() {}", "function _____SHARED_functions_____(){}", "test() {\n return true\n }", "function mockStart(use) {\n window.__DEV_MOCK__ = use;\n}", "function testpuerF() {\n fs.copySync(path.join(__dirname, 'assets', 'someJSON.json'), path.join(__dirname, 'tmp', 'someJSON.json'));\n puerf.start({\n freemarker: ftlRoutesFile,\n mock: routesFile,\n combined: combinedFile,\n templates: templateFolderPath,\n port: testPort,\n root: tmpPath,\n noBrowser: true\n }, testFileServing);\n }", "function setup() {\n\n\t\t\t\t\t}", "async setUp () {\n throw new NotImplemented('setUp')\n }", "function promoterenhancer(){\n\n}", "function setupDefault() {\n}", "exportToJsUnit() {\n var self = this;\n\n // global\n window.exposeTestFunctionNames = function () {\n return self.__testFunctionNames;\n };\n\n // global\n window.isTestPageLoaded = true;\n }", "function Utils() {\n}", "beforeRun() {}", "before(app) {\n apiMocker(app, path.resolve(__dirname, '../public/mock.js'));\n }", "function deferTest() {}", "function someData() {\n //return 'hello world...using export';\n return nameSpaceTest.name;\n }", "function test_bottleneck_provider() {}", "function testFunction() {\r\n console.log(\"myutil.js testFunction called\");\r\n}", "function setup()\n{\n\treturn {\n\t\t// Mandatory parameters\n\t\tdescription: \"Carte Novea\",\n\t\tproduct: \"010100AA\",\n\t\tconfig: \"config.js\",\n\t\ttests:[\n\t\t\t\t//test,//, test2, test3, test4\n\t\t\t\ttest_nested_module.my_tests\n\t\t\t],\n\t\t// Optional parameters\n\t\tadmin_pass: \"\", // leave empty == no admin mode, sinon \"caravane\"\n\t};\n}", "function mockGlobalScope() {\n Object.assign(global, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() });\n Object.assign(global, { __STATIC_CONTENT: (0, exports.mockKV)(store) });\n}", "expected( _utils ) {\n\t\t\treturn 'nothing';\n\t\t}", "setupFinal() {}", "function test_access_child_services_from_the_my_service() {}", "function setup() {\n\n\n}", "function setup() {\n\n\n}", "function Burnisher () {}", "import() {\n }", "function PerformanceTestCase() {\n}", "function AssertTests() {\n}", "fake () {\n // TODO: incorporate examples somehow...hmmm...not sure what to do\n // TODO: incorporate children somehow\n return new Stub(values(this.ioexamples));\n }", "function createTest() {\n function Test(props: UseTreeInput) {\n Test.result(useTopicTree(props));\n return null;\n }\n Test.result = jest.fn();\n return Test;\n }", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function testRun()\r\n{\r\n}", "export() {\n\t\treturn {}\n\t}", "function fooTest() { }", "function testInternalFunction(f) {\n var exec = f.factory();\n var args = [];\n\n for (var i = 1; i < arguments.length; i++) {\n args.push(new Result(arguments[i]));\n }\n return exec.execute(args);\n}", "function TruckFactory() {}", "function TruckFactory() {}", "function setup() {\n \n}", "function setup() {\n \n}", "before() {\n /**\n * Setup the Chai assertion framework\n */\n const chai = require(\"chai\")\n global.expect = chai.expect\n global.assert = chai.assert\n global.should = chai.should()\n }", "function FAADataHelper() {\n}", "function __it() {}", "function TMP(){}", "function TMP(){}", "build () {}", "beforeAll() {}", "function sharedTests() {\n var result;\n beforeEach(function (done) {\n result = txtToIntObj.getIntObj(this.txtdata);\n done();\n });\n it('check for existence and type', function (done) {\n expect(result).to.exist;\n expect(result).to.be.an('object');\n done();\n });\n\n it('make sure intermediate format has all titles', function (done) {\n var titles = txtToIntObj.getTitles(this.txtdata);\n done();\n });\n\n it('make sure there are no bad keys', function (done) {\n var badKeysResult = checkForBadKeys(result);\n expect(badKeysResult).to.be.true;\n done();\n });\n}", "function factory() {}", "function factory() {}", "config() {\n return {\n mock: process.env.NOMOCK === undefined\n };\n }", "function mockDeps() {\n return {\n fs: {\n isFile: this.sinon.stub().resolves(true),\n exists: this.sinon.stub().resolves(false),\n extension: this.sinon.stub().returns('.txt'),\n rename: this.sinon.stub().resolves()\n },\n rs: {\n generate: this.sinon.stub().returns('cba')\n }\n };\n}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function setup(p){\n\n}", "function setup() { \n\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}", "function Library () {\n this.tests = {};\n}" ]
[ "0.63395375", "0.62538314", "0.62538314", "0.62538314", "0.59652007", "0.592908", "0.59203243", "0.5870511", "0.58335674", "0.5803979", "0.5803955", "0.5799477", "0.5797888", "0.5797888", "0.5751915", "0.5734973", "0.5734036", "0.5698406", "0.567787", "0.5670397", "0.56570923", "0.5636086", "0.5608512", "0.5607146", "0.5585528", "0.5571326", "0.5553548", "0.5547951", "0.55150014", "0.5503337", "0.54856455", "0.5470763", "0.5467558", "0.54670304", "0.5452415", "0.54402626", "0.543111", "0.5430168", "0.5420981", "0.5418586", "0.540518", "0.54041404", "0.5400083", "0.5399536", "0.53977126", "0.5396894", "0.5383591", "0.53818643", "0.53741777", "0.53732413", "0.5372092", "0.5359642", "0.53506434", "0.53472227", "0.5343886", "0.5341806", "0.5334827", "0.5334827", "0.53258014", "0.532474", "0.53131133", "0.52931494", "0.5291624", "0.52819437", "0.52805454", "0.52805454", "0.52805454", "0.52759606", "0.524807", "0.52352285", "0.5229991", "0.52197796", "0.52197796", "0.521431", "0.521431", "0.521353", "0.52015424", "0.519451", "0.5190748", "0.5190748", "0.5186676", "0.5182979", "0.51815075", "0.5180925", "0.5180925", "0.5177426", "0.5177299", "0.51750153", "0.51750153", "0.51750153", "0.5172634", "0.5170739", "0.5167568", "0.5167568", "0.5167568", "0.5167568", "0.5167568", "0.5167568", "0.5167568", "0.5167568", "0.5167568" ]
0.0
-1
Helper to make a Subscribe function (just like Promise helps make a Thenable).
function createSubscribe(executor, onNoObservers) { var proxy = new ObserverProxy(executor, onNoObservers); return proxy.subscribe.bind(proxy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "subscribe(fn) {\n return this._subscribe(fn);\n }", "subscribe() {}", "subscribe(s) { return dispatcher.subscribe(s); }", "function subscribe ( util, uri, handler ) {\n var ws = util.connection ? util.connection : util;\n var p = Packet\n .make()\n .uri( uri )\n .method( 'SUBSCRIBE' );\n\n return W.promise( function ( resolve, reject ) {\n Restesque.makeSubscriptionAsync( ws, p )\n .success( function ( subscribe ) {\n subscribe.on( 'publish', handler );\n resolve( subscribe );\n })\n .error( reject );\n });\n }", "function subscribe(){\n performance.mark('subscribing');\n client.subscribe('payload/empty', function (err) {});\n performance.mark('subscribed');\n performance.measure('subscribing to subscribed', 'subscribing', 'subscribed');\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n }", "function createSubscribe(executor, onNoObservers) {\n\t var proxy = new ObserverProxy(executor, onNoObservers);\n\t return proxy.subscribe.bind(proxy);\n\t}", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({\n next: onNext,\n error: onThrow,\n complete: onReturn\n });\n }", "subscribe(fn) {\r\n return this._subscribe(fn);\r\n }", "function make_subscription() {\n var status = UNRESOLVED,\n outcome,\n waiting = [],\n dreading = [],\n result;\n\n function vouch(deed, func) {\n switch (status) {\n case UNRESOLVED:\n (deed === FULFILLED ? waiting : dreading).push(func);\n break;\n case deed:\n func(outcome);\n break;\n }\n };\n\n function resolve(deed, value) {\n status = deed;\n outcome = value;\n (deed == FULFILLED ? waiting : dreading).forEach(function (func) {\n func.apply(func, outcome);\n });\n };\n\n result = {\n subscribe: function (func) {\n vouch(FULFILLED, func);\n },\n miss: function (func) {\n vouch(SMASHED, func);\n },\n deliver: function () {\n var args = Array.prototype.slice.call(arguments);\n resolve(FULFILLED, args);\n },\n hold: function () {\n var args = Array.prototype.slice.call(arguments);\n resolve(SMASHED, args);\n },\n status: function () {\n return status;\n }\n };\n\n result.passable = function () {\n return {\n when: function (f) {\n result.when(f);\n return this;\n },\n fail: function (f) {\n result.fail(f);\n return this;\n }\n };\n }\n\n return result;\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n const proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "sub(fn) {\n return this.subscribe(fn);\n }", "sub(fn) {\n return this.subscribe(fn);\n }", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "subscribe () {}", "sub(name, fn) {\n this.subscribe(name, fn);\n }", "subscribe(fn) {\n if (fn) {\n this._subscriptions.push(this.createSubscription(fn, false));\n }\n\n return () => {\n this.unsubscribe(fn);\n };\n }", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }", "subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }", "sub(fn) {\r\n return this.subscribe(fn);\r\n }", "sub(fn) {\r\n return this.subscribe(fn);\r\n }", "subscribe(fn) {\n const thisSubscribe = this;\n\n thisSubscribe.observer.push(fn);\n }", "function subscribe(channels) {\n\treturn function() {\n\t\ttry {\n\t\t\tthis.connection.send('subscribe', {\n\t\t\t\tchannels: channels\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t}\n}", "sub(name, fn) {\r\n this.subscribe(name, fn);\r\n }", "function subscribeWithInitialGet( util, uri, handler ) {\n var ws = util.connection ? util.connection : util;\n return W.promise( function ( resolve, reject ) {\n get( ws, uri )\n .success( function ( packet ) {\n handler( packet );\n subscribe( ws, uri, handler );\n resolve();\n })\n .error( reject );\n });\n }", "function subscribe (object, method, fn) {\n var original = object[method]\n object[method] = function () {\n var retval = original.apply(this, arguments)\n fn.apply(null, arguments)\n return retval\n }\n return function () {\n object[method] = original\n }\n}", "function _subscribe(type, opts) {\n sc.subscribe(type, opts, (err, data) => {\n onCallback(\"Subscribe\", type, err, data);\n });\n\n setListener(type);\n}", "function makeObservable( obj ) {\n Object.defineProperty( obj, 'subscribe', {value: subscribe} );\n}", "subscribe(fn) {\r\n if (fn) {\r\n this._subscriptions.push(this.createSubscription(fn, false));\r\n }\r\n return () => {\r\n this.unsubscribe(fn);\r\n };\r\n }", "function pubsub() {\n var subscribers = [];\n return Object.freeze({ // freeze to repair\n subscribe: function (subscriber) {\n subscribers.push(subscriber);\n },\n publish: function (publication) {\n // var i, length = subscribers.length;\n // for (i =0; i< length; i +=1) {\n subscribers.forEach(function (s) {\n /* try {\n subscribers[i](publication);\n } catch (ignore) {} */\n setTimeout(function (s) { // this is to prevent las exploit\n setTimeout(function () {\n s(publication);\n }, 0)\n });\n });\n }\n });\n}", "subscribe (topic, handler, content_type='default'){\n\t\treturn this.ready.then((socket)=>{\n\t\t\tif (!(topic in this.subscriptions)){\n\t\t\t\tthis.subscriptions[topic] = {\n\t\t\t\t\t// handlers: {},\n\t\t\t\t\tmessages: []\n\t\t\t\t}\n\n\t\t\t\tif (this.socket.readyState === WebSocket.OPEN){\n\t\t\t\t\tthis.socket.send(JSON.stringify({ \n action: 'subscribe', \n topic: topic\n // content_type: content_type\n }));\n\t\t\t\t\t// console.log(\"Subscribed to \"+topic+\" - handler \"+handler_id);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconsole.log(\"WebSocket is closed, cannot subscribe to [\"+topic+\"]\");\n\t\t\t\t}\n\t\t\t}\n\n let ref = (data)=>handler(DESERIALIZERS[content_type](data));\n\t\t\t// this.on('msg:'+topic, handler);\n this.on('msg:'+topic, ref);\n return ref;\n\t\t});\n\t}", "function subscribe(request, variables, cacheConfig, observer) {\n const subscriptionId = next_subscription_id++\n subscription_ws.send(JSON.stringify({\n action: 'subscribe',\n subscriptionId,\n query: request.text,\n variables: variables,\n }))\n subscription_ws.onmessage = e => {\n observer.onNext({data: JSON.parse(e.data)})\n }\n subscription_ws.onerror = e => {\n console.log(e)\n // FIXME error handling\n }\n return {\n dispose: () => {\n subscription_ws.send(JSON.stringify({\n action: 'unsubscribe',\n subscriptionId,\n }))\n }\n }\n}", "async subscribe (topic) {\n const isProtocolNew = this._config.mqttSettings && this._config.mqttSettings.protocolVersion === 5\n if (!Array.isArray(topic)) {\n topic = [topic]\n }\n return topic.reduce(async (result, topic) => {\n const id = Number(uniqueId())\n if (isProtocolNew && topic.options && topic.options.filterByTimestamp) {\n topic.handler = this._generateTimestampFilteringWrapper(topic.name, topic.handler)\n }\n if (isProtocolNew) {\n if (!topic.options) { topic.options = {} }\n topic.options = merge(topic.options, { properties: { subscriptionIdentifier: id } })\n }\n this._topics[id] = topic\n /* if has client and he is connected */\n if (this._client) {\n try {\n const granted = await this._client.subscribe(topic.name, topic.options)\n result[id] = granted\n } catch (e) {\n result[id] = e\n }\n } else {\n result[id] = new Error('Client don`t created')\n }\n return result\n }, {})\n }", "static subscribeSubs(subs, props, state) {\n return todosStore.subscribeSubs(subs);\n }", "subscribe(name, fn) {\n this.events.get(name).subscribe(fn);\n }", "subscribe(topic, callback) {\n if (!Array.isArray(this.subscribersByTopic[topic])) {\n this.subscribersByTopic[topic] = [];\n }\n\n this.subscribersByTopic[topic].push(callback);\n\n return () => {\n this.unsubscribe(topic, callback);\n };\n }", "async subscribe (room, fn) {\n await this.connecting()\n this.connection.client.send(JSON.stringify({\n action: 'SUBSCRIBE',\n room\n }))\n this.connection.subscriptions.push({ room, fn })\n }", "async initSubscriptions() {\n\n }", "subscribe(sub, handler) {\n this.subscribers[this.GetOrCreateKey(sub, handler)] = {\n handler: handler.bind(sub),\n subref: sub\n };\n }", "subscribe(channel) {\n log.trace('Redis SUB \"%s\"', channel);\n return exports.default.sub.subscribe(channel);\n }", "subscribe (fn) {\n this.subscribers.push(fn);\n }", "function convertSubscribe(fn: SubscribeFunction): ExecuteFunction {\n return function subscribe(operation, variables, cacheConfig) {\n return RelayObservable.fromLegacy(observer =>\n // $FlowFixMe: Flow issues with covariant Observable types.\n fn(operation, variables, cacheConfig, observer),\n ).map(value => convertToExecutePayload(operation, variables, value));\n };\n}", "subscribe() {\n if(this.subscription) {\n return;\n }\n this.subscription = subscribe(this.messageContext, MESSAGE_CHANNEL, (message) => {\n this.handleMessage(message);\n });\n }", "subscribe(fn) {\n\t\tthis.subscribers.push(fn);\n\t}", "_subscribe () {\n if (!this.connected)\n throw new Error('No connection exist')\n\n this.subClient.on('message', this._onMessage.bind(this))\n\n if (_.isFunction(this._config.handlers.onError)) {\n this.subClient.on('error', this._config.handlers.onError)\n }\n }", "function xcoffee_subscribe(sensor_id)\r\n{\r\n console.log('** subscribing to',sensor_id);\r\n\r\n var msg_obj = { msg_type: 'rt_subscribe',\r\n request_id: 'A',\r\n filters: [ { test: \"=\",\r\n key: \"acp_id\",\r\n value: sensor_id } ]\r\n };\r\n //sock_send_str(JSON.stringify(msg_obj));\r\n rt_mon.subscribe(sensor_id, msg_obj, handle_records);\r\n}", "subscribeOne(name, subscriber) {\n if (!subscriber) {\n throw 'Subscriber must have a name';\n }\n const subscription = this.source.subscribe(subscriber);\n this.subscriptions.set(name, subscriber);\n return subscription;\n }", "subscribe(subscriber) {\n if (this.has(subscriber)) {\n return;\n }\n\n if (this.sub1 === void 0) {\n this.sub1 = subscriber;\n return;\n }\n\n if (this.sub2 === void 0) {\n this.sub2 = subscriber;\n return;\n }\n\n this.spillover = [this.sub1, this.sub2, subscriber];\n this.subscribe = spilloverSubscribe;\n this.unsubscribe = spilloverUnsubscribe;\n this.notify = spilloverNotifySubscribers;\n this.has = spilloverHas;\n this.sub1 = void 0;\n this.sub2 = void 0;\n }", "subscribe (OTL) {\n OTL.subscriber.push(this);\n }", "subscribe() {\n this.subscriptionID = this.client.subscribe(this.channel, this.onNewData)\n this.currencyCollection.subscribe(this.render)\n this.currencyCollection.subscribe(this.drawInitialSparkLine)\n this.currencyCollection.subscribeToSparkLineEvent(this.drawSparkLine)\n }", "subscribe() {\n //Fetch Code Goes Here\n }", "subscribe(name, fn) {\r\n this.events.get(name).subscribe(fn);\r\n }", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log('Segment Membership PE fired: ', JSON.stringify(response));\n // Response contains the payload of the new message received\n this.notifier = JSON.stringify(response);\n this.refresh = true;\n // refresh LWC\n if(response.data.payload.Category__c == 'Segmentation') {\n this.getData();\n }\n \n\n\n };\n\n // Invoke subscribe method of empApi. Pass reference to messageCallback\n subscribe(this.channelName, -1, messageCallback).then(response => {\n // Response contains the subscription information on subscribe call\n console.log('Subscription request sent to: ', JSON.stringify(response.channel));\n this.subscription = response;\n this.toggleSubscribeButton(true);\n });\n }", "subscribe(path, initialDataGetter = defaultDataGetter, cleanup) {\n if (this.subscriptions.has(path)) {\n throw new Error('duplicate persistent subscription: ' + path)\n }\n\n this.subscriptions = this.subscriptions.set(path, {\n getter: initialDataGetter,\n cleanup,\n })\n for (const socket of this.sockets) {\n this.nydus.subscribeClient(socket, path, initialDataGetter(this, socket))\n }\n }", "subscribe(path, callback, qos = 0, timeoutMs) {\n return new subscribe_1.ReqSubscribeListener(this, path, callback, qos, timeoutMs);\n }", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log(\"New Component Update message received: \", JSON.stringify(response.data.payload));\n this.doDemoComponentRefresh();\n }\n\n subscribe(this.channelName, -1, messageCallback).then((response) => {\n // Response contains the subscription information on subscribe call\n console.log(`Subscription request sent to: ${JSON.stringify(response.channel)}`);\n console.log(`Subscription request Response: ${JSON.stringify(response)}`);\n this.subscription = response;\n this.isSubscriptionRequested = false;\n this.isSubscribed = true;\n });\n }", "async subscribe({ commit, dispatch }, address) {\n if (!address || !address.length) {\n return ;\n }\n\n const subscriptions = await CatapultWebsocket.subscribeTransactions(\n dispatch,\n CatapultHttp.websocketUrl,\n address,\n )\n commit('mutate', {key: 'subscriptions', value: subscriptions})\n }", "subscribe(event, callback) {\n if (this.connection) {\n emitter.on(event, callback);\n return this.connection.subscribe(event, emitter)\n }\n return Promise.reject({code: 'qi-call/no-connection', message: 'Connection object not found.'})\n }", "function mqtt_subscribe(topic, options, callback) {\n try {\n client.subscribe(topic, {qos: (options.qos) ? options.qos : 0});\n } catch (exec) {\n callback({err: 1, message: exec.message})\n }\n callback(null, {err: 0, message: 'Subscribed.'})\n}", "subscribe(callback) {\n let type = typeof callback;\n\n invariant(type === 'function', 'Bus.listenTo() expects a function, instead it received a ' + type);\n\n _callbacks = _callbacks.concat(callback);\n }", "handleSubscribe() {\n let claimResponse = this.getClaimResponse();\n if (this.state.subscriptionType == null) {\n this.setState({\n subscribeMsg: \"Unable to subscribe. Select a subscription type\"\n });\n } else if (claimResponse.outcome !== \"queued\") {\n this.setState({\n subscribeMsg:\n \"Unable to subscribe. ClaimResponse outcome is \" +\n claimResponse.outcome\n });\n } else if (this.state.subscriptionType === this.subscriptionType.RESTHOOK)\n this.handleRestHookSubscribe();\n else if (this.state.subscriptionType === this.subscriptionType.WEBSOCKET)\n this.handleWebSocketSubscribe();\n else if (this.state.subscriptionType === this.subscriptionType.POLLING)\n this.polling();\n }", "function subscribe(ob) {\n // this can contain http requests, clicks etc...\n [10, 20, 30].forEach(ob.next);\n ob.complete();\n}", "function _sub(publisherUid, fromUid, eventType, args){\n\t\t\t_sendToUid(publisherUid, fromUid, 'subscribe', eventType, args);\n\t\t}", "function subscribable() {\n var args = Array.prototype.slice.call(arguments),\n p,\n original_result,\n result;\n // TODO \"this\" needs to be the same as the original\n // maybe add it as a property?\n live_promise = promisable.apply(promisable, args);\n p = live_promise;\n p.withResult(function (r) {\n original_result = r;\n });\n p.when(s.deliver);\n p.fail(s.hold);\n result = {\n when: function(func) {\n p.when(func);\n return this;\n },\n fail: function(func) {\n p.fail(func);\n return this;\n }\n }\n return (no_conflict ? original_result : result);\n }" ]
[ "0.7111695", "0.69480175", "0.6911661", "0.6881512", "0.6807628", "0.6789229", "0.6763905", "0.66531384", "0.6646185", "0.6622463", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.6600869", "0.65936077", "0.65685934", "0.65685934", "0.656858", "0.64355284", "0.63971317", "0.63739645", "0.6316285", "0.6316285", "0.6316285", "0.6316285", "0.6316285", "0.63093257", "0.63093257", "0.62786216", "0.62532765", "0.62336874", "0.6191688", "0.6150991", "0.6078615", "0.6062997", "0.6044027", "0.60012364", "0.5995059", "0.5990089", "0.5948681", "0.5918046", "0.5886676", "0.587431", "0.58491176", "0.58471584", "0.5841727", "0.5835349", "0.58212346", "0.5807763", "0.5783065", "0.5780566", "0.5766049", "0.5726135", "0.57246196", "0.57199603", "0.5715926", "0.570698", "0.569921", "0.5697385", "0.56877714", "0.5683923", "0.56787294", "0.56739646", "0.5670874", "0.56695247", "0.5667336", "0.56650174", "0.5644977", "0.56372464", "0.56308997", "0.56235194" ]
0.65715325
39
Turn synchronous function into one called asynchronously.
function async(fn, onError) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } Promise.resolve(true).then(function () { fn.apply(void 0, args); }).catch(function (error) { if (onError) { onError(error); } }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function MyAsyncFn () {}", "async function asyncFunction(arg) {\r\n return arg;\r\n}", "async function fn(){ //This is the newer way of doing an async function\n return 'hello';\n}", "async function asyncFn(){\n\n return 1;\n}", "async function f(){\n return something\n}", "function async(f) {\n\t return function () {\n\t var argsToForward = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t argsToForward[_i] = arguments[_i];\n\t }\n\t promiseimpl.resolve(true).then(function () {\n\t f.apply(null, argsToForward);\n\t });\n\t };\n\t}", "async function WrapperForAsyncFunc() {\n const result = await AsyncFunction();\n console.log(result);\n}", "async function foo() {\n return 1\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "async function asyncFn() {\n return value;\n }", "async function asyncFn() {\n return value;\n }", "function async(f) {\n throw Error(\"Not implemented.\");\n Packages.net.appjet.ajstdlib.execution.runAsync(appjet.context, f);\n}", "async function func() {\n return 1;\n}", "async function test() {}", "async function wrapperForAsyncFunc() {\n const result1 = await AsyncFunction1();\n console.log(result1);\n const result2 = await AsyncFunction2();\n console.log(result2);\n}", "do(func) {\n return async && data instanceof Promise\n ? using(data.then(func), async)\n : using(func(data), async)\n }", "function async(f) {\n return function () {\n for (var _len = arguments.length, argsToForward = Array(_len), _key = 0; _key < _len; _key++) {\n argsToForward[_key] = arguments[_key];\n }\n\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n for (var _len = arguments.length, argsToForward = Array(_len), _key = 0; _key < _len; _key++) {\n argsToForward[_key] = arguments[_key];\n }\n\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "async function myFunc() {\n return 'Hello';\n}", "async function myFn() {\n // wait\n}", "async function f() {\n return 1;\n }", "async function f() {\n return 1;\n }", "async function myFunc() {\n // Function body here\n }", "static async method(){}", "function callSyncFunction() {\n var deferred = Q.defer();\n notDeferred();\n return deferred.promise;\n}", "function asyncInIE (f) {\n f();\n }", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function wrap_sync (fn) {\n return function (params) {\n var val = fn(params)\n if (val && !isPromise(val)) throw val\n return val\n }\n}", "async function f() {\n return 1;\n}", "async method(){}", "function someAsyncApiCall(callback) { callback(); }", "function asyncExecute(fn) {\n if ((typeof document !== \"undefined\" && document !== null) && (document.hidden || document.msHidden) && nonAsyncCount++ < 10000) {\n fn();\n }\n else {\n nonAsyncCount = 0;\n setImmediate(fn);\n }\n }", "async function fetchAsync(func) { // eslint-disable-line no-unused-vars\r\n const response = await func();\r\n return response;\r\n}", "function myAsyncFunction(callback) {\n // 50ms delay before callback\n setTimeout(function () {\n callback('hello');\n }, 100);\n}", "function async_io_normal(cb) {\n\n}", "function async(fn, onError) {\n\t return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t _promise.PromiseImpl.resolve(true).then(function () {\n\t fn.apply(void 0, args);\n\t }).catch(function (error) {\n\t if (onError) {\n\t onError(error);\n\t }\n\t });\n\t };\n\t}", "function async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n }", "function wrapSync(func, cb) {\n if (typeof cb !== 'function') {\n return func();\n }\n\n process.nextTick(function () {\n var result;\n var error;\n\n try {\n result = func();\n } catch (err) {\n error = err;\n }\n\n return cb(error, result);\n });\n}", "function asyncHelper () {\n\tlet f, r\n\tconst prm = new Promise((_f, _r)=>{f = _f, r = _r})\n\tfunction done(...x){\n\t\treturn x.length === 0 ? f() : r(x[0])\n\t}\n\tdone.then = prm.then.bind(prm)\n\tdone.catch = prm.catch.bind(prm)\n\tdone.finally = prm.finally.bind(prm)\n\treturn done\n}", "async function thenify(fn) {\n return await new Promise(function(resolve, reject) {\n function callback(err, res) {\n if (err) return reject(err);\n return resolve(res);\n }\n\n fn(callback);\n });\n}", "function async(fn, onError) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n LocalPromise.resolve(true).then(function () {\n fn.apply(undefined, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n LocalPromise.resolve(true).then(function () {\n fn.apply(undefined, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "async function miFuncionConPromesa(){\n return \"Saludos con promeso y async\";\n}", "async function executeAsyncTask() {\n const valueA = await functionA()\n const valueB = await functionB(valueA)\n return function3(valueA, valueB)\n}", "async function simpleReturn() {\n return 1;\n}", "async function asyncWrapperFunction() {\r\n await htmlRouting();\r\n await videoRouting();\r\n const data = await dataProcessing();\r\n const nodes = await nodesGetting();\r\n dynamic(data,nodes);\r\n display(data,nodes);\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function wrapInAsync (expression) {\n return '(async function() {\\n' +\n expression + ';\\n' +\n '});';\n}", "async function bar(){\r\n\tconsole.log(\"bar\")\r\n}", "async function myAsyncFunction(arg) {\n return `Your argument is: ${arg}`\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function addAsync(x,y, onResult){\n console.log(\"[SP] processing \", x , \" and \", y);\n setTimeout(function(){\n var result = x + y;\n console.log(\"[SP] returning result\");\n if (typeof onResult === 'function')\n onResult(result);\n },3000);\n}", "async function funcionAsincronaDeclarada (){\r\n try {\r\n console.log(`Inicio de Async function`)\r\n let obj = await cuadradoPromise(0);\r\n console.log(`Async function: ${obj.value}, ${obj.result}`)\r\n \r\n obj = await cuadradoPromise(1);\r\n console.log(`Async function: ${obj.value}, ${obj.result}`)\r\n\r\n obj = await cuadradoPromise(2);\r\n console.log(`Async function: ${obj.value}, ${obj.result}`)\r\n\r\n obj = await cuadradoPromise(3);\r\n console.log(`Async function: ${obj.value}, ${obj.result}`)\r\n\r\n obj = await cuadradoPromise(4);\r\n console.log(`Async function: ${obj.value}, ${obj.result}`)\r\n } catch (err) {\r\n console.error(err)\r\n }\r\n}", "function doRunAsync(fn, ...args) {\n if (fn.length === args.length + 1) { //expects callback\n let executed,\n executedErr,\n reject = err => {\n executedErr = err;\n },\n resolve = () => {\n };\n \n const callback = err => {\n if (executed)\n return;\n executed = true;\n\n if (err)\n reject(err);\n else\n resolve();\n };\n \n let result;\n switch (args.length) {\n case 0:\n result = fn(callback);\n break;\n \n case 1:\n result = fn(args[0], callback);\n break;\n \n case 2:\n result = fn(args[0], args[1], callback);\n break;\n \n default:\n throw new Error(`missing support for ${args.length} args`);\n }\n \n if (executed) { //callback was executed synchronously\n if (executedErr)\n throw executedErr;\n \n return result;\n \n } else { //callback was not executed synchronously, so it must be asynchronous\n return new Bluebird((...args2) => {\n resolve = args2[0];\n reject = args2[1];\n });\n }\n }\n \n //no callback, so either synchronous or returns a Promise\n switch (args.length) {\n case 0:\n return fn();\n \n case 1:\n return fn(args[0]);\n \n case 2:\n return fn(args[0], args[1]);\n \n default:\n throw new Error(`missing support for ${args.length} args`);\n }\n}", "function asyncFunction(work){\r\n\treturn new Promise(function(resolve,reject){\t\t//resolve for success and reject for failure\r\n\t\tif (work === \"\")\r\n\t\t\treject(Error(\"Nothing\"));\r\n\t\tsetTimeout(function(){\r\n\t\t\tresolve(work);\r\n\t\t},1000);\r\n\t});\r\n}", "function Synchronized () {}", "function Synchronized () {}", "function Synchronized () {}", "async function miFuncionConPromesa ()\r\n{\r\n return 'saludos con promesa y async';\r\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _promise.PromiseImpl.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _promise.PromiseImpl.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "async function fetchUser() {\n return \"abc\";\n}", "function asynchronous(fn) {\n return function (done) {\n var returnValue = fn.call(this, done);\n returnValue\n .then(function () {\n done();\n })\n .catch(function (err) {\n done.fail(err);\n });\n $rootScope.$apply();\n return returnValue;\n };\n}", "function wrapInPromiseAsync(asyncFunc){\r\n var promise = new Promise(async((resolve, reject) => {\r\n resolve(await(asyncFunc()));\r\n }));\r\n return promise;\r\n}", "function reusable_fun (mtd, url, asyn) {\n let myPromise = new Promise( (resolve,reject) => {\n let xhttp = new XMLHttpRequest();\n xhttp.open(mtd, url, asyn);\n xhttp.onreadystatechange = () => {\n if(xhttp.readyState == 4 && xhttp.status == 200){\n resolve(xhttp.responseText); \n } else if (xhttp.status > 399){\n reject(xhttp.status); \n }\n };\n xhttp.send();\n });\n return myPromise;\n}", "function web3AsynWrapper(web3Fun) {\n return function (arg) {\n return new Promise((resolve, reject) => {\n web3Fun(arg, (e, data) => e ? reject(e) : resolve(data))\n })\n }\n}", "async function myFn() {\n await console.log('testing');\n}", "function async(fn, onError) {\r\n return (...args) => {\r\n Promise.resolve(true)\r\n .then(() => {\r\n fn(...args);\r\n })\r\n .catch((error) => {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "async function fetchAsyncSave(func, data) { // eslint-disable-line no-unused-vars\r\n const response = await func(data);\r\n return response;\r\n}" ]
[ "0.7155934", "0.7116087", "0.70804554", "0.68879116", "0.68725556", "0.6768867", "0.67274386", "0.6606676", "0.6605907", "0.6605907", "0.6598512", "0.6598512", "0.65512455", "0.65512455", "0.65438145", "0.65246886", "0.65200365", "0.6504154", "0.6503758", "0.64964813", "0.64964813", "0.6483301", "0.6479109", "0.64556456", "0.64556456", "0.6429379", "0.6396195", "0.6386883", "0.63645864", "0.63267416", "0.63267416", "0.6319287", "0.6319287", "0.6281248", "0.6252883", "0.62149566", "0.62022096", "0.62022036", "0.6160765", "0.6151621", "0.6132643", "0.6094765", "0.60684836", "0.6033575", "0.59865963", "0.59755045", "0.59732085", "0.59732085", "0.5970328", "0.59613806", "0.5959667", "0.5946861", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5935199", "0.5919258", "0.5889123", "0.5889005", "0.58866376", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5885406", "0.5875782", "0.5874734", "0.5871376", "0.58575416", "0.58551854", "0.58551854", "0.58551854", "0.58527726", "0.5843401", "0.5843401", "0.5827292", "0.58174425", "0.58083653", "0.57937676", "0.5777491", "0.57631606", "0.5752415", "0.5742883" ]
0.5909797
63
Return true if the object passed in implements any of the named methods.
function implementsAnyMethods(obj, methods) { if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) { return false; } for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) { var method = methods_1[_i]; if (method in obj && typeof obj[method] === 'function') { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n var object = obj;\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n var object = obj;\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n\n return false;\n }", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n\n return false;\n }", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (const method of methods) {\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t return false;\n\t }\n\t for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n\t var method = methods_1[_i];\n\t if (method in obj && typeof obj[method] === 'function') {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var method = _step.value;\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var method = _step.value;\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return false;\n}", "function checkInterface(obj, funcs) {\n for (var i = 0; i < funcs.length; ++i) {\n if (typeof obj[funcs[i]] !== 'function')\n return false;\n }\n return true;\n}", "function inPub(name, obj) {\n var t = typeof obj;\n if (!obj || (t !== 'object' && t !== 'function')) {\n throw new TypeError('invalid \"in\" operand: ' + obj);\n }\n obj = Object(obj);\n if (canReadPub(obj, name)) { return true; }\n if (canCallPub(obj, name)) { return true; }\n if ((name + '_getter___') in obj) { return true; }\n if ((name + '_handler___') in obj) { return true; }\n return false;\n }", "function supports (method) {\n return method &&\n typeof method === 'string' &&\n methods.indexOf(method.toLowerCase()) !== -1\n}", "function areHostMethods(object, properties) {\r\n\t\tfor (var i = properties.length; i--; ) {\r\n\t\t\tif ( !isHostMethod(object, properties[i]) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function $implements(that, $interface)\n {\n if (!that._interfaces || !($interface instanceof Interface)) return false;\n if (!$.isArray(that._interfaces))\n {\n $.error(\"$implements\", \"The interfaces property should be an Array: \" + that._interfaces);\n }\n\n var i, len = that._interfaces.length;\n for (i = 0; i < len; i++)\n {\n if (that._interfaces[i] === $interface) return true;\n }\n return false;\n }", "function has(obj, name) {\n\n for (; obj; obj = Object.getPrototypeOf(obj))\n if (hasOwn.call(obj, name))\n return true;\n\n return false;\n}", "implements(doesThis, implementThat) {\n const t= this.get(doesThis);\n return t && (t.with && t.with.slots && t.with.slots.indexOf(implementThat)>=0);\n }", "isAssistant(obj){\n var returnType = {'getAssistantName':'string', 'getListeningCommands':'object'};\n for (var func in returnType){\n if(typeof obj[func] != 'function' && typeof obj[func]() != returnType[func]) {\n return false;\n }\n }\n // It quacks like an assistant...\n return true;\n }", "function Vo(t) {\n /**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\n return function(t, e) {\n if (\"object\" != typeof t || null === t) return !1;\n for (var n = t, r = 0, i = [ \"next\", \"error\", \"complete\" ]; r < i.length; r++) {\n var o = i[r];\n if (o in n && \"function\" == typeof n[o]) return !0;\n }\n return !1;\n }(t);\n}", "function every(obj, call) {\n for (var i in obj) {\n if (!call(obj[i], i)) return false;\n }\n return true;\n}", "function implementsAnyMethods$1(obj,methods){if(typeof obj!=='object'||obj===null){return false;}var object=obj;for(var _i=0,methods_1=methods;_i<methods_1.length;_i++){var method=methods_1[_i];if(method in object&&typeof object[method]==='function'){return true;}}return false;}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *//**\r\n * An opaque base class for FieldValue sentinel objects in our public API,\r\n * with public static methods for creating said sentinel objects.\r\n */// tslint:disable-next-line:class-as-namespace We use this as a base class.", "function supports(method) {\r\n if (IS_ANDROID_WEBVIEW) {\r\n // Android support check\r\n return !!(androidBridge && typeof androidBridge[method] === 'function');\r\n }\r\n else if (IS_IOS_WEBVIEW) {\r\n // iOS support check\r\n return !!(iosBridge && iosBridge[method] && typeof iosBridge[method].postMessage === 'function');\r\n }\r\n else if (IS_WEB) {\r\n // Web support check\r\n return DESKTOP_METHODS.indexOf(method) > -1;\r\n }\r\n return false;\r\n }", "function mayImplement(schema, type, typeName) {\n\t var unmodifiedType = getRawType(type);\n\t return unmodifiedType.toString() === typeName || implementsInterface(unmodifiedType, typeName) || isAbstractType(unmodifiedType) && hasConcreteTypeThatImplements(schema, unmodifiedType, typeName);\n\t}", "function hasInstance(instance) {\n\n var isObjectStringOrFunction =\n is.object(instance) || is.string(instance) || is.function(instance)\n\n if (!isObjectStringOrFunction)\n return false\n\n var prototype = Object.getPrototypeOf(instance)\n if (!prototype)\n return false\n\n // test that declared members are implemented\n var iface = this\n for (var name of Object.getOwnPropertyNames(iface)) {\n var symbol = iface[name]\n if (symbol in prototype == false)\n return false \n }\n \n // test that inherited members are implemented\n iface = Object.getPrototypeOf(iface)\n for (var name of Object.getOwnPropertyNames(iface)) {\n var symbolOrSymbols = iface[name]\n\n // a name may be associated with many members\n if (is.object(symbolOrSymbols)) {\n for (var symbol of Object.getOwnPropertySymbols(symbolOrSymbols)) {\n if (symbol in prototype == false)\n return false\n }\n }\n\n else if (symbolOrSymbols in prototype == false)\n return false \n }\n\n return true\n}", "function any(func) {\n return function () {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (func.call(null, params[i])) {\n return true\n }\n }\n return false\n }\n }", "function any(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (func.call(null, params[i])) {\n return true;\n }\n }\n return false;\n };\n }", "function any(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (func.call(null, params[i])) {\n return true;\n }\n }\n return false;\n };\n }", "function any(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (func.call(null, params[i])) {\n return true;\n }\n }\n return false;\n };\n }", "static isImplementsClauseable(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Class;\r\n }", "function isMethod(sheet) {\n var name = sheet.getName();\n return !(name.search(\"All Licenses\") >= 0 || name.search(\"Instructions\") >= 0 || name.search(\"Search\") >= 0);\n}", "get hasFunction() {\n return validators_1.isFunction(this.handler);\n }", "static is()\n {\n var arg0 = arguments[0]\n var type = Tester.type(arg0)\n for (let i = 1, len = arguments.length; i < len; i++) {\n let argN = arguments[i]\n if (\n type === argN ||\n argN === 'mixed' ||\n argN === '*' ||\n Tester.type(argN) === 'function' && (\n arg0 instanceof argN ||\n // Why? Probably if the class does not have a constructor for \"this\".\n // @see @cyrhla/core/Controller/SetController\n Tester.type(arg0) === 'object' && arg0.constructor.name === argN.name\n )\n ) {\n return true\n }\n }\n\n return false\n }", "function has( object, propNames ) {\n\t\t\t\t\tfor( var i = 0; i < propNames.length; ++i ) {\n\t\t\t\t\t\tif( object.hasOwnProperty( propNames ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}", "function implements_( instance, base, options ) {\n options = options || {};\n\n var constructor = base.constructor;\n if (constructor && !(instance instanceof base)) throw new Error('not instanceof ' + base.name);\n\n var methods = options.methods || base.prototype;\n for (var m in methods) {\n if (typeof methods[m] !== typeof instance[m]) throw new Error(m + ': types differ');\n if (typeof methods[m] === 'function') {\n // if (instance.constructor.length !== base.length) throw new Error(\n // instance.constructor.name + ': constructor takes different arguments than ' + base.name);\n if (methods[m].length !== instance[m].length) throw new Error(m + ': take different arguments');\n if (instance[m].name !== m) throw new Error(m + ': different name ' + instance[m].name);\n // pure abstract methods must all be overridden\n if (methods[m].__abstract__ === true && methods[m] === instance[m]) {\n throw new Error(m + ': instance method same as Base.abstract');\n }\n }\n }\n\n return true;\n}", "static isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n }", "validateComponent() {\n let requiredFunctions = ['initSearch', 'openSearch', 'closeSearch', 'navigateUp', 'navigateDown'];\n for (var f in requiredFunctions) {\n if (typeof(this.searchComponent[requiredFunctions[f]]) != \"function\") {\n return false; }\n }\n return true;\n }", "static has (obj, name) {\n return Object.prototype.hasOwnProperty.call(obj, name);\n }", "function provides(o, c) {\n // If o actually is an instance of c, it obviously looks like c\n if (o instanceof c) return true;\n\n // If a constructor was passed instead of an object, use its prototype\n if (typeof o == \"function\") o = o.prototype;\n\n // The methods of built-in types are not enumerable, and we return \n // undefined. Otherwise any object would appear to provide any of\n // the built-in types. \n if (c == Array || c == Boolean || c == Date || c == Error ||\n c == Function || c == Number || c == RegExp || c == String)\n return undefined;\n\n var proto = c.prototype;\n for(var p in proto) { // Loop through all properties in c.prototype\n // Ignore properties that are not functions\n if (typeof proto[p] != \"function\") continue;\n // If o does not have a property by the same name return false\n if (!(p in o)) return false;\n // If that property is not a function, return false\n if (typeof o[p] != \"function\") return false;\n // If the two functions are not declared with the same number\n // of arguments return false.\n if (o[p].length != proto[p].length) return false;\n }\n // If all the methods check out, we can finally return true.\n return true;\n}", "function everyObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (!callback.call(context, object[name], name, object)) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}", "function everyObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (!callback.call(context, object[name], name, object)) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}", "function everyObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (!callback.call(context, object[name], name, object)) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}", "function isPartialObserver(obj){return implementsAnyMethods$1(obj,['next','error','complete']);}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function canCallPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canCall___']) { return true; }\n if (obj[name + '_grantCall___']) {\n fastpathCall(obj, name);\n return true;\n }\n if (!canReadPub(obj, name)) { return false; }\n if (endsWith__.test(name)) { return false; }\n if (name === 'toString') { return false; }\n var func = obj[name];\n if (!isFunc(func) && !isXo4aFunc(func)) {\n return false;\n }\n fastpathCall(obj, name);\n return true;\n }", "function isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}", "function isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}", "function isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}", "function isFunction (obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply)\n}", "_anyMethodsAreOutstanding() {\n const invokers = this._methodInvokers;\n return keys(invokers).some((id) => {\n return invokers[id].sentMessage;\n });\n }", "function isOf(obj) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n var objType = typeof obj;\n return types.some(function (t) { return t === objType; });\n }", "function nameIsIn(obj) {\n return function (name) {\n return name in obj;\n };\n }", "static IsImplementedByChecked(context, o)\n {\n let self = NJsGame.NBoard.NData.IData;\n\n check(CommonLibrary.IsValidObjectChecked(context, o));\n\n // GetTransform()\n check(self.Implements_GetTransformChecked(context, o));\n // GetLayout()\n check(self.Implements_GetLayoutChecked(context, o));\n return true;\n }", "static isMethod(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Method;\r\n }", "function isPartialObserver(obj) {\n return implementsAnyMethods$1(obj, ['next', 'error', 'complete']);\n}", "function isPartialObserver(obj) {\n return implementsAnyMethods$1(obj, ['next', 'error', 'complete']);\n}", "function isPartialObserver(obj) {\n return implementsAnyMethods$1(obj, ['next', 'error', 'complete']);\n}", "function all(func) {\n return function () {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (!func.call(null, params[i])) {\n return false\n }\n }\n return true\n }\n }", "function fnExists(/*arguments*/) {\n for (var i = 0; i < arguments.length; i++) {\n if (typeof (arguments[i]) !== \"function\") return false;\n }\n return true;\n}", "function supportsGeneric(key) {\n var support = true;\n\n // a method exists\n if (Array[key]) {\n try {\n // apply dummy arguments\n Array[key](undefined, /test/, null);\n\n // passed? implemented wrong\n support = false;\n } catch (e) {\n // do nothing\n }\n } else {\n support = false;\n }\n return support;\n }" ]
[ "0.7897867", "0.7897867", "0.7897867", "0.7887639", "0.7887639", "0.7887639", "0.7887639", "0.78607833", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.7840518", "0.78380656", "0.78380656", "0.78380656", "0.78259933", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.78231764", "0.7797774", "0.77608955", "0.775911", "0.7606874", "0.74012506", "0.74012506", "0.6410919", "0.6127238", "0.61130726", "0.6081573", "0.6076459", "0.60658234", "0.5758349", "0.575578", "0.57386374", "0.56959844", "0.567863", "0.5676378", "0.56508934", "0.56298405", "0.5591837", "0.5541405", "0.5541405", "0.5541405", "0.5528431", "0.5508616", "0.55043006", "0.5502393", "0.54888564", "0.54755217", "0.546586", "0.54586387", "0.5436765", "0.54232675", "0.54145336", "0.54145336", "0.54145336", "0.54055107", "0.53715557", "0.53715557", "0.53715557", "0.5369772", "0.53481305", "0.53481305", "0.53481305", "0.5341331", "0.5337768", "0.5331136", "0.53181493", "0.5304193", "0.529049", "0.52840686", "0.52840686", "0.52840686", "0.5252218", "0.5245049", "0.5236812" ]
0.77802324
43
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n if (each.score >= 0.4) {\n objectDescription = objectDescription + \", \" + each.class\n }\n })\n tj.speak(\"The objects I see are: \" + objectDescription)\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function like (data, archetype) {\n var name;\n\n for (name in archetype) {\n if (archetype.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], archetype[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "function LanguageUnderstandingModel() {\n }", "function guess() {\n classifier.predict(video.elt, 5, gotResult);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)})}", "function NXObject() {}", "function isPrimative(val) { return (typeof val !== 'object') }", "function like (data, duck) {\n var name;\n\n assert.object(data);\n assert.object(duck);\n\n for (name in duck) {\n if (duck.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof duck[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], duck[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}", "function testSimpleHole_prototype() {\n var theHole = Object.create({ x: \"in proto\" });\n var theReplacement = \"yay\";\n var serialized = bidar.serialize(theHole, holeFilter);\n var parsed = bidar.parse(serialized, holeFiller);\n\n assert.equal(parsed, theReplacement);\n\n function holeFilter(x) {\n assert.equal(x, theHole);\n return { data: \"blort\" };\n }\n\n function holeFiller(x) {\n assert.equal(x, \"blort\");\n return theReplacement;\n }\n}", "function test() {\n\t// \"ex nihilo\" object creation using the literal\n\t// object notation {}.\n\tvar foo = {\n\t\tname : \"foo\",\n\t\tone : 1,\n\t\ttwo : 2\n\t};\n\n\t// Another \"ex nihilo\" object.\n\tvar bar = {\n\t\ttwo : \"two\",\n\t\tthree : 3\n\t};\n\n\t// Gecko and Webkit JavaScript engines can directly\n\t// manipulate the internal prototype link.\n\t// For the sake of simplicity, let us pretend\n\t// that the following line works regardless of the\n\t// engine used:\n\tbar.__proto__ = foo; // foo is now the prototype of bar.\n\n\t// If we try to access foo's properties from bar\n\t// from now on, we'll succeed.\n\tlog(bar.one) // Resolves to 1.\n\n\t// The child object's properties are also accessible.\n\tlog(bar.three) // Resolves to 3.\n\n\t// Own properties shadow prototype properties\n\tlog(bar.two); // Resolves to \"two\"\n\tlog(foo.name); // unaffected, resolves to \"foo\"\n\tlog(bar.name); // Resolves to \"foo\"\n log(foo.__proto__);\n}", "function wrappedPrimitivePreviewer(className, classObj, objectActor, grip) {\r\n let {_obj} = objectActor;\r\n\r\n if (!_obj.proto || _obj.proto.class != className) {\r\n return false;\r\n }\r\n\r\n let raw = _obj.unsafeDereference();\r\n let v = null;\r\n try {\r\n v = classObj.prototype.valueOf.call(raw);\r\n } catch (ex) {\r\n // valueOf() can throw if the raw JS object is \"misbehaved\".\r\n return false;\r\n }\r\n\r\n if (v === null) {\r\n return false;\r\n }\r\n\r\n let canHandle = GenericObject(objectActor, grip, className === \"String\");\r\n if (!canHandle) {\r\n return false;\r\n }\r\n\r\n grip.preview.wrappedValue = objectActor.getGrip(makeDebuggeeValueIfNeeded(_obj, v));\r\n return true;\r\n}", "function DartObject(o) {\n this.o = o;\n}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "constructor(spec) {\n this.cached = /* @__PURE__ */ Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType$1.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = /* @__PURE__ */ Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = /* @__PURE__ */ Object.create(null);\n }", "wordClass(word) {\r\n return {\r\n der: word.artikel == \"der\",\r\n die: word.artikel == \"die\",\r\n das: word.artikel == \"das\",\r\n marked: word.marker\r\n }\r\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "constructor() { \n \n Like.initialize(this);\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "added(vrobject){}", "classify(phrase) { return this.clf.classify(phrase) }", "function badIdea(){\n this.idea = \"bad\";\n}", "shouldSerialize(prop, dataKey) {\n const contains = (str, re) => (str.match(re) || []).length > 0;\n const a = contains(dataKey, /\\./g);\n const b = contains(dataKey, /\\[/g);\n return !!prop.object && !(a || b);\n }", "static get observedAttributes(){this.finalize();const e=[];// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nreturn this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}", "function oldAndLoud(object){\n\tobject.age++;\n\tobject.name = object.name.toUpperCase();\n}", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "function classifyPose() {\n if (pose && working) {\n inputs = [];\n for (let i = 0; i < pose.landmarks.length; i++) {\n inputs.push(pose.landmarks[i][0]);\n inputs.push(pose.landmarks[i][1]);\n inputs.push(pose.landmarks[i][2]);\n }\n brain.classify(inputs, gotResult)\n }\n }", "function PropertyDetection() {}", "constructor()\n {\n this.likes = [];\n }", "async TestLikeDoctorPost(){\n var response = await entity.Likes(6,28,true,true);\n //console.log(response)\n if(response != null){\n console.log(\"\\x1b[32m%s\\x1b[0m\",\"TestDOctorRating Passed\");\n }else{\n console.log(\"\\x1b[31m%s\\x1b[0m\",\"TestDOctorRating Failed\");\n }\n\n }", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function Nevis() {}", "function Nevis() {}", "function Nevis() {}", "test_primitivesExtended() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitivesExtended);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.PrimitivesExtended\", object.constructor.__getClass());\n Assert.equals(\"alpha16\", object.string);\n }", "function buildObjectsObj(gCloudV, azureCV, minScore = 0.0){\n let objects = [];\n\n if(gCloudV) {// gcloud vision results are available\n let gCloudObjects = gCloudV['localizedObjectAnnotations'];\n\n //apply standard bounding box to all the detected objects\n if(azureCV)// azure computer vision results are available\n gCloudVObjsToCogniBoundingBox(gCloudObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n\n else//need to retrieve image sizes from gcloud (already done and put in the metadata tag of gcloudv with appropriate calls)\n gCloudVObjsToCogniBoundingBox(gCloudObjects, gCloudV['metadata']['width'], gCloudV['metadata']['height']);\n\n for (let gCloudObj of gCloudObjects) {\n if (gCloudObj['score'] > minScore) { //filter out unwanted tags\n objects.push({\n name: gCloudObj['name'],\n mid: (gCloudObj['mid'] && gCloudObj['mid']!= '')? gCloudObj['mid']: undefined,\n confidence: gCloudObj['score'],\n boundingBox: gCloudObj['boundingBox']\n });\n }\n }\n }\n\n if(azureCV){// azure computer vision results are available\n let azureObjects = azureCV['objects'];\n //apply standard bounding box to all the detected objects\n azureCVObjsToCogniBoundingBox(azureObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n for(let aObj of azureObjects){\n if(aObj['confidence'] > minScore) { //filter out unwanted tags\n objects.push({\n name: aObj['object'],\n confidence: aObj['confidence'],\n boundingBox: aObj['boundingBox']\n });\n }\n }\n }\n\n objects = combineObjectsArray(objects);// build an array where labels regarding the same exact object are combined with averaged confidence\n\n objects.sort((a, b) => {\n if(a['confidence']>b['confidence'])\n return -1;\n else if(a['confidence']==b['confidence'])\n return 0;\n else\n return 1;\n });\n\n return objects;\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function classifyVideo() {\r\n classifier.classify(vid, gotResult);\r\n\r\n}", "function test_nountag_does_not_think_it_has_watch_tag_when_it_does_not() {\n Assert.equal(TagNoun.fromJSON(\"watch\"), undefined);\n}", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "transient private internal function m185() {}", "function rekognizeLabels(bucket, key) {\n let params = {\n Image: {\n S3Object: {\n Bucket: bucket,\n Name: key\n }\n },\n MaxLabels: 3,\n MinConfidence: 80\n };\n\n return rekognition.detectLabels(params).promise()\n}", "test_doNotRetainAnno(){\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.doNotRetainAnno);\n let object1 = translator.decode(text).getRoot();\n let object2 = translator.decode(text).getRoot();\n\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object1.constructor.__getClass());\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object2.constructor.__getClass());\n Assert.notEquals(object1, object2);\n }", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function OOPExample(who) {\n this.me = who;\n}", "getLikes(state, data) {\n state.likes = data\n }", "function _isAlternativeRecognitionResult(obj) {\r\n return obj && typeof obj === 'object';\r\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function LiteralObject() {\r\n}", "function Komunalne() {}", "function Bevy() {}", "function Prediction() {\n this.score = {};\n}", "function Object() {}", "function Object() {}", "function canEnumPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canEnum___']) { return true; }\n if (endsWith__.test(name)) { return false; }\n if (!isJSONContainer(obj)) { return false; }\n if (!myOriginalHOP.call(obj, name)) { return false; }\n fastpathEnum(obj, name);\n if (name === 'toString') { return true; }\n fastpathRead(obj, name);\n return true;\n }", "function Obj(){ return Literal.apply(this,arguments) }", "test_primitives() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitives);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.Primitives\", object.constructor.__getClass());\n Assert.equals(\"alpha9\", object.string);\n }", "function hello()\n{\n /* ATTRIBUTES */\n this.coolbeans = 'class';\n this.something = 'hello-class';\n\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "constructor(papa,mummy,sivlings,belongs,loving_bro,favs_bro){\n super(papa,mummy,sivlings,belongs)\n this.loving_bro=loving_bro\n this.favs_bro=favs_bro\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol[\"a\" /* default */]) {\n classObject.prototype[nodejsCustomInspectSymbol[\"a\" /* default */]] = fn;\n }\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function dist_index_esm_contains(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}", "function isRawPostcodeObject(o, additionalAttr, blackListedAttr) {\n\tif (!additionalAttr) additionalAttr = [];\n\tif (!blackListedAttr) blackListedAttr = [];\n\tisSomeObject(o, rawPostcodeAttributes, additionalAttr, blackListedAttr);\n}", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "function Animal() {\n this.kind = \"Dog\"\n}", "function Kitten(name, photo, interests, isGoodWithKids, isGoodWithDogs, isGoodWithCats) {\n this.name = name;\n this.photo = photo;\n this.interests = interests;\n this.isGoodWithKids = isGoodWithKids;\n this.isGoodWithCats = isGoodWithCats;\n this.isGoodWithDogs = isGoodWithDogs;\n}", "getMeta () {\n }", "function np(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function Obj() {}", "function isFriend(name, object) {\n//use hasWord function to check object names array\n// console.log(object);\n// console.log(name);\n//conditional to check for property\nif (object['friends'] !== undefined) {\nreturn hasWord(object.friends.join(' '), name);\n}\nelse {return false};\n \n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function Person(saying) {\n this.saying = saying;\n /*\n return {\n dumbObject: true\n }\n */\n}", "transient private protected internal function m182() {}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function Surrogate(){}", "function Surrogate(){}", "function Surrogate(){}", "static serialize(obj, allowPrimitives, fallbackToJson, requireJsonType = false) {\n if (allowPrimitives) {\n if (typeof obj === \"string\") {\n return this.serializePrimitive(obj, \"string\");\n } else if (typeof obj === \"number\") {\n return this.serializePrimitive(obj, \"double\");\n } else if (Buffer.isBuffer(obj)) {\n return this.serializePrimitive(obj, \"bytes\");\n } else if (typeof obj === \"boolean\") {\n return this.serializePrimitive(obj, \"bool\");\n } else if (Long.isLong(obj)) {\n return this.serializePrimitive(obj, \"int64\");\n }\n }\n if (obj.constructor && typeof obj.constructor.encode === \"function\" && obj.constructor.$type) {\n return Any.create({\n // I have *no* idea why it's type_url and not typeUrl, but it is.\n type_url: \"type.googleapis.com/\" + AnySupport.fullNameOf(obj.constructor.$type),\n value: obj.constructor.encode(obj).finish()\n });\n } else if (fallbackToJson && typeof obj === \"object\") {\n let type = obj.type;\n if (type === undefined) {\n if (requireJsonType) {\n throw new Error(util.format(\"Fallback to JSON serialization supported, but object does not define a type property: %o\", obj));\n } else {\n type = \"object\";\n }\n }\n return Any.create({\n type_url: CloudStateJson + type,\n value: this.serializePrimitiveValue(stableJsonStringify(obj), \"string\")\n });\n } else {\n throw new Error(util.format(\"Object %o is not a protobuf object, and hence can't be dynamically \" +\n \"serialized. Try passing the object to the protobuf classes create function.\", obj));\n }\n }" ]
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992", "0.46990207", "0.4690639", "0.46904448", "0.46862254", "0.46716532", "0.46667543", "0.46522382", "0.46354175", "0.46053663", "0.46017453", "0.45926702", "0.45891586", "0.45877746", "0.458541", "0.45851982", "0.45847243", "0.4584686", "0.458378", "0.45767823", "0.45753202", "0.45753202", "0.45753202", "0.45713404", "0.45637134", "0.45637134", "0.4557141", "0.4557141", "0.4557141", "0.45494914", "0.45366898", "0.45342454", "0.4533338", "0.45322663", "0.45229813", "0.452288", "0.452288", "0.45159692", "0.45102093", "0.45099118", "0.45062032", "0.4506134", "0.45033473", "0.4502599", "0.44998378", "0.4497197", "0.44843012", "0.44764578", "0.44738895", "0.44715428", "0.44715428", "0.4471341", "0.44594073", "0.44552016", "0.44538808", "0.44522536", "0.44464657", "0.44464657", "0.4443469", "0.4443427", "0.44433454", "0.4437557", "0.4436382", "0.4430658", "0.4429719", "0.4428169", "0.44260293", "0.4420813", "0.44155774", "0.44130567", "0.4406073", "0.4401904", "0.44010627", "0.43994573", "0.43948644", "0.43847254", "0.43847254", "0.43830302", "0.43830302", "0.43830302", "0.4381413" ]
0.0
-1
Take a potentially misbehaving resolver function and make sure onFulfilled and onRejected are only called once. Makes no guarantees about asynchrony.
function doResolve(fn, self) { var done = false; try { fn(function (value) { if (done) return; done = true; resolve(self, value); }, function (reason) { if (done) return; done = true; reject(self, reason); }); } catch (ex) { if (done) return; done = true; reject(self, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n onRejected(ex);\n }\n }", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function(value) {\n if (done) return\n done = true\n onFulfilled(value)\n }, function(reason) {\n if (done) return\n done = true\n onRejected(reason)\n })\n } catch (ex) {\n if (done) return\n done = true\n onRejected(ex)\n }\n }", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done)\n return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done)\n return;\n done = true;\n onRejected(reason);\n });\n }\n catch (ex) {\n console.error(ex);\n if (done)\n return;\n done = true;\n onRejected(ex);\n }\n }", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n onRejected(ex);\n }\n }", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\t\tvar done = false;\n\t\t\ttry {\n\t\t\t\tfn(function (value) {\n\t\t\t\t\tif (done) return;\n\t\t\t\t\tdone = true;\n\t\t\t\t\tonFulfilled(value);\n\t\t\t\t}, function (reason) {\n\t\t\t\t\tif (done) return;\n\t\t\t\t\tdone = true;\n\t\t\t\t\tonRejected(reason);\n\t\t\t\t})\n\t\t\t} catch (ex) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(ex);\n\t\t\t}\n\t\t}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return\n done = true\n onFulfilled(value)\n }, function (reason) {\n if (done) return\n done = true\n onRejected(reason)\n })\n } catch (ex) {\n if (done) return\n done = true\n onRejected(ex)\n }\n}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return\n done = true\n onFulfilled(value)\n }, function (reason) {\n if (done) return\n done = true\n onRejected(reason)\n })\n } catch (ex) {\n if (done) return\n done = true\n onRejected(ex)\n }\n}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return\n done = true\n onFulfilled(value)\n }, function (reason) {\n if (done) return\n done = true\n onRejected(reason)\n })\n } catch (ex) {\n if (done) return\n done = true\n onRejected(ex)\n }\n}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return\n done = true\n onFulfilled(value)\n }, function (reason) {\n if (done) return\n done = true\n onRejected(reason)\n })\n } catch (ex) {\n if (done) return\n done = true\n onRejected(ex)\n }\n}", "function doResolve (fn, onFulfilled, onRejected) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t onFulfilled(value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t onRejected(reason);\n\t })\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t onRejected(ex);\n\t }\n\t }", "async function exampleRejectedAfterResolve() {\n try {\n return await new Promise((resolve, reject) => {\n resolve('exampleRejectedAfterResolve > First call');\n reject('exampleRejectedAfterResolve > Swallowed reject');\n });\n } catch {\n throw new Error('exampleRejectedAfterResolve > Failed');\n }\n}", "async function exampleResolvedMoreThanOnce() {\n try {\n return await new Promise((resolve, reject) => {\n resolve('exampleResolvedMoreThanOnce > First call');\n resolve('exampleResolvedMoreThanOnce > Swallowed resolve');\n });\n } catch {\n throw new Error('exampleResolvedMoreThanOnce > Failed');\n }\n}", "function doResolve(promise, fn, onFulfilled, onRejected) {\r\n var done = false;\r\n try {\r\n fn(function Promise_resolve(value) {\r\n if (done) return;\r\n done = true;\r\n onFulfilled(value);\r\n }, function Promise_reject(reason) {\r\n if (done) return promise._catched;\r\n done = true;\r\n return onRejected(reason);\r\n });\r\n } catch (ex) {\r\n if (done) return;\r\n return onRejected(ex);\r\n }\r\n}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "async function exampleRejectedMoreThanOnce() {\n try {\n return await new Promise((resolve, reject) => {\n reject('exampleRejectedMoreThanOnce > First call');\n reject('exampleRejectedMoreThanOnce > Swallowed reject');\n });\n } catch {\n throw new Error('exampleRejectedMoreThanOnce > Failed');\n }\n}", "function doResolve(fn,self){var done=false;try{fn(function(value){if(done)return;done=true;resolve(self,value);},function(reason){if(done)return;done=true;reject(self,reason);});}catch(ex){if(done)return;done=true;reject(self,ex);}}", "function doResolve(fn,self){var done=false;try{fn(function(value){if(done)return;done=true;resolve(self,value);},function(reason){if(done)return;done=true;reject(self,reason);});}catch(ex){if(done)return;done=true;reject(self,ex);}}", "_propagateFulfilled() {\n this._thenQueue.forEach(([controlledPromise, fulfilledFn]) => {\n if (typeof fulfilledFn === \"function\") {\n const valueOrPromise = fulfilledFn(this._value);\n\n // if valueOrPromise is a Promise\n if (isThenable(valueOrPromise)) {\n valueOrPromise.then(\n value => controlledPromise._onFulfilled(value),\n reason => controlledPromise._onRejected(reason)\n );\n } else {\n controlledPromise._onFulfilled(valueOrPromise);\n }\n } else {\n // if no fulfilledFn provided\n return controlledPromise._onFulfilled(this._value);\n }\n });\n this._finallyQueue.forEach(([controlledPromise, sideEffectFn]) => {\n sideEffectFn();\n controlledPromise._onFulfilled(this._value);\n });\n\n this._thenQueue = [];\n this._finallyQueue = [];\n }", "function resolveFuture(g, h) {\n started = true\n return f( function(a) { rejected = true\n value = a\n invokePending('rejected', a)\n return g(a) }\n\n , function(b) { resolved = true\n value = b\n invokePending('resolved', b)\n return h(b) })\n }", "function PromiseResolveFunction() {\n var F = function(resolution) {\n console.assert(Type(F['[[Promise]]']) === 'object');\n var promise = F['[[Promise]]'];\n var alreadyResolved = F['[[AlreadyResolved]]'];\n if (alreadyResolved['[[value]]']) return undefined;\n set_internal(alreadyResolved, '[[value]]', true);\n\n if (SameValue(resolution, promise)) {\n var selfResolutionError = TypeError();\n return RejectPromise(promise, selfResolutionError);\n }\n if (Type(resolution) !== 'object')\n return FulfillPromise(promise, resolution);\n try {\n var then = resolution['then'];\n } catch(then) {\n return RejectPromise(promise, then);\n }\n if (!IsCallable(then))\n return FulfillPromise(promise, resolution);\n EnqueueJob('PromiseJobs', PromiseResolveThenableJob, [promise, resolution, then]);\n return undefined;\n };\n return F;\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(\n\t function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t },\n\t function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t }\n\t );\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "then(onResolve = function(r) { return r }, onReject = function(e) { throw e }) { return this.wrapped.then(resolve => {\n\t\tif (resolve instanceof Try)\n\t\t\treturn resolve.match(s => onResolve(s), e => onReject(e));\n\t\telse\n\t\t\treturn onResolve(resolve);\n\t}, onReject) }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\r\n\t var done = false;\r\n\t try {\r\n\t fn(function (value) {\r\n\t if (done) return;\r\n\t done = true;\r\n\t resolve(self, value);\r\n\t }, function (reason) {\r\n\t if (done) return;\r\n\t done = true;\r\n\t reject(self, reason);\r\n\t });\r\n\t } catch (ex) {\r\n\t if (done) return;\r\n\t done = true;\r\n\t reject(self, ex);\r\n\t }\r\n\t }", "function doResolve(fn, self) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tresolve(self, value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\treject(self, reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\treject(self, ex);\n\t\t}\n\t}", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(self, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(self, reason);\n\t });\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t reject(self, ex);\n\t }\n\t }", "function doResolve(fn, self) {\n var done = false;\n\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\nvar done = false;\ntry {\nfn(function (value) {\nif (done) return;\ndone = true;\nresolve(self, value);\n}, function (reason) {\nif (done) return;\ndone = true;\nreject(self, reason);\n});\n} catch (ex) {\nif (done) return;\ndone = true;\nreject(self, ex);\n}\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) { return; }\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) { return; }\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) { return; }\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) { return; }\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) { return; }\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) { return; }\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) { return; }\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) { return; }\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) { return; }\n done = true;\n reject(self, ex);\n }\n}", "function PromiseResolveFunction () {\n var F = function (resolution) {\n console.assert(Type(F['[[Promise]]']) === 'object')\n var promise = F['[[Promise]]']\n var alreadyResolved = F['[[AlreadyResolved]]']\n if (alreadyResolved['[[value]]']) return undefined\n set_internal(alreadyResolved, '[[value]]', true)\n\n if (SameValue(resolution, promise)) {\n var selfResolutionError = TypeError()\n return RejectPromise(promise, selfResolutionError)\n }\n if (Type(resolution) !== 'object') { return FulfillPromise(promise, resolution) }\n try {\n var then = resolution['then']\n } catch (then) {\n return RejectPromise(promise, then)\n }\n if (!IsCallable(then)) { return FulfillPromise(promise, resolution) }\n EnqueueJob('PromiseJobs', PromiseResolveThenableJob, [promise, resolution, then])\n return undefined\n }\n return F\n }", "function doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return\n done = true\n promise._82(value)\n }, function (reason) {\n if (done) return\n done = true\n promise._67(reason)\n })\n if (!done && res === IS_ERROR) {\n done = true\n promise._67(LAST_ERROR)\n }\n}", "async function resolve (callee, f, options, vargs) {\n try {\n try {\n if (typeof f == 'function') {\n f = f()\n }\n } catch (error) {\n throw construct(Class.options(options, { errors: [ error ] }), vargs, callee)\n }\n const result = await f\n if (Interrupt.auditing) {\n construct(Class.options(options, { errors: [ AUDIT ] }), vargs, resolve)\n }\n return result\n } catch (error) {\n throw construct(Class.options(options, { errors: [ error ] }), vargs, resolve)\n }\n }", "function catchFunc(onRejected) {\n return this.then(undefined, onRejected);\n }", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }", "function doResolve(fn, self) {\n var done = false;\n\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}", "function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done)\n return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done)\n return;\n done = true;\n reject(self, reason);\n });\n }\n catch (ex) {\n if (done)\n return;\n done = true;\n reject(self, ex);\n }\n }", "async function exampleResolveAfterReject() {\n try {\n return await new Promise((resolve, reject) => {\n reject('exampleResolveAfterReject > First call');\n resolve('exampleResolveAfterReject > Swallowed reject');\n });\n } catch {\n throw new Error('exampleResolveAfterReject > Failed');\n }\n}", "function primjer7() {\n Promise.resolve()\n .then(() => {\n // Makes .then() return a rejected promise\n throw 'Oh no!';\n })\n .catch(reason => {\n console.error('onRejected function called: ' + reason);\n })\n .then(() => {\n console.log(\"I am always called even if the prior then's promise rejects\");\n });\n}", "function doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n }", "stateChangeHandlerFulfilled(event, actionId) {\n if (this.stateChangeHandlersReservations[event] === undefined ||\n this.stateChangeHandlers[event] === undefined) {\n let err = \"\";\n if (this.stateChangeHandlersReservations[event] === undefined) {\n err += `No promise reservation for event=${event}. `;\n }\n if (this.stateChangeHandlers[event] === undefined) {\n err += `No handler for event=${event}. `;\n }\n logger.error(new StateChangeHandlerReserved_1.StateChangeHandlerReservedException(this.logCtx(actionId, event, err)));\n }\n this.stateChangeHandlersReservations[event] = undefined;\n this.stateChangeHandlers[event] = undefined;\n }", "function resolveWrapper(nRes, nRej, pResFn) {\n return function (value) {\n if (!isFunction(pResFn)) {\n return nRes(value)\n }\n\n try {\n var ret = pResFn(value)\n if (isThenable(ret)) {\n ret.then(nRes, nRej)\n } else {\n nRes(ret)\n }\n } catch (e) {\n nRej(e)\n }\n }\n}" ]
[ "0.7080868", "0.70743054", "0.7044705", "0.7042484", "0.7042484", "0.7042484", "0.7034746", "0.7033968", "0.7033968", "0.7033968", "0.7033968", "0.7033968", "0.7017375", "0.6962614", "0.6962614", "0.6962614", "0.6962614", "0.6810403", "0.62816465", "0.6168662", "0.60255283", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.60190594", "0.58535635", "0.57867837", "0.57867837", "0.5771561", "0.57160866", "0.5714326", "0.57094556", "0.57070506", "0.57007915", "0.5699047", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.56790084", "0.5671264", "0.566901", "0.5668694", "0.5661588", "0.5661588", "0.5661588", "0.5661588", "0.5661588", "0.5661588", "0.5652683", "0.5652683", "0.5652683", "0.5630363", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.5624343", "0.56220746", "0.56211984", "0.56211984", "0.56193715", "0.5614779", "0.5614017", "0.5610252", "0.56009585", "0.55978596", "0.55859697", "0.5557733", "0.552582", "0.5510569", "0.5478323", "0.54771405" ]
0.5627307
73
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function u(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray$1(obj);\n}", "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function is(obj) {\n return obj instanceof __WEBPACK_IMPORTED_MODULE_3__Range__[\"c\" /* default */];\n}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function _isPlainObject(obj) {\n return (obj && obj.constructor.prototype === Object.prototype);\n}", "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "function isObject(obj) { // 71\n\t\treturn toString.call(obj) === '[object Object]'; // 72\n\t} // 73", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "isObject(obj) {\n return obj !== null && typeof obj === 'object'\n }", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObjectLike(value) {\n return _typeof$1(value) == 'object' && value !== null;\n }", "function isObjectLike$a(value) {\n return typeof value == 'object' && value !== null;\n}", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "static hasObjectify(object) {\n return isObjectAssigned(object) && isFunction(object.objectify);\n }", "function isObjectLike(value) {\n return typeof value === \"object\" && !!value;\n}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObject(obj) {\n return obj === Object(obj);\n}", "function isObject(entry) {\n return entry.constructor === Object;\n}", "function isObject(obj) {\n return obj === Object(obj);\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "__key_in_object(object, key) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n return true\n } else {\n return false\n }\n }", "function utilIsIterable(obj) {\n\t\treturn obj != null && typeof obj[Symbol.iterator] === 'function'; // lazy equality for null\n\t}", "function isObjectLike(value) {\n return value != null && (typeof value === \"function\" || typeof value === \"object\");\n}", "function isObjectLike(obj) {\n return typeof obj === \"object\" && obj !== null;\n}", "function isObject (o) { return o && typeof o === 'object' }", "function isObject (o) { return o && typeof o === 'object' }", "function isObject$8(val) {\n return kindOf$3(val) === 'object' || typeof val === 'function';\n}", "function isObject(obj){\n return Object.prototype.toString.call(obj) == '[object Object]';\n }", "function isObject$1(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function isObject(value) { return typeof value === \"object\" && value !== null; }", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "function isObject(a) {\n return (!!a) && (a.constructor === Object);\n}", "function isObject(o){ return typeof o === 'object' && o !== null; }", "function isObject$2556(x$2572) {\n return function isObject$2556(x$2573) {\n return function (a0$2574) {\n if (Object.prototype.toString.call(a0$2574) === '[object Object]') {\n return true;\n }\n return false;\n }.call(this, x$2573);\n }.curry().apply(null, arguments);\n }", "function isObject(obj) {\n\n return obj && typeof obj === \"object\";\n}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "function isObject(x) {\n return x != null && typeof x === 'object';\n}", "function objectHasEnumerableKeys(value) {\n for (const _ in value) return true;\n return false;\n}", "function isObject(o) {\n return o === Object(o);\n}", "function isObject( x ) {\n return typeof x === \"object\" && x !== null;\n }", "function isFrozen(obj) {\n if (!obj) { return true; }\n // TODO(erights): Object(<primitive>) wrappers should also be\n // considered frozen.\n if (obj.FROZEN___ === obj) { return true; }\n var t = typeof obj;\n return t !== 'object' && t !== 'function';\n }", "function isIterableObject(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n var t = typeof(obj);\n var types = {'string': 0, 'function': 0, 'number': 0, 'undefined': 0, 'boolean': 0};\n return types[t] === undefined;\n}", "function isObject(x) {\n return typeof x === \"object\" && x !== null;\n}", "function isObject$1(value) {\n return _typeof_1(value) === \"object\" && value !== null;\n}", "function isObject$1(value) {\n return _typeof_1(value) === \"object\" && value !== null;\n}", "function isObject(value) {\n return typeof value === 'object' && !!value;\n}", "function isObject$1(value) {\n return typeof value === 'object' && value !== null || typeof value === 'function';\n }", "function isObject(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject(e){return Object.prototype.toString.call(e)===\"[object Object]\"}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject$1(obj) {\n return obj !== null && _typeof(obj) === 'object' && 'constructor' in obj && obj.constructor === Object;\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject(value) {\n return value && typeof value === 'object';\n}", "function isObject$2(value) {\n return (\n typeof value === \"object\" &&\n value !== null &&\n // none of these are collection objects, so we can return false\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Error) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)\n );\n}", "function isObject$2(value) {\n return (\n typeof value === \"object\" &&\n value !== null &&\n // none of these are collection objects, so we can return false\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Error) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)\n );\n}", "function checkIfObject(obj) {\n if (obj === null || typeof obj === \"function\") return false;\n return typeof obj === \"object\";\n}" ]
[ "0.67325807", "0.66350085", "0.6609975", "0.66011983", "0.65996516", "0.65650445", "0.6507408", "0.64692605", "0.64640933", "0.6412933", "0.6371315", "0.63672847", "0.63672847", "0.63672847", "0.63672847", "0.6358507", "0.632842", "0.6323558", "0.63232696", "0.62977177", "0.62977177", "0.62977177", "0.6294345", "0.62917095", "0.62868214", "0.62868214", "0.62868214", "0.62868214", "0.62868214", "0.62868214", "0.62868214", "0.6272754", "0.62520915", "0.6247392", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242511", "0.6242475", "0.6238584", "0.623807", "0.623528", "0.6232999", "0.6232999", "0.62304604", "0.6221081", "0.6198808", "0.6195662", "0.61908364", "0.61908364", "0.61908364", "0.61908364", "0.61908364", "0.61862314", "0.61567825", "0.6155048", "0.6147201", "0.6143176", "0.61393505", "0.61278033", "0.61275464", "0.6113502", "0.6109564", "0.6099619", "0.60868335", "0.60852075", "0.60845447", "0.60845447", "0.6084457", "0.60797036", "0.6078062", "0.60666287", "0.6061818", "0.6061818", "0.6057741", "0.605657", "0.605657", "0.605657", "0.605657", "0.605657", "0.605657", "0.605657", "0.605289", "0.605151", "0.605151", "0.605151", "0.6043993", "0.6043474", "0.6043474", "0.6039936", "0.60358256", "0.60358256", "0.6035196" ]
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\n type = type.match(/^\\[.+ (.+)\\]$/),\n type = type[1],\n type = type.toLowerCase()\n\n if (types.indexOf(type) !== -1) {\n return type\n }\n\n return typeof arg\n }", "function AsYouType_typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { AsYouType_typeof = function _typeof(obj) { return typeof obj; }; } else { AsYouType_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return AsYouType_typeof(obj); }", "function type(input) {\n \treturn typeof input\n}", "function _typeof$1(obj) {\n\t \"@babel/helpers - typeof\";\n\n\t return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n\t return typeof obj;\n\t } : function (obj) {\n\t return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n\t }, _typeof$1(obj);\n\t}", "function _typeOf ( value )\n\t{\n\t\tvar type;\n\n\t\ttype = typeof value;\n\t\tif ( type === \"number\" )\n\t\t{\n\t\t\tif ( isNaN( value ) )\n\t\t\t{\n\t\t\t\ttype = \"NaN\";\n\t\t\t}\n\t\t}\n\t\telse if ( type === \"object\" )\n\t\t{\n\t\t\tif ( value )\n\t\t\t{\n\t\t\t\tif ( value instanceof Array )\n\t\t\t\t{\n\t\t\t\t\ttype = \"array\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttype = \"null\";\n\t\t\t}\n\t\t}\n\n\t\treturn type;\n\t}", "function _typeOf ( value )\n\t{\n\t\tvar type;\n\n\t\ttype = typeof value;\n\t\tif ( type === \"number\" )\n\t\t{\n\t\t\tif ( isNaN( value ) )\n\t\t\t{\n\t\t\t\ttype = \"NaN\";\n\t\t\t}\n\t\t}\n\t\telse if ( type === \"object\" )\n\t\t{\n\t\t\tif ( value )\n\t\t\t{\n\t\t\t\tif ( value instanceof Array )\n\t\t\t\t{\n\t\t\t\t\ttype = \"array\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttype = \"null\";\n\t\t\t}\n\t\t}\n\n\t\treturn type;\n\t}", "function typeStr (obj) {\n\t return isArray(obj) ? 'array' : typeof obj;\n\t }", "function typeStr (obj) {\n\t return isArray(obj) ? 'array' : typeof obj;\n\t }", "function getType(data) {\n return typeof data;\n}", "function $type(obj) {\n if (obj == undefined) return false;\n\n if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name;\n if (obj.nodeName){\n switch (obj.nodeType) {\n case 1: return 'element';\n case 9: return 'window';\n case 3: return (/\\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace';\n }\n } else if (obj.window) {\n return 'element';\n } else if (typeof obj.length == 'number') {\n if (obj.callee) {\n return 'arguments';\n } else if (obj.item) {\n return 'collection';\n }\n }\n return typeof obj;\n}", "function _typeof(t){return(_typeof=\"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})(t)}", "function _typeof(t){return(_typeof=\"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})(t)}", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function $type(obj) {\r\n\t\tif (obj.nodeType) {\r\n\t\t\tswitch(obj.nodeType) {\r\n\t\t\t\tcase 1: return \"element\"; break;\r\n\t\t\t\tcase 3: return \"textnode\"; break;\r\n\t\t\t\tcase 9: return \"document\"; break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.item && obj.length) return \"collection\";\r\n\t\tif (obj.nodeName) return obj.nodeName;\r\n\t\tif (obj.sort) return \"array\";\r\n\t\treturn typeof(obj);\r\n\t}", "function getType(arg) {\n return typeof arg;\n}", "function whatDatatype(arg){\n return typeof(arg);\n}", "function typeOf(b){var a=typeof b;if(a===\"object\"){if(b){if(typeof b.length===\"number\"&&!(b.propertyIsEnumerable(\"length\"))&&typeof b.splice===\"function\"){a=\"array\"}}else{a=\"null\"}}return a}", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }", "function typeStr (obj) {\r\n return isArray(obj) ? 'array' : typeof obj;\r\n }", "function typeOf(value) {\n\tvar s = typeof value;\n\tif (s === 'object') {\n\t\tif (value) {\n\t\t\tif (typeof value.length === 'number' &&\n\t\t\t\t\t!(value.propertyIsEnumerable('length')) &&\n\t\t\t\t\ttypeof value.splice === 'function') {\n\t\t\t\ts = 'array';\n\t\t\t}\n\t\t} else {\n\t\t\ts = 'null';\n\t\t}\n\t}\n\treturn s;\n}", "function whatsTheTypeOf(input) {\n return typeof input ; //returns the type information as a string\n}", "function type(value){\n return (\n Array.isArray(value) ? \"array\" :\n value instanceof Date ? \"date\" :\n typeof value\n );\n}", "function Type(){\n\t\t\tthis.array='Array';\n\t\t\tthis.object='object';\n\t\t\tthis.string='string';\n\t\t\tthis.fn='function';\n\t\t\tthis.number='number';\n\t\t}", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }", "function x(e) {\n var t = typeof e;\n return Array.isArray(e) ? \"array\" : e instanceof RegExp ? \"object\" : b(t, e) ? \"symbol\" : t;\n }", "function $type(obj){\n if (obj == undefined) \n return false;\n if (obj.htmlElement) \n return 'element';\n var type = typeof obj;\n if (type == 'object' && obj.nodeName) {\n switch (obj.nodeType) {\n case 1:\n return 'element';\n case 3:\n return (/\\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace';\n }\n }\n if (type == 'object' || type == 'function') {\n switch (obj.constructor) {\n case Array:\n return 'array';\n case RegExp:\n return 'regexp';\n }\n if (typeof obj.length == 'number') {\n if (obj.item) \n return 'collection';\n if (obj.callee) \n return 'arguments';\n }\n }\n return type;\n}", "function typeOf(value) {\n var s = typeof value;\n if (s == 'object') {\n if (!value) {\n return 'null';\n } else if (value instanceof Array) {\n return 'array';\n }\n }\n return s;\n}", "function x(e) {\n var t = typeof e;\n return Array.isArray(e) ? \"array\" : e instanceof RegExp ? \"object\" : b(t, e) ? \"symbol\" : t;\n }", "function getTypeOf (input) {\n\n\tif (input === null) {\n\t\treturn 'null';\n\t}\n\n\telse if (typeof input === 'undefined') {\n\t\treturn 'undefined';\n\t}\n\n\telse if (typeof input === 'object') {\n\t\treturn (Array.isArray(input) ? 'array' : 'object');\n\t}\n\n\treturn typeof input;\n\n}", "function _typeof( o ) {\r\n return typeof o ;\r\n }", "function getType(o)\n{\n\tif (o === null)\n\t\treturn \"null\";\n\t\n\tif (Array.isArray(o))\n\t\treturn \"array\";\n\t\n\treturn typeof o;\n}", "function _typeof2(e){return _typeof2=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},_typeof2(e)}", "function $type(obj){\r\n if (!$defined(obj)) \r\n return false;\r\n if (obj.htmlElement) \r\n return 'element';\r\n var type = typeof obj;\r\n if (type == 'object' && obj.nodeName) {\r\n switch (obj.nodeType) {\r\n case 1:\r\n return 'element';\r\n case 3:\r\n return (/\\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace';\r\n }\r\n }\r\n if (type == 'object' || type == 'function') {\r\n switch (obj.constructor) {\r\n case Array:\r\n return 'array';\r\n case RegExp:\r\n return 'regexp';\r\n case Class:\r\n return 'class';\r\n }\r\n if (typeof obj.length == 'number') {\r\n if (obj.item) \r\n return 'collection';\r\n if (obj.callee) \r\n return 'arguments';\r\n }\r\n }\r\n return type;\r\n }" ]
[ "0.6908362", "0.6774889", "0.6606997", "0.65384954", "0.64926404", "0.6489072", "0.6489072", "0.6449892", "0.6449892", "0.6428727", "0.64280385", "0.6402795", "0.6402795", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.6377059", "0.63737583", "0.6369853", "0.63499665", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.630787", "0.6303671", "0.62983316", "0.6288858", "0.6285146", "0.6261454", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.6251852", "0.62473583", "0.62338287", "0.623085", "0.62243843", "0.6221748", "0.6207376", "0.61969", "0.6168919", "0.6168876" ]
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t return propType;\n\t\t}", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t}", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t}", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n if (isSymbol(propType, propValue)) {\n return \"symbol\";\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }", "function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }" ]
[ "0.6876589", "0.68531567", "0.68531567", "0.68531567", "0.68531567", "0.68519515", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.68464226", "0.6837838", "0.6837838", "0.6836039", "0.6817641", "0.6814544", "0.6814544", "0.6814544", "0.6814544", "0.6814544", "0.68000585", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065", "0.678065" ]
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n case \"date\":\n case \"regexp\":\n return \"a \" + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n\t\t var type = getPreciseType(value);\n\t\t switch (type) {\n\t\t case 'array':\n\t\t case 'object':\n\t\t return 'an ' + type;\n\t\t case 'boolean':\n\t\t case 'date':\n\t\t case 'regexp':\n\t\t return 'a ' + type;\n\t\t default:\n\t\t return type;\n\t\t }\n\t\t }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch(type){\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }", "function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }" ]
[ "0.660086", "0.65664715", "0.65607077", "0.65607077", "0.65607077", "0.65607077", "0.6523554", "0.65228945", "0.6507182", "0.6507182", "0.6507182", "0.6507182", "0.6507182", "0.6502548", "0.6491066", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036", "0.6479036" ]
0.0
-1
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n }", "getClassName() {\n return this.constructor\n .className;\n }", "function getClassName(obj)\n{\n if (obj === null) {\n return 'null';\n }\n if (obj === undefined) {\n return 'undefined';\n }\n var c = obj.constructor.toString();\n return c.substring(9, c.indexOf('(', 10));\n}", "function getClass(o) {\n\n\tif (o === null || o === undefined) return \"Object\";\n\treturn OP_toString.call(o).slice(\"[object \".length, -1);\n}", "getClassName() {\n return this.constructor.name\n }", "function getClass(obj) {\r\n return Object.prototype.toString.call(obj);\r\n}", "function getClass(obj) {\n return {}.toString.call(obj).slice(8, -1);\n}", "static getClassName() {\n return \"Object\";\n }", "function classOf(o){\n if(o === null) return \"Null\";\n if(o === undefined) return \"Undefined\";\n return Object.prototype.toString.call(o).slice(8, -1);\n}", "function get$className()/* : String*/\n {\n return flash.utils.getQualifiedClassName(this).replace(/::/, \".\");\n }", "function get_class_name(current_obj) {\n\t\t\tvar id = current_obj.attr('id');\n\t\t\tvar name = id.substring(6,id.length);\n\t\t\treturn name;\n\t\t}", "function getObjectName(object) {\n if (object === undefined) {\n return '';\n }\n if (object === null) {\n return 'Object';\n }\n if (typeof object === 'object' && !object.constructor) {\n return 'Object';\n }\n var funcNameRegex = /function ([^(]*)/;\n var results = (funcNameRegex).exec((object).constructor.toString());\n if (results && results.length > 1) {\n return results[1];\n }\n else {\n return '';\n }\n }", "function _getClazz() {\r\n\t\tvar n = clz = this.vj$._class, idx = n.lastIndexOf('.');\r\n\t\tif (idx != -1) clz = n.substring(idx+1); \r\n\t\tif (this.vj$[clz]) return this.vj$[clz].clazz;\r\n\r\n\t\t//Error case...\r\n\t\treturn null;\r\n\t}", "getClassName() {\n return this.statesTable.getString(this.currentState, 'ClassName');\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }", "function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }" ]
[ "0.7730571", "0.74697196", "0.74697196", "0.74258965", "0.7164231", "0.71448183", "0.7083163", "0.7080694", "0.6995368", "0.6971116", "0.6901662", "0.6883398", "0.67147285", "0.66557264", "0.6639163", "0.6611592", "0.6611592", "0.6611592", "0.6611592", "0.6600893", "0.6599787", "0.6599787", "0.6599787", "0.6599787", "0.6599787", "0.6582472", "0.6582472" ]
0.0
-1
During execution of guarded functions we will capture the first error which we will rethrow to be handled by the top level error handler.
function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _tryEachErrorHandler(next, ctx) {\n if (ctx.ix >= ctx.steps.length) return next(ctx.err2 || ctx.err, 'done'); else { ctx.next = next; _tryStepContext(ctx, _tryNext); }\n }", "function rethrow(){\n if(DEBUG){\n var back = new error;\n return function(err){\n if(err){\n back.stack = err.name +':'+ err.message + back.stack.substr(back.name.length);\n err = back;\n throw err ;\n }\n };\n }\n return function(err){\n if(err){\n throw err ;\n }\n };\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error2 = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error2;\n }\n }", "callUnhandledRejectionHandler(error) {\n const errHandler = window.onunhandledrejection;\n\n if (!errHandler) {\n return;\n }\n\n errHandler(error);\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function promiseErrorHandler(next) {\n return err => next(err);\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function errorEnhancer(data){\n //is plain Error and was not yet caught\n if(data instanceof Error && !data.caughtOnChainId){\n data.caughtOnChainId = funcArr._id;\n\n var trace = stackTrace({e: data});\n if(funcArr._name) {\n console.log('Failed inside ' + funcArr._name);\n }\n console.log(data.toString());\n console.log(trace.join('\\n'));\n }\n return Promise.reject(data);\n }", "function captureError(error) {\n\t\t\terr = error;\n\t\t}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}" ]
[ "0.64132214", "0.63276243", "0.6323648", "0.6162804", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.6153157", "0.61225873", "0.6121533", "0.6083926", "0.6005077", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187", "0.5950187" ]
0.63459426
7
Recomputes the plugin list using the injected plugins and plugin ordering.
function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected. return;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "orderPlugins() {\r\n debug('orderPlugins:before', this.pluginNames);\r\n const runLast = this._plugins\r\n .filter(p => p.requirements.has('runLast'))\r\n .map(p => p.name);\r\n for (const name of runLast) {\r\n const index = this._plugins.findIndex(p => p.name === name);\r\n this._plugins.push(this._plugins.splice(index, 1)[0]);\r\n }\r\n debug('orderPlugins:after', this.pluginNames);\r\n }", "order() {\n debug('order:before', this.names);\n const runLast = this._plugins\n .filter(p => p.requirements.has('runLast'))\n .map(p => p.name);\n for (const name of runLast) {\n const index = this._plugins.findIndex(p => p.name === name);\n this._plugins.push(this._plugins.splice(index, 1)[0]);\n }\n debug('order:after', this.names);\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n }", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\n 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' +\n pluginName +\n '`.',\n );\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\n 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' +\n pluginName +\n '` does not.',\n );\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (\n !publishEventForPlugin(\n publishedEvents[eventName],\n pluginModule,\n eventName,\n )\n ) {\n {\n throw Error(\n 'EventPluginRegistry: Failed to publish event `' +\n eventName +\n '` for plugin `' +\n pluginName +\n '`.',\n );\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n\t if (!eventPluginOrder) {\n\t // Wait until an `eventPluginOrder` is injected.\n\t return;\n\t }\n\t for (var pluginName in namesToPlugins) {\n\t var pluginModule = namesToPlugins[pluginName];\n\t var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\t !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\t if (plugins[pluginIndex]) {\n\t continue;\n\t }\n\t !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n\t plugins[pluginIndex] = pluginModule;\n\t var publishedEvents = pluginModule.eventTypes;\n\t for (var eventName in publishedEvents) {\n\t !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n\t }\n\t }\n\t}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\n\treturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error('EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + pluginName + '`.'));\n }\n }\n })();\n if (plugins[pluginIndex]) {\n continue;\n }\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error('EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + pluginName + '` does not.'));\n }\n }\n })();\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error('EventPluginRegistry: Failed to publish event `' + eventName + '` for plugin `' + pluginName + '`.'));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error('EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + pluginName + '`.'));\n }\n }\n })();\n if (plugins[pluginIndex]) {\n continue;\n }\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error('EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + pluginName + '` does not.'));\n }\n }\n })();\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error('EventPluginRegistry: Failed to publish event `' + eventName + '` for plugin `' + pluginName + '`.'));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}" ]
[ "0.7994167", "0.747035", "0.7168887", "0.7135859", "0.7135859", "0.7135859", "0.71282715", "0.7122214", "0.7118275", "0.71168816", "0.71168816", "0.71168816", "0.7100578", "0.7100578", "0.7100578", "0.709077", "0.709077", "0.70790946", "0.7074301", "0.7074301", "0.7065544", "0.7065544", "0.7065544", "0.7065544", "0.7065544", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398", "0.7064398" ]
0.70910096
19
Standard/simple iteration through an event's collected dispatches.
function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync. executeDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(\"production\"!==process.env.NODE_ENV){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;} // Listeners and IDs are two parallel arrays that are always in sync.\ncb(event,dispatchListeners[i],dispatchIDs[i]);}}else if(dispatchListeners){cb(event,dispatchListeners,dispatchIDs);}}", "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(true){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i < dispatchListeners.length;i++) {if(event.isPropagationStopped()){break;} // Listeners and IDs are two parallel arrays that are always in sync.\n\tcb(event,dispatchListeners[i],dispatchIDs[i]);}}else if(dispatchListeners){cb(event,dispatchListeners,dispatchIDs);}}", "function forEach(event, each, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables), disposable);\n }", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (false) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"production\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"production\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (true) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function _forEach(event, each) {\n return snapshot(function (listener) {\n var thisArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var disposables = arguments.length > 2 ? arguments[2] : undefined;\n return event(function (i) {\n each(i);\n listener.call(thisArgs, i);\n }, null, disposables);\n });\n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners=null;event._dispatchIDs=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners = null;event._dispatchIDs = null;}", "function eventFunction(e){\n\t getSlot([q.id], allEvents).push(e);\n\t eventDurForeach(e, drawfn);\n\t}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function _loop_1(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target,\n bound,\n source;\n\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n } else {\n source = 'unknown.' + onproperty;\n }\n\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n\n elt = elt.parentElement;\n }\n }, true);\n };\n\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n }", "trigger (eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "trigger(eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "each(action) {\n for (const element of this)\n action(element);\n }", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener,\n );\n event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst,\n );\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (inst && event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "trigger(eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}" ]
[ "0.6340201", "0.6318283", "0.6216154", "0.6129209", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6119329", "0.6119329", "0.61154145", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.60410064", "0.5766144", "0.5738541", "0.57251835", "0.57084376", "0.5707732", "0.56692564", "0.55691624", "0.55544513", "0.55030125", "0.55030125", "0.55007696", "0.5492424", "0.5490577", "0.54880106", "0.548289", "0.548289", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405" ]
0.0
-1
Given a DOM node, return the closest ReactDOMComponent or ReactDOMTextComponent instance ancestor.
function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is // unmounted, potentially). return null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root. return inst;}return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}" ]
[ "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.73241985", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.7308156", "0.72989666", "0.7286098", "0.7286098", "0.7279702", "0.7279702", "0.7279702", "0.7279702", "0.7279702", "0.7279702", "0.7279702", "0.7269081", "0.7269081", "0.7269081", "0.72592163", "0.7257234", "0.72518855", "0.723553", "0.7231785", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804", "0.72287804" ]
0.73721355
3
Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent instance, or null if the node was not rendered by this React.
function getInstanceFromNode$1(node){var inst=node[internalInstanceKey];if(inst){if(inst.tag===HostComponent||inst.tag===HostText){return inst;}else{return null;}}return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(\n node,\n );\n }", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode$2(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode$1(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return external_ReactDOM_default.a.findDOMNode(node);\n}", "toDOMNode(editor, node) {\n var domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function ReactDOMComponent(element) {\r\n\t var tag = element.type;\r\n\t validateDangerousTag(tag);\r\n\t this._currentElement = element;\r\n\t this._tag = tag.toLowerCase();\r\n\t this._namespaceURI = null;\r\n\t this._renderedChildren = null;\r\n\t this._previousStyle = null;\r\n\t this._previousStyleCopy = null;\r\n\t this._hostNode = null;\r\n\t this._hostParent = null;\r\n\t this._rootNodeID = 0;\r\n\t this._domID = 0;\r\n\t this._hostContainerInfo = null;\r\n\t this._wrapperState = null;\r\n\t this._topLevelWrapper = null;\r\n\t this._flags = 0;\r\n\t if (process.env.NODE_ENV !== 'production') {\r\n\t this._ancestorInfo = null;\r\n\t setAndValidateContentChildDev.call(this, null);\r\n\t }\r\n\t}", "toDOMNode(editor, node) {\n var domNode = __WEBPACK_IMPORTED_MODULE_1_slate__[\"Editor\"].isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}" ]
[ "0.75961375", "0.73800486", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7349611", "0.7329588", "0.7329588", "0.7329588", "0.7329588", "0.7329588", "0.7329588", "0.7329588", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.7290733", "0.72081953", "0.71643776", "0.71643776", "0.71549016", "0.71549016", "0.71549016", "0.71549016", "0.71549016", "0.71549016", "0.7150017", "0.7107098", "0.7107098", "0.70598114", "0.70462847", "0.6897693", "0.6804784", "0.67931575", "0.6380418", "0.6311117", "0.62992966", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477", "0.6291477" ]
0.0
-1
Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding DOM node.
function getNodeFromInstance$1(inst){if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode;}// Without this first invariant, passing a non-DOM-component triggers the next // invariant for a missing parent, which is super confusing. invariant(false,'getNodeFromInstance: Invalid argument.');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findDOMNode$2(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(\n node,\n );\n }", "function findDOMNode$1(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return external_ReactDOM_default.a.findDOMNode(node);\n}", "toDOMNode(editor, node) {\n var domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedNativeOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "function getRenderedNativeOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "toDOMNode(editor, node) {\n var domNode = __WEBPACK_IMPORTED_MODULE_1_slate__[\"Editor\"].isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedHostOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "toDOMNode(editor, node) {\n var KEY_TO_ELEMENT = EDITOR_TO_KEY_TO_ELEMENT.get(editor);\n var domNode = index_es/* Editor.isEditor */.ML.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedNativeOrTextFromComponent(component) {\n var rendered;\n while (rendered = component._renderedComponent) {\n component = rendered;\n }\n return component;\n}", "function render(node) {\n switch (nodeType(node)) {\n case \"text\":\n return document.createTextNode(node);\n case \"element\":\n return renderElement(node);\n case \"component\":\n return renderComponent(node);\n }\n}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\r\n\t var tag = element.type;\r\n\t validateDangerousTag(tag);\r\n\t this._currentElement = element;\r\n\t this._tag = tag.toLowerCase();\r\n\t this._namespaceURI = null;\r\n\t this._renderedChildren = null;\r\n\t this._previousStyle = null;\r\n\t this._previousStyleCopy = null;\r\n\t this._hostNode = null;\r\n\t this._hostParent = null;\r\n\t this._rootNodeID = 0;\r\n\t this._domID = 0;\r\n\t this._hostContainerInfo = null;\r\n\t this._wrapperState = null;\r\n\t this._topLevelWrapper = null;\r\n\t this._flags = 0;\r\n\t if (process.env.NODE_ENV !== 'production') {\r\n\t this._ancestorInfo = null;\r\n\t setAndValidateContentChildDev.call(this, null);\r\n\t }\r\n\t}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}" ]
[ "0.6786204", "0.67785287", "0.6772284", "0.67672324", "0.67672324", "0.6752643", "0.6743332", "0.674241", "0.674241", "0.674241", "0.674241", "0.674241", "0.674241", "0.674241", "0.67411697", "0.67411697", "0.67411697", "0.67411697", "0.67411697", "0.67411697", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.6733316", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.67180604", "0.6713263", "0.66984695", "0.66984695", "0.6639069", "0.6633244", "0.65693414", "0.6490144", "0.6409332", "0.6409332", "0.63105714", "0.6275448", "0.62068874", "0.61586076", "0.61478204", "0.6107087", "0.6107087", "0.6107087", "0.6107087", "0.6107087", "0.6107087", "0.60931903", "0.60931903", "0.60931903", "0.60931903", "0.60931903", "0.60931903", "0.60931903", "0.60931903", "0.6087553", "0.6086181", "0.6086181", "0.6086181", "0.6086181", "0.6086181", "0.6086181", "0.6086181", "0.6086181", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544", "0.60741544" ]
0.0
-1
Return the lowest common ancestor of A and B, or null if they are in different trees.
function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up. while(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up. while(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match. var depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = instA._nativeParent;\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = instB._nativeParent;\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB) {\n return instA;\n }\n instA = instA._nativeParent;\n instB = instB._nativeParent;\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n }\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n }\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n for(var tempA = nodeA; tempA; tempA = getParent(tempA))depthA++;\n var depthB = 0;\n for(var tempB = nodeB; tempB; tempB = getParent(tempB))depthB++;\n // If A is deeper, crawl up.\n while(depthA - depthB > 0){\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n while(depthB - depthA > 0){\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n var depth = depthA;\n while(depth--){\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) return nodeA;\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = getParent(instA);\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = getParent(instB);\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB || instA === instB.alternate) {\n\t return instA;\n\t }\n\t instA = getParent(instA);\n\t instB = getParent(instB);\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;var depthA=0;for(var tempA=instA;tempA;tempA=tempA._nativeParent){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=tempB._nativeParent){depthB++;} // If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=instA._nativeParent;depthA--;} // If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=instB._nativeParent;depthB--;} // Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB){return instA;}instA=instA._nativeParent;instB=instB._nativeParent;}return null;}", "function getLowestCommonAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;var depthA=0;for(var tempA=instA;tempA;tempA=tempA._nativeParent){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=tempB._nativeParent){depthB++;} // If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=instA._nativeParent;depthA--;} // If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=instB._nativeParent;depthB--;} // Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB){return instA;}instA=instA._nativeParent;instB=instB._nativeParent;}return null;}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}" ]
[ "0.8276824", "0.8276824", "0.8276824", "0.8272346", "0.8272346", "0.8272346", "0.825413", "0.8228758", "0.8228758", "0.8228758", "0.8228758", "0.8199549", "0.81989896", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.81840426", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.8178027", "0.81676894", "0.81651175", "0.81651175", "0.81651175", "0.81487393", "0.81464565", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.81387895", "0.8113879", "0.80957", "0.80957", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896", "0.80874896" ]
0.81065786
79
Return if A is an ancestor of B. Return the parent instance of the passedin instance. Simulates the traversal of a twophase, capture/bubble event dispatch.
function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._nativeParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._nativeParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA, instB) {\n while (instB) {\n if (instA === instB || instA === instB.alternate) {\n return true;\n }\n instB = getParent(instB);\n }\n return false;\n}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isAncestor(instA, instB) {\n for (;instB; ) {\n if (instA === instB || instA === instB.alternate) return !0;\n instB = getParent(instB);\n }\n return !1;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : undefined : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : undefined : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n\t\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t\t while (instB) {\n\t\t if (instB === instA) {\n\t\t return true;\n\t\t }\n\t\t instB = instB._hostParent;\n\t\t }\n\t\t return false;\n\t\t}", "function isAncestor(instA, instB) {\n\t\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\t\n\t\t while (instB) {\n\t\t if (instB === instA) {\n\t\t return true;\n\t\t }\n\t\t instB = instB._hostParent;\n\t\t }\n\t\t return false;\n\t\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? (undefined) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? (undefined) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? (null) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? (null) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? (null) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? (null) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}", "function isAncestor(instA, instB) {\r\n\t !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\r\n\t !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\r\n\t\r\n\t while (instB) {\r\n\t if (instB === instA) {\r\n\t return true;\r\n\t }\r\n\t instB = instB._hostParent;\r\n\t }\r\n\t return false;\r\n\t}", "function isAncestor(instA, instB) {\n\t !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\t\n\t while (instB) {\n\t if (instB === instA) {\n\t return true;\n\t }\n\t instB = instB._hostParent;\n\t }\n\t return false;\n\t}" ]
[ "0.74996895", "0.74996895", "0.74996895", "0.74897283", "0.74897283", "0.74897283", "0.7472096", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.73996335", "0.735526", "0.735526", "0.7267361", "0.71526486", "0.71526486", "0.71526486", "0.71526486", "0.71526486", "0.71526486", "0.71526486", "0.71526486", "0.71444684", "0.71444684", "0.71444684", "0.71444684", "0.71444684", "0.71444684", "0.71444684", "0.7143172", "0.71312475", "0.71208215", "0.71050864", "0.71050864", "0.71050864", "0.7103509", "0.7103509", "0.7103509", "0.7103509", "0.70998347", "0.70998347", "0.70998347", "0.70688576", "0.70149493", "0.70149493", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.7008538", "0.6997397", "0.6997173" ]
0.0
-1
Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that should would receive a `mouseEnter` or `mouseLeave` event. Does not invoke the callback on the nearest common ancestor because nothing "entered" or "left" that element.
function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleMouseEnter() {\n this._hovered.next(this);\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "function hover(parentSelector, childSelector, mouseEnter, mouseLeave) {\n $(parentSelector).on({\n mouseenter: function() {\n if(mouseEnter != null) {\n mouseEnter(this);\n }\n },\n mouseleave: function() {\n if(mouseLeave != null) {\n mouseLeave(this);\n }\n }\n }, childSelector);\n}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._nativeParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._nativeParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],true,argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],false,argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._nativeParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._nativeParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],true,argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],false,argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._hostParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._hostParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],'captured',argTo);}}", "function itoolPreviewMouseOver(className, callback) {\n var iframeJQuery = window.frames[0].jQuery;\n var iframeContents = _iframe.contents();\n var selElems = iframeJQuery(\".perc-itool-selected-elem\");\n //As this function gets fired on mouse over which can happen more than once as user moves the mouse on the menu\n //The following code is put in to detect whether we already handled the mouse over if yes then returns\n //If the selected elements length is zero return from here or\n //if selected element is only one and if it is div and if it has perc-itools-wrapper return from here\n //if the selected element's parent has a perc-itools-wrapper return from here.\n if(selElems.length === 0 ||\n (selElems.length === 1 && selElems.is(\"div\") && iframeJQuery(selElems).hasClass(\"perc-itools-wrapper\")) ||\n (iframeJQuery(selElems[0]).parent().hasClass(\"perc-itools-wrapper\")))\n return;\n\n selElems.siblings(\":not('.perc-itool-selected-elem')\").each(function(){\n if(iframeJQuery(this).is(\"div\"))\n {\n iframeJQuery(this).addClass('perc-itools-wrapper perc-make-me-region').addClass(className);\n }\n else\n {\n iframeJQuery(this).wrap(\"<div class='perc-widget perc-itool-nov-div-wrapper perc-itools-wrapper perc-itool-region-puff'></div>\");\n }\n });\n\n iframeContents.find('.perc-sibling-div').remove();\n if(selElems.length === 1 && selElems.is(\"div\"))\n {\n selElems.addClass('perc-itool-region-puff-self perc-make-me-region perc-self-wrapper perc-itools-wrapper').addClass(className);\n highlightSiblings(selElems);\n }\n else\n {\n selElems.wrapAll(\"<div class='perc-widget perc-itool-multi-wrapper perc-itool-nov-div-wrapper perc-itool-region-puff-self perc-self-wrapper perc-itools-wrapper \" + className + \"'></div>\");\n highlightSiblings(iframeJQuery(selElems[0]).parent());\n }\n //Change border color of all siblings to blue from grey.\n iframeContents.find('.perc-sibling-div').css({'border-color':'#00afea'});\n iframeJQuery('.perc-itool-selected-green-border').remove();\n iframeJQuery(selElems).each(function()\n {\n highlightSelectedElements(iframeJQuery(this), false);\n });\n\n // If user performs 'Side by Side' action - add the overflow:auto and height 100% to its parent so that below content don't overlap on columns\n if(className === 'perc-col') {\n if(selElems.length === 1) {\n\n selElems.parent().addClass('perc-clear');\n }\n\n else {\n\n selElems.parent().parent().addClass('perc-clear');\n }\n\n }\n\n // If there is only one selected element,turn its border into blue. If there are mulitple selected element keep their border green but turn its wrapper div border to blue\n if(selElems.length === 1) {\n iframeJQuery('.perc-itool-selected-green-border').css('border-color', '#00afea');\n }\n else {\n highlightSelectedElements(iframeJQuery('.perc-itool-multi-wrapper'), true);\n iframeJQuery('.perc-itool-selected-green-border').parent('.perc-itool-selected-green-border').css('border-color', '#00afea');\n }\n\n if (callback) {\n callback();\n }\n }", "function isMouseLeaveOrEnter(e, handler) {\r\n\t if (e.type != 'mouseout' && e.type != 'mouseover')\r\n\t\t return false;\r\n\t var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement;\r\n\t while (reltg && reltg != handler)\r\n\t\t reltg = reltg.parentNode;\r\n\t return (reltg != handler);\r\n}", "function handlerFn(ev) {\n if (ev.animationName !== 'muiNodeInserted') return;\n processLabel(ev.target);\n }", "function setCallBacks(){\n var children = parentDIV.childNodes;\n for(var i = 0; i < children.length; i++){\n children[i].onclick = params.callBack || \n function(){alert(\"Default callback\");};\n } \n }", "function mouseEnterAnchor(obj, idVal, event) {\n\tvar position = obj.position();\n\n\tvar p = obj.position();\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('position', \"absolute\");\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('display', \"\");\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('left', ( p.left - 160 +'px'));\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('z-index', \"99999\");\n\n//\tvar topVal = obj.offset().top+32;\n//\tvar leftVal = obj.offset().left - 190;\n//\tshowOverlay($(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\"), leftVal, topVal,9000);\n}", "function highlighter() {\n\n\tvar areas = $(\".highlight_area\");\n\n\t// in case of ajax reloading and other dynamics\n\t// remove the old mouseover/mouseout events and attach them new\n\tareas.off(\"mouseover\");\n\tareas.off(\"mouseout\");\n\tareas.mouseover(function() {\n\t\tvar itemId = parseId(jQuery(this).attr('class'));\n\t\tvar prntId = parseId(jQuery(this).attr('class'), 'parent_');\n\t\thighlight(itemId); // highlight the current element\n\t\tcheckForChilds(itemId);// highlight the child elements - recursive\n\t\t// - of the current item, if it's given\n\t\tif (prntId) { // check if the current item is a child of another\n\t\t\thighlight(prntId, 'id_'); // hightlight the next parent item,\n\t\t\t// if the current item is a child\n\t\t}\n\t}).mouseout(function() {\n\t\treset_highlight();\n\t});\n\n}", "function mouseMovedOnListItem(hashId) {\n\t return function (dispatch, getState) {\n\t if (getState().Search.Map.BalloonState.MouseIsOnListItem)\n\t return;\n\t mouseEnteredListItem(hashId)(dispatch, getState);\n\t };\n\t}", "function mouseoverIDs(str){\n svg.selectAll(\".node\")\n .attr(\"fill-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.02; })\n .attr(\"stroke-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.02; });\n svg.selectAll(\".nodeText\") \n .attr(\"fill-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.05; });\n svg.selectAll(\".lineNodes\")\n .attr(\"stroke-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0; });\n checkVisibility();\n}", "function handleHover(e) {\r\n\t\t\t// Check if mouse(over|out) are still within the same parent element\r\n\t\t\tvar p = (e.type == \"mouseover\" ? e.fromElement : e.toElement) || e.relatedTarget;\r\n\t\r\n\t\t\t// Traverse up the tree\r\n\t\t\twhile ( p && p != this ) p = p.parentNode;\r\n\t\t\t\r\n\t\t\t// If we actually just moused on to a sub-element, ignore it\r\n\t\t\tif ( p == this ) return false;\r\n\t\t\t\r\n\t\t\t// Execute the right function\r\n\t\t\treturn (e.type == \"mouseover\" ? f : g).apply(this, [e]);\r\n\t\t}", "_mouseEnterHandler() {\n const that = this;\n\n that._isElementHovered = true;\n\n if (that.dropDownOpenMode === 'auto' && !that.disabled && !that.readonly) {\n that.open();\n }\n }", "_mouseEnterHandler() {\n const that = this;\n\n that._isElementHovered = true;\n\n if (that.tagName.indexOf('JQX-DROP-DOWN-') > -1 && that.dropDownOpenMode === 'auto' && !that.disabled && !that.readonly) {\n that.open();\n }\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t\t var pathFrom = [];\n\t\t while (from && from !== common) {\n\t\t pathFrom.push(from);\n\t\t from = from._hostParent;\n\t\t }\n\t\t var pathTo = [];\n\t\t while (to && to !== common) {\n\t\t pathTo.push(to);\n\t\t to = to._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = 0; i < pathFrom.length; i++) {\n\t\t fn(pathFrom[i], true, argFrom);\n\t\t }\n\t\t for (i = pathTo.length; i-- > 0;) {\n\t\t fn(pathTo[i], false, argTo);\n\t\t }\n\t\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t\t var pathFrom = [];\n\t\t while (from && from !== common) {\n\t\t pathFrom.push(from);\n\t\t from = from._hostParent;\n\t\t }\n\t\t var pathTo = [];\n\t\t while (to && to !== common) {\n\t\t pathTo.push(to);\n\t\t to = to._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = 0; i < pathFrom.length; i++) {\n\t\t fn(pathFrom[i], true, argFrom);\n\t\t }\n\t\t for (i = pathTo.length; i-- > 0;) {\n\t\t fn(pathTo[i], false, argTo);\n\t\t }\n\t\t}", "function mouseOver(elem) {\n let place = (elem.id);\n console.log(place);\n addColor(place);\n return place;\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function handleMouseEnterFix() {\n !mouseEntered.current && handleMouseEnter();\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\r\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\r\n\t var pathFrom = [];\r\n\t while (from && from !== common) {\r\n\t pathFrom.push(from);\r\n\t from = from._hostParent;\r\n\t }\r\n\t var pathTo = [];\r\n\t while (to && to !== common) {\r\n\t pathTo.push(to);\r\n\t to = to._hostParent;\r\n\t }\r\n\t var i;\r\n\t for (i = 0; i < pathFrom.length; i++) {\r\n\t fn(pathFrom[i], 'bubbled', argFrom);\r\n\t }\r\n\t for (i = pathTo.length; i-- > 0;) {\r\n\t fn(pathTo[i], 'captured', argTo);\r\n\t }\r\n\t}", "function mouseEntered(e) {\r\n DoHover(this, true, e);\r\n e.stopPropagation();\r\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._nativeParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._nativeParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function the_click_callback(){\n\t\t\t\tif(typeof click_callback == 'function'){\n\t\t\t\t\tvar id = $container.attr('id');\n\t\t\t\t\tif(id==undefined || !id){\n\t\t\t\t\t\tid = '[no id]';\n\t\t\t\t\t}\n\t\t\t\t\tclick_callback(id, activenode);\n\t\t\t\t}\n\t\t\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}" ]
[ "0.50958073", "0.4923776", "0.4923776", "0.48828086", "0.4879105", "0.4879105", "0.48694754", "0.4865299", "0.47985366", "0.47767362", "0.4727795", "0.4724397", "0.4718455", "0.47084516", "0.47027516", "0.46615142", "0.46477535", "0.46370202", "0.4634212", "0.4634212", "0.45951346", "0.4587264", "0.4587264", "0.4587264", "0.4587264", "0.4587264", "0.4587264", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45726043", "0.45567042", "0.45551103", "0.45361426", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45305592", "0.45273224", "0.45222425", "0.45222425", "0.45222425", "0.45222425", "0.45222425", "0.45222425", "0.45222425", "0.4517166", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338", "0.45061338" ]
0.4734754
17
Some event types have a notion of different registration names for different "phases" of propagation. This finds listeners by a given phase.
function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName);}", "function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName);}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\r\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\r\n\t return getListener(inst, registrationName);\r\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase: PropagationPhases) {\n const registrationName =\n event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}" ]
[ "0.6933093", "0.6933093", "0.6925909", "0.6925909", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6901375", "0.6893298", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6821751", "0.6754263", "0.6730247", "0.6725956", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424", "0.6725424" ]
0.6932303
12
A small set of propagation patterns, each of which will accept a small amount of information, and generate a set of "dispatch ready event objects" which are sets of events that have already been annotated with a set of dispatched listener functions/ids. The API is designed this way to discourage these propagation strategies from actually executing the dispatches, since we always want to collect the entire set of dispatches before executing even a single one. Tags a `SyntheticEvent` with dispatched listeners. Creating this function here, allows us to not have to bind or create functions for each event. Mutating the event's members allows us to not have to create a wrapping "dispatch" object that pairs the event with the listener.
function accumulateDirectionalDispatches(inst,phase,event){{!inst?warningWithoutStack$1(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(domID,upwards,event){if(true){if(!domID){throw new Error('Dispatching id must not be null');}}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners = accumulateInto(event._dispatchListeners,listener);event._dispatchIDs = accumulateInto(event._dispatchIDs,domID);}}", "function accumulateDirectionalDispatches(domID,upwards,event){if(\"production\"!==process.env.NODE_ENV){if(!domID){throw new Error('Dispatching id must not be null');}}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,domID);}}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warning(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warning(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDispatches(id,ignoredDirection,event){if(event && event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(id,registrationName);if(listener){event._dispatchListeners = accumulateInto(event._dispatchListeners,listener);event._dispatchIDs = accumulateInto(event._dispatchIDs,id);}}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t\t if (false) {\n\t\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(inst, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t\t if (false) {\n\t\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(inst, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t\t if (process.env.NODE_ENV !== 'production') {\n\t\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(domID, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t\t }\n\t\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"development\" !== 'production') {\n \"development\" !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (\"development\" !== 'production') {\n \"development\" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (false) {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (false) {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}" ]
[ "0.6351379", "0.6351379", "0.62488556", "0.6234077", "0.60864353", "0.60864353", "0.60864353", "0.60864353", "0.60864353", "0.595973", "0.595973", "0.5952979", "0.5928029", "0.5928029", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5927833", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.5919683", "0.59140676", "0.5909426", "0.5909426", "0.5909426", "0.5909426", "0.5909426", "0.5909426", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5904901", "0.5901484", "0.5901484", "0.5901484", "0.58918136", "0.5885173", "0.5885173", "0.5885173", "0.5885173", "0.5885173", "0.5885173", "0.5885173", "0.58848554", "0.58848554", "0.58848554", "0.58841383", "0.58827835", "0.58827835", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5882508", "0.5876622", "0.5876622", "0.5876622", "0.5876622", "0.5876622", "0.5876622" ]
0.59452534
12
Collect dispatches (must be entirely collected before dispatching see unit tests). Lazily allocate the array to conserve memory. We must loop through each event and perform the traversal for each one. We cannot perform a single traversal for the entire collection of events because each event may have a different target.
function accumulateTwoPhaseDispatchesSingle(event){if(event&&event.dispatchConfig.phasedRegistrationNames){traverseTwoPhase(event._targetInst,accumulateDirectionalDispatches,event);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners = null;event._dispatchIDs = null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners=null;event._dispatchIDs=null;}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (inst && event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\n\texecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;if(process.env.NODE_ENV!=='production'){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener,\n );\n event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst,\n );\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}" ]
[ "0.60375905", "0.60375905", "0.60375905", "0.60375905", "0.60375905", "0.59032416", "0.58940375", "0.58940375", "0.58940375", "0.58940375", "0.5876829", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5791305", "0.5790863", "0.57835335", "0.5777487", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5771981", "0.5771981", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648" ]
0.0
-1
Accumulates without regard to direction, does not look for phased registration names. Same as `accumulateDirectDispatchesSingle` but without requiring that the `dispatchMarker` be the same as the dispatched ID.
function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(id, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}" ]
[ "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.74679923", "0.7467445", "0.7467445", "0.7467445", "0.7467445", "0.7467445", "0.7467445", "0.7467445", "0.74587923", "0.7421915", "0.7421915", "0.7421915", "0.7421915", "0.7421915", "0.7421915", "0.7421915", "0.7421915", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.74018633", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7397769", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636", "0.7377636" ]
0.0
-1
Do not uses the below two methods directly! Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. (It is the only module that is allowed to access these methods.)
function unsafeCastStringToDOMTopLevelType(topLevelType){return topLevelType;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&(eventSystemFlags&IS_REPLAYED)===0){// If this is an over event with a target, we might have already dispatched\n// the event in the out event of the other target. If this is replayed,\n// then it's because we couldn't dispatch against this target previously\n// so we have to do it now instead.\nvar related=nativeEvent.relatedTarget||nativeEvent.fromElement;if(related){// If the related node is managed by React, we can assume that we have\n// already dispatched the corresponding events during its mouseout.\nif(getClosestInstanceFromNode(related)||isContainerMarkedAsRoot(related)){return;}}}if(!isOutEvent&&!isOverEvent){// Must not be a mouse or pointer in or out - ignoring.\nreturn;}var win;// TODO: why is this nullable in the types but we read from it?\nif(nativeEventTarget.window===nativeEventTarget){// `nativeEventTarget` is probably a window object.\nwin=nativeEventTarget;}else{// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\nvar doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow;}else{win=window;}}var from;var to;if(isOutEvent){var _related=nativeEvent.relatedTarget||nativeEvent.toElement;from=targetInst;to=_related?getClosestInstanceFromNode(_related):null;if(to!==null){var nearestMounted=getNearestMountedFiber(to);if(to!==nearestMounted||to.tag!==HostComponent&&to.tag!==HostText){to=null;}}}else{// Moving to a node from outside the window.\nfrom=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.\nreturn;}var SyntheticEventCtor=SyntheticMouseEvent;var leaveEventType='onMouseLeave';var enterEventType='onMouseEnter';var eventTypePrefix='mouse';if(domEventName==='pointerout'||domEventName==='pointerover'){SyntheticEventCtor=SyntheticPointerEvent;leaveEventType='onPointerLeave';enterEventType='onPointerEnter';eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance(from);var toNode=to==null?win:getNodeFromInstance(to);var leave=new SyntheticEventCtor(leaveEventType,eventTypePrefix+'leave',from,nativeEvent,nativeEventTarget);leave.target=fromNode;leave.relatedTarget=toNode;var enter=null;// We should only process this nativeEvent if we are processing\n// the first ancestor. Next time, we will ignore the event.\nvar nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}", "function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&(eventSystemFlags&IS_REPLAYED)===0){// If this is an over event with a target, we might have already dispatched\n// the event in the out event of the other target. If this is replayed,\n// then it's because we couldn't dispatch against this target previously\n// so we have to do it now instead.\nvar related=nativeEvent.relatedTarget||nativeEvent.fromElement;if(related){// If the related node is managed by React, we can assume that we have\n// already dispatched the corresponding events during its mouseout.\nif(getClosestInstanceFromNode(related)||isContainerMarkedAsRoot(related)){return;}}}if(!isOutEvent&&!isOverEvent){// Must not be a mouse or pointer in or out - ignoring.\nreturn;}var win;// TODO: why is this nullable in the types but we read from it?\nif(nativeEventTarget.window===nativeEventTarget){// `nativeEventTarget` is probably a window object.\nwin=nativeEventTarget;}else {// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\nvar doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow;}else {win=window;}}var from;var to;if(isOutEvent){var _related=nativeEvent.relatedTarget||nativeEvent.toElement;from=targetInst;to=_related?getClosestInstanceFromNode(_related):null;if(to!==null){var nearestMounted=getNearestMountedFiber(to);if(to!==nearestMounted||to.tag!==HostComponent&&to.tag!==HostText){to=null;}}}else {// Moving to a node from outside the window.\nfrom=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.\nreturn;}var SyntheticEventCtor=SyntheticMouseEvent;var leaveEventType='onMouseLeave';var enterEventType='onMouseEnter';var eventTypePrefix='mouse';if(domEventName==='pointerout'||domEventName==='pointerover'){SyntheticEventCtor=SyntheticPointerEvent;leaveEventType='onPointerLeave';enterEventType='onPointerEnter';eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance(from);var toNode=to==null?win:getNodeFromInstance(to);var leave=new SyntheticEventCtor(leaveEventType,eventTypePrefix+'leave',from,nativeEvent,nativeEventTarget);leave.target=fromNode;leave.relatedTarget=toNode;var enter=null;// We should only process this nativeEvent if we are processing\n// the first ancestor. Next time, we will ignore the event.\nvar nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}", "function makeNativeSimulator(eventType, topLevelType) {\n return function (domComponentOrNode, nativeEventData) {\n var fakeNativeEvent = new Event(eventType);\n _assign(fakeNativeEvent, nativeEventData);\n if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);\n } else if (domComponentOrNode.tagName) {\n // Will allow on actual dom nodes.\n simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);\n }\n };\n}", "function makeNativeSimulator(eventType, topLevelType) {\n return function (domComponentOrNode, nativeEventData) {\n var fakeNativeEvent = new Event(eventType);\n\n _assign(fakeNativeEvent, nativeEventData);\n\n if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);\n } else if (domComponentOrNode.tagName) {\n // Will allow on actual dom nodes.\n simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);\n }\n };\n}", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function InternalEvent() {}", "function Browser_GetMouseDownEventType(event)\n{\n\t//switch on event type first\n\tswitch (event.type)\n\t{\n\t\tcase window.__BROWSER_EVENT_MOUSEDOWN:\n\t\t\t//no mouse button?\n\t\t\tif (!event.button)\n\t\t\t{\n\t\t\t\t//return the event directly as it was triggered by the camera\n\t\t\t\treturn event.type;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//check button\n\t\t\t\tswitch (event.button)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t//has to be left button\n\t\t\t\t\t\treturn window.__BROWSER_EVENT_MOUSEDOWN;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//switch according to browser\n\t\t\t\t\t\tswitch (window.__BROWSER_TYPE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase __BROWSER_IE:\n\t\t\t\t\t\t\t\t//has to be left button\n\t\t\t\t\t\t\t\treturn window.__BROWSER_EVENT_MOUSEDOWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase __BROWSER_EVENT_CLICK:\n\t\tcase window.__BROWSER_EVENT_MOUSEUP:\n\t\tcase __BROWSER_EVENT_MOUSERIGHT:\n\t\tcase __BROWSER_EVENT_DOUBLECLICK:\n\n\t\t\t//return it\n\t\t\treturn event.type;\n\t}\n\t//failed\n\treturn false;\n}", "function Utilities_GetEvent(e)\r\n{\r\n return e || window.event;\r\n}", "function u(e) {\n return function(t, n) {\n var o = new r(e);\n l(o, n), S.isDOMComponent(t) ? S.simulateNativeEventOnDOMComponent(e, t, o) : t.tagName && // Will allow on actual dom nodes.\n S.simulateNativeEventOnNode(e, t, o);\n };\n }", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function extractEvents$1(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;var getTargetInstFunc,handleEventFunc;if(shouldUseChangeEvent(targetNode)){getTargetInstFunc=getTargetInstForChangeEvent;}else if(isTextInputElement(targetNode)){if(isInputEventSupported){getTargetInstFunc=getTargetInstForInputOrChangeEvent;}else{getTargetInstFunc=getTargetInstForInputEventPolyfill;handleEventFunc=handleEventsForInputEventPolyfill;}}else if(shouldUseClickEvent(targetNode)){getTargetInstFunc=getTargetInstForClickEvent;}if(getTargetInstFunc){var inst=getTargetInstFunc(domEventName,targetInst);if(inst){createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,nativeEventTarget);return;}}if(handleEventFunc){handleEventFunc(domEventName,targetNode,targetInst);}// When blurring, set the value attribute for number inputs\nif(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}", "function extractEvents$1(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;var getTargetInstFunc,handleEventFunc;if(shouldUseChangeEvent(targetNode)){getTargetInstFunc=getTargetInstForChangeEvent;}else if(isTextInputElement(targetNode)){if(isInputEventSupported){getTargetInstFunc=getTargetInstForInputOrChangeEvent;}else {getTargetInstFunc=getTargetInstForInputEventPolyfill;handleEventFunc=handleEventsForInputEventPolyfill;}}else if(shouldUseClickEvent(targetNode)){getTargetInstFunc=getTargetInstForClickEvent;}if(getTargetInstFunc){var inst=getTargetInstFunc(domEventName,targetInst);if(inst){createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,nativeEventTarget);return;}}if(handleEventFunc){handleEventFunc(domEventName,targetNode,targetInst);}// When blurring, set the value attribute for number inputs\nif(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n switch (domEventName) {\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n break;\n case 'focusout':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n case 'mousedown':\n mouseDown = true;\n break;\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n }", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n\t\t var path = bookKeeping.nativeEvent.path;\n\t\t var currentNativeTarget = path[0];\n\t\t var eventsFired = 0;\n\t\t for (var i = 0; i < path.length; i++) {\n\t\t var currentPathElement = path[i];\n\t\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t\t currentNativeTarget = path[i + 1];\n\t\t }\n\t\t // TODO: slow\n\t\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t\t if (reactParent === currentPathElement) {\n\t\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t\t bookKeeping.ancestors.push(currentPathElement);\n\t\t\n\t\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t\t eventsFired++;\n\t\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\t\n\t\t // Jump to the root of this React render tree\n\t\t while (currentPathElementID !== newRootID) {\n\t\t i++;\n\t\t currentPathElement = path[i];\n\t\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t\t }\n\t\t }\n\t\t }\n\t\t if (eventsFired === 0) {\n\t\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t\t }\n\t\t}", "function nH(e){if (window.event){var e = window.event;var elm = e.srcElement;}else{var elm = e.target;};return elm}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}" ]
[ "0.64468443", "0.64468443", "0.64468443", "0.63354677", "0.6324221", "0.62607867", "0.62196535", "0.6146904", "0.6146904", "0.6146904", "0.6146904", "0.6146904", "0.6097845", "0.6097845", "0.60790896", "0.59543264", "0.5935093", "0.5894347", "0.58936274", "0.58936274", "0.58936274", "0.58936274", "0.58936274", "0.58936274", "0.58936274", "0.58594364", "0.58594364", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.58104855", "0.5801392", "0.5796358", "0.5792641", "0.5792641", "0.5792641", "0.5792641", "0.5792641", "0.5792641", "0.5792641", "0.5792294", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.578946", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.57646346", "0.5736259", "0.5727895", "0.5718403", "0.5718403", "0.5718403", "0.5718403", "0.5716173" ]
0.0
-1
Return whether a native keypress event is assumed to be a command. This is required because Firefox fires `keypress` events for key commands (cut, copy, selectall, etc.) even though no character is inserted.
function isKeypressCommand(nativeEvent){return(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command. !(nativeEvent.ctrlKey&&nativeEvent.altKey);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\r\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\r\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\r\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\r\n\t}", "function isKeypressCommand(nativeEvent) {\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}" ]
[ "0.8016589", "0.8016589", "0.8016589", "0.8016589", "0.8016589", "0.8016589", "0.8016589", "0.8008223", "0.799938", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.79982495", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339", "0.7977339" ]
0.0
-1
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values.
function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it // for the error message. return node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is // the fact that we have it is the same as the expected. return expected;}// Even if this property uses a namespace we use getAttribute // because we assume its namespaced name is the same as our config. // To use getAttributeNS we need the local name which we don't have // in our config atm. stringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n\t// for the error message.\n\treturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n\t// the fact that we have it is the same as the expected.\n\treturn expected;}// Even if this property uses a namespace we use getAttribute\n\t// because we assume its namespaced name is the same as our config.\n\t// To use getAttributeNS we need the local name which we don't have\n\t// in our config atm.\n\tstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n }", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n }", "function getValueForProperty(node, name, expected) {\n\t {\n\t var propertyInfo = getPropertyInfo(name);\n\t if (propertyInfo) {\n\t var mutationMethod = propertyInfo.mutationMethod;\n\t if (mutationMethod || propertyInfo.mustUseProperty) {\n\t return node[propertyInfo.propertyName];\n\t } else {\n\t var attributeName = propertyInfo.attributeName;\n\t\n\t var stringValue = null;\n\t\n\t if (propertyInfo.hasOverloadedBooleanValue) {\n\t if (node.hasAttribute(attributeName)) {\n\t var value = node.getAttribute(attributeName);\n\t if (value === '') {\n\t return true;\n\t }\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t return value;\n\t }\n\t if (value === '' + expected) {\n\t return expected;\n\t }\n\t return value;\n\t }\n\t } else if (node.hasAttribute(attributeName)) {\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t // We had an attribute but shouldn't have had one, so read it\n\t // for the error message.\n\t return node.getAttribute(attributeName);\n\t }\n\t if (propertyInfo.hasBooleanValue) {\n\t // If this was a boolean, it doesn't matter what the value is\n\t // the fact that we have it is the same as the expected.\n\t return expected;\n\t }\n\t // Even if this property uses a namespace we use getAttribute\n\t // because we assume its namespaced name is the same as our config.\n\t // To use getAttributeNS we need the local name which we don't have\n\t // in our config atm.\n\t stringValue = node.getAttribute(attributeName);\n\t }\n\t\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t return stringValue === null ? expected : stringValue;\n\t } else if (stringValue === '' + expected) {\n\t return expected;\n\t } else {\n\t return stringValue;\n\t }\n\t }\n\t }\n\t }\n\t}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else {if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (\n shouldRemoveAttribute(\n name,\n expected,\n propertyInfo,\n false,\n )\n ) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (\n shouldRemoveAttribute(name, expected, propertyInfo, false)\n ) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (\n shouldRemoveAttribute(name, expected, propertyInfo, false)\n ) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') return true;\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) return value;\n if (value === '' + expected) return expected;\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n if (propertyInfo.type === BOOLEAN) // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) return stringValue === null ? expected : stringValue;\n else if (stringValue === '' + expected) return expected;\n else return stringValue;\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}" ]
[ "0.81585205", "0.81585205", "0.8143505", "0.8068335", "0.8068335", "0.8064425", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.79319113", "0.79319113", "0.79319113", "0.79319113", "0.7924183", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.78881687", "0.7876727", "0.78763884", "0.7860083", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7830833", "0.78282505", "0.78282505" ]
0.78714687
90
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node, name, expected) {\n if (!isAttributeNameSafe(name)) return;\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) return expected;\n if (!node.hasAttribute(name)) return expected === undefined ? undefined : null;\n var value = node.getAttribute(name);\n if (value === '' + expected) return expected;\n return value;\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}" ]
[ "0.73298323", "0.73298323", "0.7326527", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.732314", "0.73162776", "0.72653466", "0.72653466", "0.72653466", "0.72653466", "0.70887333", "0.70660335", "0.70660335", "0.70660335", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532", "0.7042532" ]
0.7426572
7
around this limitation, we use an opaque type that can only be obtained by passing the value through getToStringValue first.
function toString(value){return''+value;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get stringValue() {}", "__typeToString(value) {\n if (helpers_1.isNullOrUndefined(value)) {\n return value;\n }\n else if (typeof value === 'string') {\n return (value.length > 0) ? `\"${value}\"` : '\"\"';\n }\n else if (typeof value === 'number') {\n return value.toString();\n }\n else if (typeof value === 'boolean') {\n if (value) {\n return 'true';\n }\n else {\n return 'false';\n }\n }\n else {\n throw new Error(`${this.constructor.name}.__typeToString is missing an implementation for type '${typeof value}' and value: ${value}`);\n }\n }", "function string(val) {\n return {value: val, type: 'string'};\n}", "toString() { return this._value; }", "function toString(value) {\n\t switch (typeof value) {\n\t case 'number':\n\t return value + '';\n\t case 'string':\n\t return value;\n\t default:\n\t return JSON.stringify(value);\n\t }\n\t}", "function _valueOf(value) {\n var p = {};\n switch (value.type) {\n case 'object':\n p.value = {\n description: value.className,\n hasChildren: true,\n injectedScriptId: value.ref || value.handle,\n type: 'object'\n };\n break;\n case 'function':\n p.value = {\n description: value.text || 'function()',\n hasChildren: true,\n injectedScriptId: value.ref || value.handle,\n type: 'function'\n };\n break;\n case 'undefined':\n p.value = {description: 'undefined'};\n break;\n case 'null':\n p.value = {description: 'null'};\n break;\n case 'script':\n p.value = {description: value.text};\n break;\n default:\n p.value = {description: value.value};\n break;\n }\n return p;\n }", "function qe(a){return a&&a.implementsGoogStringTypedString?a.getTypedStringValue():a}", "function SoloValue() {}", "handler(value) { return String(value); }", "get valueString () {\r\n\t\treturn this.__valueString;\r\n\t}", "function _toString(val){return val==null?'':(typeof val==='undefined'?'undefined':_typeof(val))==='object'?JSON.stringify(val,null,2):String(val);}", "function castString(value) {\n if (typeof value === \"string\") {\n return value;\n }\n else if (typeof value === \"number\") {\n return \"\" + value;\n }\n else {\n throw new Error(\"Expected a string or number but got \" + getType(value));\n }\n}", "get valueString () {\r\n\t\treturn this._valueString;\r\n\t}", "get valueString() {\n\t\treturn this.__valueString;\n\t}", "function valueToString(x) {\n if (x === void 0) {\n return 'undefined';\n } else if (x === null) {\n return 'null';\n } else if (typeof x === 'boolean') {\n return String(x);\n } else if (typeof x === 'number') {\n if (x !== 0) {\n return String(x);\n } else {\n return (1 / x > 0) ? '0' : '-0';\n }\n } else if (typeof x === 'string') {\n return JSON.stringify(x);\n } else if (typeof x === 'symbol') {\n return String(x);\n } else if (typeof x === 'object') {\n return Object.prototype.toString.call(x);\n } else if (typeof x === 'function') {\n var pd = Object.getOwnPropertyDescriptor(x, 'name');\n if (pd && typeof pd.value === 'string') {\n return 'function:' + pd.value;\n } else {\n return 'function';\n }\n } else if (typeof x === 'pointer') {\n if (String(x) === 'null') {\n return 'pointer:null';\n } else {\n return 'pointer:non-null'; // specific pointer is very rarely interesting for tests\n }\n } else if (typeof x === 'buffer') {\n // No longer used in Duktape 2.x.\n return 'buffer:' + x.length;\n } else {\n return 'unknown:' + String(x);\n }\n }", "function le(a){return a&&a.implementsGoogStringTypedString?a.getTypedStringValue():a}", "function baseToString(value) {\n return objectToString.call(value);\n}", "function getType(value) {\n return ({}).toString.call(value);\n}", "function _toString(val) {\n\t\t return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val);\n\t\t}", "static string(value) {\r\n return new ContractParam(ContractParamType.String, value);\r\n }", "function _toString(val) {\n return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function toString(val){return val==null?'':(typeof val===\"undefined\"?\"undefined\":_typeof2(val))==='object'?JSON.stringify(val,null,2):String(val);}", "function toString(val){return val==null?'':(typeof val===\"undefined\"?\"undefined\":_typeof2(val))==='object'?JSON.stringify(val,null,2):String(val);}", "function getTypeString(val) {\n return Object.prototype.toString.call(val);\n }", "registerValue(value, valueHolder) {\n const category = determineValueTypeCategory(value);\n if (category === ValueTypeCategory.Primitive) {\n valueHolder.valueId = 0;\n valueHolder.value = value;\n }\n else {\n const valueRef = this._serialize(value, 1, null, category);\n Verbose && this._log(`value #${valueRef.valueId} for trace #${valueHolder.traceId}: ${ValueTypeCategory.nameFrom(category)} (${valueRef.serialized})`);\n valueHolder.valueId = valueRef.valueId;\n valueHolder.value = undefined;\n }\n }", "function stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n ) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n return `[object ${getConstructorName(value)}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n }", "toString(val) {\n return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val)\n }", "function stringifyValue(\n\t key,\n\t // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n\t // our internal use, it'll do\n\t value,\n\t) {\n\t try {\n\t if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n\t return '[Domain]';\n\t }\n\n\t if (key === 'domainEmitter') {\n\t return '[DomainEmitter]';\n\t }\n\n\t // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n\t // which won't throw if they are not present.\n\n\t if (typeof global$1 !== 'undefined' && value === global$1) {\n\t return '[Global]';\n\t }\n\n\t // eslint-disable-next-line no-restricted-globals\n\t if (typeof window !== 'undefined' && value === window) {\n\t return '[Window]';\n\t }\n\n\t // eslint-disable-next-line no-restricted-globals\n\t if (typeof document !== 'undefined' && value === document) {\n\t return '[Document]';\n\t }\n\n\t // React's SyntheticEvent thingy\n\t if (isSyntheticEvent(value)) {\n\t return '[SyntheticEvent]';\n\t }\n\n\t if (typeof value === 'number' && value !== value) {\n\t return '[NaN]';\n\t }\n\n\t // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)\n\t if (value === void 0) {\n\t return '[undefined]';\n\t }\n\n\t if (typeof value === 'function') {\n\t return `[Function: ${getFunctionName(value)}]`;\n\t }\n\n\t if (typeof value === 'symbol') {\n\t return `[${String(value)}]`;\n\t }\n\n\t // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n\t if (typeof value === 'bigint') {\n\t return `[BigInt: ${String(value)}]`;\n\t }\n\n\t // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n\t // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n\t // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n\t // we can make sure that only plain objects come out that way.\n\t return `[object ${(Object.getPrototypeOf(value) ).constructor.name}]`;\n\t } catch (err) {\n\t return `**non-serializable** (${err})`;\n\t }\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString (val) {\n\t return val == null\n\t ? ''\n\t : typeof val === 'object'\n\t ? JSON.stringify(val, null, 2)\n\t : String(val)\n\t}", "function _toString(val) {\n return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function string(val) {\n return {value: val, type: 'string', size: Buffer.from(val, 'utf8').byteLength, unit: 8};\n}", "static typeLiteral(value) {\n if (typeof value === 'string') {\n return TypeNames.anyType(`'${value}'`);\n }\n else {\n return TypeNames.anyType(`${value}`);\n }\n }", "function convertValueByType (value, type, _export = false) {\n let _return = ((_exp) => {\n return (v, t) => {\n return _exp ? [_exp(v), t] : v\n }\n })(_export);\n\n let typeint = Helpers.typeToInt(type);\n switch (type) {\n case 'Date':\n return _return(value.getTime(), typeint);\n case 'Number':\n return _return(isNaN(value) ? value.toString() : Number(value), typeint)\n case 'Symbol':\n return _return(String(value).slice(7, -1), typeint);\n default:\n if (_export) {\n return _return(value, typeint);\n } else {\n return _return(Helpers.is(value, ['!Null', '!Boolean', '!Object']) ? value.toString() : value, typeint);\n }\n }\n}", "function validateStringValue(val){\r\n if(TypeUtils.isString(val)){\r\n return val;\r\n }else if(TypeUtils.isNumber(val)){\r\n return val.toString();\r\n }else{\r\n return null;\r\n }\r\n }", "function stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (is.isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${stacktrace.getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n return `[object ${(Object.getPrototypeOf(value) ).constructor.name}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}", "function string() {\n return struct('string', value => {\n return typeof value === 'string';\n });\n}", "function string() {\n return struct('string', value => {\n return typeof value === 'string';\n });\n}", "set stringValue(value) {}", "function $value(value) {\n\t function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n\t function $replace(value) {\n\t var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n\t return replacement.length ? replacement[0] : value;\n\t }\n\t value = $replace(value);\n\t return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n\t }", "_sanitizeName (value, type) {\n if (typeof value !== \"string\") {\n throw new Error(`${type} must be a string`);\n }\n\n return value;\n }", "function valueDescription(input){if(input===undefined){return'undefined';}else if(input===null){return'null';}else if(typeof input==='string'){if(input.length>20){input=input.substring(0,20)+\"...\";}return JSON.stringify(input);}else if(typeof input==='number'||typeof input==='boolean'){return''+input;}else if(typeof input==='object'){if(input instanceof Array){return'an array';}else{var customObjectName=tryGetCustomObjectType(input);if(customObjectName){return\"a custom \"+customObjectName+\" object\";}else{return'an object';}}}else if(typeof input==='function'){return'a function';}else{return fail('Unknown wrong type: '+typeof input);}}", "function SafeValue() {}", "function SafeValue() {}", "function coerceToString(value) {\n return \"\" + (value || '');\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function _toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "function toString(val) {\n\t return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n\t}", "function toString(val) {\n\t return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n\t}", "function valueFromASTUntyped(valueNode) {\n switch (valueNode.kind) {\n case graphql_1.Kind.NULL:\n return null;\n case graphql_1.Kind.INT:\n return parseInt(valueNode.value, 10);\n case graphql_1.Kind.FLOAT:\n return parseFloat(valueNode.value);\n case graphql_1.Kind.STRING:\n case graphql_1.Kind.ENUM:\n case graphql_1.Kind.BOOLEAN:\n return valueNode.value;\n case graphql_1.Kind.LIST:\n return valueNode.values.map(valueFromASTUntyped);\n case graphql_1.Kind.OBJECT:\n var obj_1 = Object.create(null);\n valueNode.fields.forEach(function (field) {\n obj_1[field.name.value] = valueFromASTUntyped(field.value);\n });\n return obj_1;\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected value kind: ' + valueNode.kind);\n }\n}", "function valueFromASTUntyped(valueNode) {\n switch (valueNode.kind) {\n case graphql_1.Kind.NULL:\n return null;\n case graphql_1.Kind.INT:\n return parseInt(valueNode.value, 10);\n case graphql_1.Kind.FLOAT:\n return parseFloat(valueNode.value);\n case graphql_1.Kind.STRING:\n case graphql_1.Kind.ENUM:\n case graphql_1.Kind.BOOLEAN:\n return valueNode.value;\n case graphql_1.Kind.LIST:\n return valueNode.values.map(valueFromASTUntyped);\n case graphql_1.Kind.OBJECT:\n var obj_1 = Object.create(null);\n valueNode.fields.forEach(function (field) {\n obj_1[field.name.value] = valueFromASTUntyped(field.value);\n });\n return obj_1;\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected value kind: ' + valueNode.kind);\n }\n}", "static wrap(value) {\n return new WrappedValue(value);\n }", "static wrap(value) {\n return new WrappedValue(value);\n }", "static wrap(value) {\n return new WrappedValue(value);\n }", "static wrap(value) {\n return new WrappedValue(value);\n }", "static wrap(value) {\n return new WrappedValue(value);\n }", "function get_value(type, data, extra) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlet str = type + \" <code>none</code>\"\n\t\t\t\t\t\t\tfor (let i = 0 ; i < data.length; i++) {\n\t\t\t\t\t\t\t\tlet tmpS = JSON.stringify(data[i])\n\t\t\t\t\t\t\t\tif (tmpS.indexOf(type) !== -1) {\n\t\t\t\t\t\t\t\t\ttmpS = tmpS.replace(/\"/g, \"\")\n\t\t\t\t\t\t\t\t\ttmpS = tmpS.replace(\"{type:\", \"\")\n\t\t\t\t\t\t\t\t\ttmpS = tmpS.replace(\",value:\", \" \")\n\t\t\t\t\t\t\t\t\tstr = tmpS.replace(\"}\", \"\")\n\t\t\t\t\t\t\t\t\tif (extra == true) {str += \" <code>\"+ str.charCodeAt(str.length-1) +\"</code>\"}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (str == undefined) {str = \" <code>undefined</code>\"}\n\t\t\t\t\t\t\treturn str\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\treturn type +\" error\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function toString(val, def) {\n if (is_1.isString(val))\n return val;\n if (!is_1.isValue(val))\n return toDefault(null, def);\n function _toString() {\n return val.toString();\n }\n return function_1.tryWrap(_toString)(def);\n}", "convert(value) {\n return value instanceof expressionProperties_1.StringExpression ? value : new expressionProperties_1.StringExpression(value);\n }", "function toString(val) {\n return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function toString(val) {\n return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function toString(val) {\n return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function toString(val) {\n return val == null ? '' : (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}", "function serializeValue(value) {\n var type = Object.prototype.toString.call(value);\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n var normalized = normalizeValue(value);\n return Object(_is__WEBPACK_IMPORTED_MODULE_2__[/* isPrimitive */ \"i\"])(normalized) ? normalized : type;\n}", "referenceToString(value, wrapper) {\n let [left, right] = this.toStringOptions.referenceWrapper;\n return `${left}${value}${right}`;\n }", "function typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.", "getTypeFromValue(value, originalTypes) {\n if (value && value instanceof mdls.IdentifiableValue) {\n if (value.effectiveIdentifier.isPrimitive) {\n let type = value.effectiveIdentifier.name;\n if (type === 'concept') {\n type = 'CodeableConcept';\n } else if (type === 'xhtml') {\n // xhtml is a weird type in FHIR and should be treated like a string instead\n type = 'string';\n }\n return { code: type };\n } else {\n const def = this._specs.dataElements.findByIdentifier(value.effectiveIdentifier);\n const [type, value2] = this.getSimpleTypeAndValue(originalTypes.map(t => t.code), def, value);\n if (value2 == null) {\n // 13115, 'Couldn\\'t identify appropriate Extension.value[x] value for ${elementId}. Is it an attempt to reference a non-Entry?', 'Check value to ensure it is a primitive, maps to a FHIR datatype, or is an Entry (which allows references)', 'errorNumber'\n logger.error({ elementId: value.effectiveIdentifier.fqn }, '13115');\n return;\n }\n const map = this._specs.maps.findByTargetAndIdentifier(this._target, value2.effectiveIdentifier);\n if (map === undefined) {\n return;\n }\n const code = type;\n const profile = this._profileExporter.lookupProfile(map.identifier, true, true);\n if (code == 'Reference') {\n return { code: code, targetProfile: [profile.url] };\n } else if (common.isCustomProfile(profile) || profile.id !== type) {\n return { code: code, profile: [profile.url] };\n }\n return { code };\n }\n }\n }", "function getStringValue(v) {\n if (v === null) {\n return;\n }\n switch (typeof v) {\n case \"boolean\":\n return;\n case \"number\":\n return;\n case \"object\":\n if (Buffer.isBuffer(v)) {\n return v.toString(\"hex\");\n }\n if (Array.isArray(v)) {\n return v.join(\",\");\n }\n try {\n return JSON.stringify(v);\n }\n catch (e) {\n return;\n }\n case \"string\":\n return v;\n }\n}", "function $value(value) {\n function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n function $replace(value) {\n var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n return replacement.length ? replacement[0] : value;\n }\n value = $replace(value);\n return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n }", "function $value(value) {\n function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n function $replace(value) {\n var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n return replacement.length ? replacement[0] : value;\n }\n value = $replace(value);\n return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n }", "function $value(value) {\n function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n function $replace(value) {\n var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n return replacement.length ? replacement[0] : value;\n }\n value = $replace(value);\n return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n }", "function toString(val) {\n return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val);\n }", "function serializeValue(value) {\r\n var type = Object.prototype.toString.call(value);\r\n // Node.js REPL notation\r\n if (typeof value === 'string') {\r\n return value;\r\n }\r\n if (type === '[object Object]') {\r\n return '[Object]';\r\n }\r\n if (type === '[object Array]') {\r\n return '[Array]';\r\n }\r\n var normalized = normalizeValue(value);\r\n return Object(_is__WEBPACK_IMPORTED_MODULE_0__[\"isPrimitive\"])(normalized) ? normalized : type;\r\n}", "function stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n }", "function stringify(value) {\n if (value === undefined) {\n return 'undefined';\n }\n\n return EJSON.stringify(value);\n }", "function SafeValue() { }", "function serializeValue(value) {\n var type = Object.prototype.toString.call(value);\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n var normalized = normalizeValue(value);\n return Object(_is__WEBPACK_IMPORTED_MODULE_1__[\"isPrimitive\"])(normalized) ? normalized : type;\n}", "function $value(value) {\n function hasReplaceVal(val) {\n return function (obj) {\n return obj.from === val;\n };\n }\n\n function $replace(value) {\n var replacement = map(filter(self.replace, hasReplaceVal(value)), function (obj) {\n return obj.to;\n });\n return replacement.length ? replacement[0] : value;\n }\n\n value = $replace(value);\n return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n }", "function valueToString(val) {\n\tif ($.isArray(val)) {\n\t\treturn arrayToString(val);\n\t} else if ($.isPlainObject(val)) {\n\t\treturn objectToString(val);\n\t} else if ($.isNumeric(val)) {\n\t\treturn val;\n\t} else if ($.isEmptyObject(val)) {\n\t\treturn '\"EmptyObject\"';\n\t} else if ($.isFunction(val)) {\n\t\treturn '\"Function\"';\n\t} else if($.isWindow(val)) {\n\t\treturn '\"Window\"';\n\t} else if ($.isXMLDoc(val)) {\n\t\treturn '\"XMLDoc\"';\n\t} else {\n\t\tvar valType = $.type(val);\n\t\tif (valType == 'string') {\n\t\t\treturn '\"' + escapeDoubleQuotes(val) + '\"';\n\t\t} else if (valType == 'object') {\n\t\t\treturn '\"Object\"';\n\t\t} else {\n\t\t\treturn '\"' + valType + '\"';\n\t\t}\n\t}\n}", "function toString(val) {\n return val == null ?\n '' :\n typeof val === 'object' ?\n JSON.stringify(val, null, 2) :\n String(val)\n }", "toString() {\n return this.value;\n }", "toString() {\n return this.value\n }", "function toString(val) {\n return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val);\n}" ]
[ "0.66021305", "0.65279466", "0.64090204", "0.613257", "0.6110995", "0.60871893", "0.60189444", "0.59371245", "0.58975637", "0.58842117", "0.5880046", "0.58630496", "0.58445084", "0.58295125", "0.58239096", "0.5776287", "0.57746315", "0.57608354", "0.5747429", "0.5727408", "0.57236487", "0.57158095", "0.57158095", "0.5709659", "0.5695785", "0.56820095", "0.5669052", "0.56640446", "0.56202906", "0.56202906", "0.56202906", "0.56202906", "0.56202906", "0.56202906", "0.56202906", "0.5619707", "0.56175363", "0.56100076", "0.5590939", "0.5576817", "0.5571315", "0.5570358", "0.5570358", "0.556426", "0.55472004", "0.5533632", "0.5525714", "0.5523069", "0.5523069", "0.5519438", "0.551229", "0.551229", "0.551229", "0.551229", "0.551229", "0.551229", "0.551229", "0.551229", "0.551229", "0.55080664", "0.55080664", "0.5491295", "0.5491295", "0.54821837", "0.54821837", "0.54821837", "0.54821837", "0.54821837", "0.5478779", "0.54724175", "0.5465292", "0.5460938", "0.5460938", "0.5460938", "0.5460938", "0.5441028", "0.54391485", "0.5437713", "0.543691", "0.54315543", "0.5431197", "0.5431197", "0.5431197", "0.5417615", "0.5413243", "0.5405107", "0.5393617", "0.53803426", "0.53753954", "0.5368408", "0.5364351", "0.5357805", "0.53526664", "0.5351259", "0.53485304" ]
0.55542046
49
Implements an host component that allows setting these optional props: `checked`, `value`, `defaultChecked`, and `defaultValue`. If `checked` or `value` are not supplied (or null/undefined), user actions that affect the checked state or value will trigger updates to the element. If they are supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the props must change in order for the rendered element to be updated. The rendered element will be initialized as unchecked (or `defaultChecked`) with an empty value (or `defaultValue`). See
function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);\n this.value = props.value;\n this.id = RadioButton.idGenerator(this.value);\n this.groupName = props.groupName;\n this.optional = {};\n if (typeof props.onChangeCallback === 'function') {\n this.optional.onChangeCallback =\n props.onChangeCallback.bind(\n this.groupName,\n this.value);\n }\n if (props.checked === true) {\n this.optional.defaultChecked = true;\n }\n }", "function CheckboxBase(props, context) {\n var _this = _super.call(this, props, context) || this;\n _this._checkBox = React.createRef();\n _this._onFocus = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onFocus) {\n inputProps.onFocus(ev);\n }\n };\n _this._onBlur = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onBlur) {\n inputProps.onBlur(ev);\n }\n };\n _this._onChange = function (ev) {\n var _a = _this.props, disabled = _a.disabled, onChange = _a.onChange;\n var _b = _this.state, isChecked = _b.isChecked, isIndeterminate = _b.isIndeterminate;\n if (!disabled) {\n if (!isIndeterminate) {\n if (onChange) {\n onChange(ev, !isChecked);\n }\n if (_this.props.checked === undefined) {\n _this.setState({ isChecked: !isChecked });\n }\n }\n else {\n if (onChange) {\n onChange(ev, isChecked);\n }\n if (_this.props.indeterminate === undefined) {\n _this.setState({ isIndeterminate: false });\n }\n }\n }\n };\n _this._onRenderLabel = function (props) {\n var label = props.label;\n return label ? (React.createElement(\"span\", { \"aria-hidden\": \"true\", className: _this._classNames.text }, label)) : null;\n };\n Utilities_1.initializeComponentRef(_this);\n if (process.env.NODE_ENV !== 'production') {\n Utilities_1.warnMutuallyExclusive('Checkbox', props, {\n checked: 'defaultChecked',\n indeterminate: 'defaultIndeterminate'\n });\n }\n _this._id = _this.props.id || Utilities_1.getId('checkbox-');\n _this.state = {\n isChecked: !!(props.checked !== undefined ? props.checked : props.defaultChecked),\n isIndeterminate: !!(props.indeterminate !== undefined ? props.indeterminate : props.defaultIndeterminate)\n };\n Utilities_1.initializeFocusRects();\n return _this;\n }", "function CheckboxBase(props, context) {\n var _this = _super.call(this, props, context) || this;\n _this._checkBox = Object(__WEBPACK_IMPORTED_MODULE_2__Utilities__[\"B\" /* createRef */])();\n _this._onFocus = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onFocus) {\n inputProps.onFocus(ev);\n }\n };\n _this._onBlur = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onBlur) {\n inputProps.onBlur(ev);\n }\n };\n _this._onClick = function (ev) {\n var _a = _this.props, disabled = _a.disabled, onChange = _a.onChange;\n var isChecked = _this.state.isChecked;\n ev.preventDefault();\n ev.stopPropagation();\n if (!disabled) {\n if (onChange) {\n onChange(ev, !isChecked);\n }\n if (_this.props.checked === undefined) {\n _this.setState({ isChecked: !isChecked });\n }\n }\n };\n _this._onRenderLabel = function (props) {\n var label = props.label;\n return label ? __WEBPACK_IMPORTED_MODULE_1_react__[\"createElement\"](\"span\", { className: _this._classNames.text }, label) : null;\n };\n _this._warnMutuallyExclusive({\n checked: 'defaultChecked'\n });\n _this._id = Object(__WEBPACK_IMPORTED_MODULE_2__Utilities__[\"Z\" /* getId */])('checkbox-');\n _this.state = {\n isChecked: !!(props.checked !== undefined ? props.checked : props.defaultChecked)\n };\n return _this;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function Toggle(props) {\n var size = props.size,\n children = props.children,\n value = props.value,\n onChange = props.onChange,\n defaultChecked = props.defaultChecked,\n controlledChecked = props.checked,\n disabled = props.disabled,\n className = props.className;\n var isControlled = !(0,_shared_helpers_js__WEBPACK_IMPORTED_MODULE_2__.isNil)(controlledChecked);\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultChecked),\n _useState2 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.slicedToArray)(_useState, 2),\n checked = _useState2[0],\n setChecked = _useState2[1];\n\n var isChecked = isControlled ? controlledChecked : checked;\n\n var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n _useState4 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.slicedToArray)(_useState3, 2),\n animatingPress = _useState4[0],\n setAnimatingPress = _useState4[1];\n\n var _usePress = (0,_hooks_js__WEBPACK_IMPORTED_MODULE_5__.usePress)({\n onPress: function onPress() {\n return setAnimatingPress(true);\n },\n disabled: disabled\n }),\n isPressed = _usePress.isPressed,\n pressProps = _usePress.pressProps;\n\n (0,_shared_hooks_useUpdateLayoutEffect_js__WEBPACK_IMPORTED_MODULE_6__.default)(function () {\n setAnimatingPress(true);\n }, [isChecked]);\n\n function handleChange(evt) {\n onChange(evt, evt.target.checked);\n\n if (!evt.defaultPrevented && !isControlled) {\n setChecked(evt.target.checked);\n }\n }\n\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"label\", (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.extends)({\n className: (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_7__.default)(className, cn({\n pointed: !disabled\n }))\n }, pressProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_VisuallyHidden_index_js__WEBPACK_IMPORTED_MODULE_8__.default, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"input\", {\n type: \"checkbox\",\n value: value,\n disabled: disabled,\n checked: isChecked,\n onChange: handleChange\n })), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_Indicator_js__WEBPACK_IMPORTED_MODULE_9__.default, {\n setAnimatingPress: setAnimatingPress,\n animatingPress: animatingPress || isPressed,\n disabled: disabled,\n isChecked: isChecked,\n size: size\n }))\n );\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked:\n checked != null ? checked : node._wrapperState.initialChecked,\n });\n\n return hostProps;\n }", "_changeCheckState(optionalValue) {\n const that = this;\n let oldValue = that.checked;\n\n if ((oldValue === null) && (optionalValue !== undefined)) {\n that.$.fireEvent('change', { 'value': optionalValue, 'oldValue': null });\n that.checked = optionalValue;\n that._updateThumbPosition();\n return;\n }\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n that.checked = !that.checked;\n }\n\n that._updateThumbPosition();\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue });\n that._updateHidenInputNameAndValue();\n }", "function useCheckboxGroup(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n defaultValue = _props.defaultValue,\n valueProp = _props.value,\n onChangeProp = _props.onChange,\n isNative = _props.isNative;\n\n var _useState = (0, _react.useState)(defaultValue || []),\n valueState = _useState[0],\n setValue = _useState[1];\n\n var _useControllableProp = (0, _hooks.useControllableProp)(valueProp, valueState),\n isControlled = _useControllableProp[0],\n value = _useControllableProp[1];\n\n var updateValue = (0, _react.useCallback)(function (nextState) {\n if (!isControlled) {\n setValue(nextState);\n }\n\n onChangeProp == null ? void 0 : onChangeProp(nextState);\n }, [isControlled, onChangeProp]);\n var onChange = (0, _react.useCallback)(function (eventOrValue) {\n if (!value) return;\n var isChecked = (0, _utils.isInputEvent)(eventOrValue) ? eventOrValue.target.checked : !value.includes(eventOrValue);\n var selectedValue = (0, _utils.isInputEvent)(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n var nextValue = isChecked ? (0, _utils.addItem)(value, selectedValue) : (0, _utils.removeItem)(value, selectedValue);\n updateValue(nextValue);\n }, [updateValue, value]);\n return {\n value: value,\n onChange: onChange,\n setValue: updateValue,\n getCheckboxProps: function getCheckboxProps(props) {\n var _extends2;\n\n if (props === void 0) {\n props = {};\n }\n\n var checkedKey = isNative ? \"checked\" : \"isChecked\";\n return _extends({}, props, (_extends2 = {}, _extends2[checkedKey] = value.includes(props.value), _extends2.onChange = onChange, _extends2));\n }\n };\n}", "function Checkbox({value, title, onClick}) {\n return <Wrapper onClick={onClick}>\n <Indicator value={value} />\n {title}\n </Wrapper>\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}" ]
[ "0.6890401", "0.63897663", "0.6258759", "0.62114686", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6131906", "0.6130953", "0.6111307", "0.6089885", "0.60427785", "0.6038922", "0.60120076", "0.595116", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634", "0.5899634" ]
0.6786971
7
For number inputs, the display value loses trailing decimal points. For email inputs, Chrome raises "The specified value is not a valid email address". Here we check to see if the defaultValue has actually changed, avoiding these problems when the user is inputting text
function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js type!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=''+node._wrapperState.initialValue;}else if(node.defaultValue!==''+value){node.defaultValue=''+value;}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=''+node._wrapperState.initialValue;}else if(node.defaultValue!==''+value){node.defaultValue=''+value;}}}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n }\n else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : parseInt(value);\n const signedNumber = !canBeNegative\n ? Math.abs(valueAsNumber)\n : valueAsNumber;\n\n return !isNaN(signedNumber) ? signedNumber : defaultValue;\n } else if (canBeEmpty) {\n return '';\n }\n\n return defaultValue;\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}" ]
[ "0.6748244", "0.6745956", "0.6745956", "0.66758955", "0.66758955", "0.6567232", "0.65263164", "0.6493208", "0.6483082", "0.6483082", "0.6483082", "0.6483082", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.64569265", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.64147395", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.63645613", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067" ]
0.668249
6
SECTION: handle `change` event
function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "handleChange(event) {\n\n }", "handleEventChange() {\n }", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "handleChange (event) {\n }", "onChanged(e){}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "function handleChange(ev) {\n\n switch (ev.name) {\n case \"duration\":\n handleDurationChange(ev);\n break;\n case \"type\":\n handleTypeChange(ev);\n break;\n case \"unit\":\n handleUnitChange(ev);\n break;\n case \"display\":\n handleDisplayChange(ev);\n break;\n }\n}", "handleChange(event){\n changeHandler(event,this);\n }", "function onChange() {\n console.log(\"something changed...\");\n \n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "handleChange(event) {\n let elemName = event.target.name;\n let value = event.target.value;\n //reason picklist is selected\n if (elemName === \"reasonCombo\"){\n this.objInputFields.sReason = value;\n this.reasonSelected = true;\n }\n //comment text area is selected\n else if (elemName === \"commentField\"){\n this.objInputFields.sComment = value;\n } \n \n //this.sReason = event.target.value;\n //this.reasonSelected = true;\n this.bFormEdited = true;\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "handleChange() {\r\n var e = document.getElementById(\"selection\")\r\n // call passed in function to spawn any necessary actions on the parent component.\r\n this.props.sendChange(e.value)\r\n }", "function changeEvent(event){\n setTipo(event.target.value);\n x = unidades.transformar_lista_longitud(x, old_unit.ds_Longitud, usr_unit.ds_Longitud);\n old_unit.ds_Longitud = usr_unit.ds_Longitud;\n usr_unit.ds_Longitud = event.target.value;\n setValor(unidades.transformar_unidad_longitud(total,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n setTotal(unidades.transformar_unidad_longitud(total,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n setValor4(unidades.transformar_unidad_longitud(valor4,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n usr_unit.saveConfig(\"1\");\n }", "function handleChange(event) {\n switch (event.target.name) {\n case \"degree\":\n setDegree(event.target.value);\n break;\n case \"major\":\n setMajor(event.target.value);\n break;\n case \"organization\":\n setOrganization(event.target.value);\n break;\n default:\n break;\n }\n }", "function handleChanged(event) {\n console.log(event.target.value);\n setName(event.target.value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onChange () {}", "onChange () {}", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange(e) {\n switch(e.target.name){\n case \"numLines\":\n this.props.updateDefinitionsNumLines(e.target.value);\n break;\n case \"extraspace\":\n this.props.updateDefinitionsExtraSpace(e.target.checked);\n break;\n case \"addHowToSolve\":\n this.props.updateAddHowToSolve(e.target.checked);\n break;\n case \"listType\":\n this.props.updateListType(e.target.value);\n break;\n default:\n break;\n }\n }", "function handleChange(e) {\n const value = e.target.value;\n const name = e.target.name;\n dispatch({ value: value, update: name });\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function optionChanged(){\n init();\n}", "function handleFieldChange(name, value) {\n console.log('handle field change', name, value);\n}", "function changeHandler(e){ //tuntuu redundantilta, vois poistaa myöhemmin emt.\n //console.log(e.target)\n //e.preventDefault();\n if(e.target.type === \"file\"){\n setFormObjects({\n ...FormObjects,\n [e.target.name]: [(e.target.value).match(/[^\\\\/]*$/)[0]]\n })\n }\n else{\n setFormObjects({\n ...FormObjects,\n [e.target.name]: [e.target.value]\n })\n }\n setChanges(true)\n }", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "handleTechChange(e) {\n console.log(\"tech name change:\" + e.target.value);\n }", "handleChange() {\n this.$emit(\"change\");\n }", "handleChange() {\n this.$emit(\"change\");\n }", "change() {\n\n const divs = this.parent.querySelectorAll('[class^=\"toggle-select-\"],[class*=\" toggle-select-\"]');\n const selectOption = this.select.options[this.select.selectedIndex];\n let value;\n\n if(this.options.field == 'group')\n {\n value = selectOption.parentNode.label ? selectOption.parentNode.label.toLowerCase() : null;\n } else {\n value = selectOption.value;\n }\n\n // Toggle each div\n divs.forEach(div => {\n const isVisible = div.classList.contains('toggle-select-'+value);\n const inputs = div.querySelectorAll('select,textarea,input:not([type=\"hidden\"],[type=\"checkbox\"],[type=\"radio\"])');\n\n // Toggle the visible div\n isVisible ? div.classList.remove('d-none') : div.classList.add('d-none');\n\n // Toggle the inputs\n if(inputs)\n {\n this.toggleForm(inputs,isVisible);\n }\n\n });\n\n // Run the custom callback\n this.options.onChanged(value);\n\n }", "function optionChanged(id) {\n\n getData(id);\n}", "function handleChange(event, value) {\n setValue(value);\n }", "function optionChanged(id) {\n getData(id);\n}", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "onChange(item) {}", "handleChange(e) {\n\t\tif (e.target.type === 'checkbox') {\n\t\t\tthis.props.updateSetting(e.target.name, e.target.checked)\n\t\t} else {\n\t\t\te.preventDefault()\n\t\t\tthis.props.updateSetting(e.target.name, e.target.value)\n\t\t}\n\t}", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "handleChange (changeEvent){\n\t\tthis.setState({\n\t\t\tselectedOption : changeEvent.target.value\n\t\t});\n\t}", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "function handleChange(event) {\n //event.preventDefault()\n \n if(!event.target.value){\n console.log('Input limpio');\n setValue('limpio');\n }\n setValue(event.target.value);\n \n \n\n }", "function shouldUseChangeEvent(elem){return elem.nodeName==='SELECT'||elem.nodeName==='INPUT'&&elem.type==='file';}", "function onChange(event)\n\t{\n\t\tconst val = event.target.value\n\t\tsetValue(val)\n\t}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleDomEvent () {\n\t \tthis._ractive.binding.handleChange();\n\t }", "function onChange(e) {\n setValue(e.target.value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "function handleEventFieldChange(event) {\n console.log('handle field change', event);\n}", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changeHandler(){\n\n // shortcut\n const $this = $(this);\n\n // set value in slider\n if( $this.data('type') == 'min' ) {\n $els.sliderCont.slider( 'values', 0, $this.val() );\n } else {\n $els.sliderCont.slider( 'values', 1, $this.val() );\n }\n\n }", "function handleChange(e) {\n\t\tsetNewData({\n\t\t\t...newData,\n\t\t\t[e.target.name]: e.target.value,\n\t\t})\n\t}", "function shouldUseChangeEvent(elem){return elem.nodeName === 'SELECT' || elem.nodeName === 'INPUT' && elem.type === 'file';}", "function handleChangeType(event){\n const {name, value} = event.currentTarget\n changeFilde(name, value);\n}", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "_evtChange(event) { }", "handleChangeInLookup(event){\n //Show spinner : wire will hide the spinner at the end\n this.isLoading = true;\n var value = event.detail.value.length>0?event.detail.value[0]:BLANK_STRING;\n //set the value based on the lookup changed\n switch (event.detail.source) {\n case MANAGER_LOOKUP:\n this.selectedManager = value;\n break;\n case USER_LOOKUP:\n this.selectedUser = value;\n break;\n case PROJECT_LOOKUP:\n this.selectedProject = value;\n break;\n default:\n console.log('Invalid Field');\n break;\n }\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "onChange(event){\n this.props.onchange({target:{name:this.props.hNode.propertyName, value: event.target.checked}});\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function optionChanged(id) {\n charting(id);\n meta(id);\n}// change(id)", "change(e){\n this.props.onChange(e);\n }", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "variantChange(event) {\n this.variant = event.target.value;\n this.sname = event.target.name;\n\n // Publish Lightning Message via channel ListSelectorMessageChannel__c\n let message = {variantValue: this.variant};\n publish(this.messageContext, LISTMC, message);\n }", "function handleChange(e, func) {\n const {value} = e.target;\n console.log(e.target.id,\":\",value);\n func(value);\n }", "function handleChange(event) {\n // console.log(event.target.value)\n switch (event.target.name) {\n case \"name\":\n setName(event.target.value);\n break;\n case \"location\":\n setLocation(event.target.value);\n break;\n case \"phone\":\n setPhone(event.target.value);\n break;\n default:\n break;\n }\n }", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "addChangeListener(callback) {\n this.on('change', callback);\n }", "handleChange(e) {\n const elem = e.target;\n // Check that the event was triggered by the right <select> button.\n if ((\" \" + elem.className + \" \" ).indexOf( \" \" + this.props.seqLenClass + \" \" ) > -1) {\n // Call render and override the charsPerLine setting with whatever the user specified.\n this.callRender({charsPerLine: elem.value});\n }\n }", "handleChange(e) {\r\n // Prevent legacy form post\r\n e.preventDefault();\r\n\r\n // Get field name and value from event\r\n const target = e.target;\r\n let value = target.type === 'checkbox' ? target.checked : target.value;\r\n const name = target.name;\r\n\r\n this.validateAndSaveChange(name, value);\r\n }", "changeSetting(event){\n\t\tlet type = event.target.type;\n\t\tlet val = event.target.value;\n\t\tswitch(type){\n\t\t\tcase 'checkbox':\n\t\t\t\tval = event.target.checked;\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\tval = parseInt(val);\n\t\t\t\tbreak;\n\t\t}\n\t\tconsole.log('Changed: ', event.target.id, val);\n\t\tthis.changes[event.target.id] = val;\n\t\tthis.setState({changes: clone(this.changes)});\n\t}", "function handleChange(value) {\n console.log(`selected ${value}`);\n }", "function handleChange(e) {\n setName(e.target.value);\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "formChanged() {}" ]
[ "0.7854437", "0.77068484", "0.7598262", "0.7521723", "0.7511005", "0.7504069", "0.7448793", "0.7420877", "0.7401912", "0.7386296", "0.73666596", "0.73555636", "0.73510677", "0.73496395", "0.73438835", "0.7339759", "0.73381084", "0.73354316", "0.73326874", "0.7328343", "0.73218906", "0.7272271", "0.7213144", "0.7172082", "0.7172082", "0.7135516", "0.70593154", "0.7057752", "0.7047312", "0.70369786", "0.7017632", "0.70171803", "0.6953554", "0.6949268", "0.69473183", "0.6925149", "0.69247746", "0.69247746", "0.6921572", "0.6921572", "0.6887625", "0.6873889", "0.6868702", "0.6816885", "0.6800813", "0.6784801", "0.6770731", "0.67362815", "0.67204165", "0.67096955", "0.67090863", "0.67090863", "0.67080957", "0.6702231", "0.6702231", "0.6699963", "0.6680338", "0.66771644", "0.6664612", "0.66323525", "0.66266215", "0.662305", "0.66136885", "0.6604868", "0.66048104", "0.6604488", "0.65987414", "0.6592236", "0.65880716", "0.6582374", "0.6572207", "0.65722036", "0.6569591", "0.65623695", "0.65623695", "0.6558127", "0.65553373", "0.6545838", "0.65361977", "0.6535871", "0.652795", "0.6522288", "0.6516211", "0.6514555", "0.6513177", "0.65122265", "0.65082526", "0.64982486", "0.6486231", "0.64862174", "0.6480262", "0.6476834", "0.6467417", "0.6465933", "0.6464175", "0.646153", "0.6461519", "0.6456544", "0.64546096", "0.64537436", "0.6452145" ]
0.0
-1
(For IE <=9) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');// Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n// on DOM elements\nObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else{activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetID){activeElement = target;activeElementID = targetID;activeElementValue = target.value;activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target, activeElementInst = targetInst, activeElement.attachEvent(\"onpropertychange\", handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t\t activeElement = target;\n\t\t activeElementID = targetID;\n\t\t activeElementValue = target.value;\n\t\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\t\n\t\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t\t // on DOM elements\n\t\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t\t}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent(\n 'onpropertychange',\n handlePropertyChange,\n );\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}" ]
[ "0.72815424", "0.719423", "0.719423", "0.7045778", "0.7033005", "0.70243186", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.69352555", "0.6852122", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68518627", "0.68102723", "0.6800463", "0.6800463", "0.6800463", "0.6800463", "0.6800463", "0.6800463", "0.6800463", "0.6794572", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974", "0.6791974" ]
0.7499227
8
(For IE <=9) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners(useCapturing) {\r\r\n // get all div in list\r\r\n var divList = document.getElementsByTagName('div');\r\r\n // set event to each div\r\r\n for(var i = 0, len = divList.length; i < len; i++) {\r\r\n var element = divList[i];\r\r\n eventUtility.removeEvent(element, \"click\", markDiv, useCapturing);\r\r\n }\r\r\n}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "function detachEvents() {\n if (browser.addEventListener) {\n // remove current event listeners\n element.removeEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);\n element.removeEventListener('mousedown', events, false);\n element.removeEventListener('webkitTransitionEnd', events, false);\n element.removeEventListener('msTransitionEnd', events, false);\n element.removeEventListener('oTransitionEnd', events, false);\n element.removeEventListener('otransitionend', events, false);\n element.removeEventListener('transitionend', events, false);\n root.removeEventListener('resize', events, false);\n } else {\n root.onresize = null;\n }\n }", "removeEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.removeEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\t\tthis._triggerEvent = undefined;\n\t}", "function removeAddedEvents() {\n // remove added native events\n nativeEvents.forEach(function (_ref) {\n var key = _ref.key,\n listener = _ref.listener;\n element.removeEventListener(key, listener);\n });\n nativeEvents = [];\n }", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "detachFromDOM() {\n\t\tthis.trackNode.removeEventListener('click', this.onTrackClick);\n\t\tthis.noValueNode.removeEventListener('click', this.onNoValueNodeClick);\n\n\t\tthis.handleNode.removeEventListener('mousedown', this.onHandleMouseDown);\n\t\tdocument.removeEventListener('mousemove', this.onDocumentMouseMove);\n\t\tdocument.removeEventListener('mouseup', this.onDocumentMouseUp);\n\n\t\tthis.handleNode.removeEventListener('touchstart', this.onHandleTouchStart);\n\t\tdocument.removeEventListener('touchmove', this.onDocumentTouchMove);\n\t\tdocument.removeEventListener('touchend', this.onDocumentTouchEnd);\n\n\t\tthis.handleNode.removeEventListener('keydown', this.onHandleKeyPress);\n\t}", "_removeListeners() {\n try {\n WINDOW$1.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW$1.removeEventListener('blur', this._handleWindowBlur);\n WINDOW$1.removeEventListener('focus', this._handleWindowFocus);\n\n restoreRecordDroppedEvent();\n\n if (this._performanceObserver) {\n this._performanceObserver.disconnect();\n this._performanceObserver = null;\n }\n } catch (err) {\n this._handleException(err);\n }\n }", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "function xRemoveEventListener(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e)))return;\r\n eT=eT.toLowerCase();\r\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "detachListeners () {\n if (this.listenersAttached) {\n window.removeEventListener('resize', this.handleWindowResize)\n window.removeEventListener('mouseup', this.handleMouseUp)\n window.removeEventListener('touchend', this.handleTouchEnd)\n window.removeEventListener('touchcancel', this.handleTouchEnd)\n window.removeEventListener('pointerdown', this.handlePointerEvent)\n window.removeEventListener('pointermove', this.handlePointerEvent)\n window.removeEventListener('pointerup', this.handlePointerEvent)\n window.removeEventListener('pointercancel', this.handlePointerEvent)\n this.listenersAttached = false\n }\n }", "removeEvents()\n {\n if (!this.interactionDOMElement)\n {\n return;\n }\n\n ticker.shared.remove(this.update);\n\n if (window.navigator.msPointerEnabled)\n {\n this.interactionDOMElement.style['-ms-content-zooming'] = '';\n this.interactionDOMElement.style['-ms-touch-action'] = '';\n }\n else if (this.supportsPointerEvents)\n {\n this.interactionDOMElement.style['touch-action'] = '';\n }\n\n window.document.removeEventListener('mousemove', this.onMouseMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onMouseDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onMouseOut, true);\n this.interactionDOMElement.removeEventListener('mouseover', this.onMouseOver, true);\n window.removeEventListener('mouseup', this.onMouseUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onTouchStart, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onTouchEnd, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onTouchMove, true);\n }\n\n if (this.supportsPointerEvents)\n {\n window.document.removeEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('pointerout', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n window.removeEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n /**\n * If pointer events aren't available on a device, this will turn either the touch or\n * mouse events into pointer events. This allows a developer to just listen for emitted\n * pointer events on interactive sprites\n */\n if (this.normalizeTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n }\n\n if (this.normalizeMouseEvents)\n {\n window.document.removeEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n window.removeEventListener('mouseup', this.onPointerUp, true);\n }\n }\n\n this.interactionDOMElement = null;\n\n this.eventsAdded = false;\n }", "_removeEventListeners() {\n\n if (this._isNative) {\n this.selectEl.removeEventListener('change', this._onInputBound);\n }\n else {\n this.el.removeEventListener('change', this._onInputBound, true);\n }\n }", "function xRemoveEventListener(e,eT,eL,cap)\n{\n if(!(e=xGetElementById(e)))return;\n eT=eT.toLowerCase();\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\n else e['on'+eT]=null;\n}", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "function xRemoveEventListener2(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e))) return;\r\n eT=eT.toLowerCase();\r\n if(e==window) {\r\n if(eT=='resize' && e.xREL) {e.xREL=null; return;}\r\n if(eT=='scroll' && e.xSEL) {e.xSEL=null; return;}\r\n }\r\n if(e.removeEventListener) e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent) e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "function removeEventListeners() {\n\n eventsAreBound = false;\n\n document.removeEventListener('keydown', onDocumentKeyDown, false);\n window.removeEventListener('hashchange', onWindowHashChange, false);\n window.removeEventListener('resize', onWindowResize, false);\n\n dom.wrapper.removeEventListener('touchstart', onTouchStart, false);\n dom.wrapper.removeEventListener('touchmove', onTouchMove, false);\n dom.wrapper.removeEventListener('touchend', onTouchEnd, false);\n\n if (window.navigator.msPointerEnabled) {\n dom.wrapper.removeEventListener('MSPointerDown', onPointerDown, false);\n dom.wrapper.removeEventListener('MSPointerMove', onPointerMove, false);\n dom.wrapper.removeEventListener('MSPointerUp', onPointerUp, false);\n }\n\n if (config.progress && dom.progress) {\n dom.progress.removeEventListener('click', onProgressClicked, false);\n }\n\n if (config.controls && dom.controls) {\n ['touchstart', 'click'].forEach(function (eventName) {\n dom.controlsLeft.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateLeftClicked, false);\n });\n dom.controlsRight.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateRightClicked, false);\n });\n dom.controlsUp.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateUpClicked, false);\n });\n dom.controlsDown.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateDownClicked, false);\n });\n dom.controlsPrev.forEach(function (el) {\n el.removeEventListener(eventName, onNavigatePrevClicked, false);\n });\n dom.controlsNext.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateNextClicked, false);\n });\n });\n }\n\n }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function detatchElementEvents() {\n var element = this.element;\n\n if (element.nodeName === 'FORM') {\n element.removeEventListener('submit', this.submitAjaxHandler);\n }\n\n switch (element.getAttribute('data-ajaxable-trigger-type')) {\n case 'timeout':\n clearTimeout(this.requestTimerId);\n break;\n\n case 'interval':\n clearTimeout(this.requestIntervalId);\n break;\n\n case 'click':\n element.removeEventListener('click', this.clickAjaxHandler);\n break;\n\n case 'hover':\n element.removeEventListener('click', this.hoverAjaxHandler);\n break;\n\n default:\n break;\n }\n}", "removeAllListeners() {\n const listeners = this.eventListeners;\n let i, thisObj;\n\n for (const event in listeners) {\n const bucket = listeners[event]; // We iterate backwards since we call removeListener which will splice out of\n // this array as we go...\n\n for (i = bucket.length; i-- > 0;)\n /* empty */\n {\n const cfg = bucket[i];\n this.removeListener(event, cfg);\n thisObj = cfg.thisObj;\n\n if (thisObj && thisObj.untrackDetachers) {\n thisObj.untrackDetachers(this);\n }\n }\n }\n }", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "removeAllListeners() {\n\t\tfor (let i = 0; i < this.eventHandles_.length; i++) {\n\t\t\tthis.eventHandles_[i].removeListener();\n\t\t}\n\n\t\tthis.eventHandles_ = [];\n\t}", "unWireEvent() {\n this.viewerContainer.removeEventListener('scroll', this.scrollHandler);\n this.viewerContainer.removeEventListener('mousedown', this.onMouseDownInternal);\n this.viewerContainer.removeEventListener('mousemove', this.onMouseMoveInternal);\n if (!Browser.isDevice) {\n this.editableDiv.removeEventListener('keypress', this.onKeyPressInternal);\n if (Browser.info.name === 'chrome') {\n this.editableDiv.removeEventListener('textInput', this.onTextInput);\n }\n }\n else {\n this.editableDiv.removeEventListener('input', this.onTextInputInternal);\n }\n this.editableDiv.removeEventListener('paste', this.onPaste);\n this.viewerContainer.removeEventListener('contextmenu', this.onContextMenu);\n this.editableDiv.removeEventListener('blur', this.onFocusOut);\n this.editableDiv.removeEventListener('keydown', this.onKeyDownInternal);\n this.editableDiv.removeEventListener('compositionstart', this.compositionStart);\n this.editableDiv.removeEventListener('compositionupdate', this.compositionUpdated);\n this.editableDiv.removeEventListener('compositionend', this.compositionEnd);\n this.viewerContainer.removeEventListener('mouseup', this.onMouseUpInternal);\n if (!isNullOrUndefined(this.iframe)) {\n this.iframe.removeEventListener('load', this.onIframeLoad);\n }\n this.viewerContainer.removeEventListener('dblclick', this.onDoubleTap);\n window.removeEventListener('resize', this.onWindowResize);\n window.removeEventListener('keyup', this.onKeyUpInternal);\n window.removeEventListener('mouseup', this.onImageResizer);\n window.removeEventListener('touchend', this.onImageResizer);\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "function dettachEvents() {\n // Remove custom events from the window\n window.removeEventListener(\"touch\", handleInteruption, false);\n window.removeEventListener(\"mousewheel\", handleInteruption, false);\n window.removeEventListener(\"mousedown\", handleInteruption, false);\n}", "function clearListener(elementId) {\n\t\tvar element = document.getElementById(elementId);\n\t\tif (element) {\n\t\t\telement.replaceWith(element.cloneNode(true));\n\t\t}\n\t}", "removeEventListeners() {\n // Empty in base class.\n }", "function clearEvents() {\n\t\t\tvar ident;\n\t\t\tfor (ident in listenersByEventId) {\n\t\t\t\tr.removeListener(ident);\n\t\t\t}\n\t\t}", "_removeEventListeners() {\n\n window.removeEventListener('resize', this._onResizeBound);\n window.removeEventListener('orientationchange', this._onResizeBound);\n\n this.tabListEl.removeEventListener('click', this._onTabListClickBound);\n\n this.tabListEl.removeEventListener('touchstart', this._onTouchStartBound);\n this.tabListEl.removeEventListener('mousedown', this._onMouseDownBound);\n this.tabListEl.removeEventListener('mousewheel', this._onScrollBound);\n this.tabListEl.removeEventListener('DOMMouseScroll', this._onScrollBound);\n\n this.tabListEl.removeEventListener('focus', this._onFocusBound);\n this.tabListEl.removeEventListener('blur', this._onBlurBound);\n\n if (this.leftEl) {\n this.leftEl.removeEventListener('click', this._onLeftClickBound);\n }\n\n if (this.rightEl) {\n this.rightEl.removeEventListener('click', this._onRightClickBound);\n }\n }", "_removeTrackListeners() {\n var interactionRects = Px.d3.selectAll(Polymer.dom(this.$$('#sliderSVG')).querySelectorAll('.sliderTrack'));\n\n interactionRects.on('click', null);\n }", "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "detach() {\n this.attached.removeEventListener('mousedown', this.event);\n this.attached.removeEventListener('mouseup', this.event);\n this.attached.removeEventListener('click', this.event);\n this.attached.removeEventListener('dblclick', this.event);\n \n this.attached = null;\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "__detatchListeners() {\n if (qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT) {\n qx.bom.Event.removeNativeListener(\n window,\n \"hashchange\",\n this.__checkOnHashChange\n );\n } else {\n qx.event.Idle.getInstance().removeListener(\n \"interval\",\n this.__onHashChange,\n this\n );\n }\n }", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "function remove_eventhandlers(curr) {\n\t\n\t\t curr.off('mousemove', function (ev) {\n\t\t\t handle_mousemove_on_content(ev);\n\t\t });\n\n\t\t curr.off('click', function (ev) {\n\t\t handle_mouseclick_on_content(ev);\n\t\t });\t\n\t\n\t\t curr.off('mouseleave', function (ev) {\n\t\t handle_mouseleave_from_content(ev);\n\t\t });\n\t\t\n\t\t curr.off('mouseenter', function (ev) {\n\t\t \thandle_mouseenter_on_content (ev);\n\t\t });\n\t}", "removeListeners() {\n var descriptor = this.getDescriptor();\n if (descriptor) {\n descriptor.unlisten(DescriptorEventType.ACTIVATED, this.onActivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onDeactivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onActivationError, false, this);\n }\n }", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\r\n }", "function removeAllListeners(container, opt) {\n container.children().each(function() {\n try {\n jQuery(this).die('click');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseenter');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseleave');\n } catch (e) {\n }\n try {\n jQuery(this).unbind('hover');\n } catch (e) {\n }\n })\n try {\n container.die('click', 'mouseenter', 'mouseleave');\n } catch (e) {\n }\n clearInterval(opt.cdint);\n container = null;\n\n\n\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "_removeMouseDownListeners() {\n if (this._screenElement.ownerDocument) {\n this._screenElement.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);\n this._screenElement.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);\n }\n clearInterval(this._dragScrollIntervalTimer);\n this._dragScrollIntervalTimer = undefined;\n }", "removeListener() {\n document.getElementById('banner-picture').removeEventListener('mousedown', this.mouseDownHandler);\n document.removeEventListener('mouseup', this.mouseUpHandler);\n document.getElementById('banner-picture').removeEventListener('mouseenter', this.mouseEnterHandler);\n document.getElementById('banner-picture').removeEventListener('mousemove', this.mouseMoveHandler);\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n }", "removeAllListeners() {\n this.listeners = {};\n }", "removeEventListeners() {\n this.leafletMap.removeEventListener('click', (event) => {\n this.clickLeafletMap(event);\n })\n this.leafletMap.removeEventListener('mousemove', (event) => {\n this.onMouseMove(event);\n });\n this.leafletMap.removeEventListener('keydown', (event) => {\n this.onKeyPress(event.originalEvent);\n });\n this.leafletMap.removeEventListener('mouseover', (event) => {\n this.onMouseOverLeaflet(event)\n });\n this.leafletMap.removeEventListener('mouseout', (event) => {\n this.onMouseOutLeaflet(event)\n });\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "detachFromDOM() {\n this._trackNode.off('click', this._onTrackClick);\n this._noValueNode.off('click', this._onNoValueNodeClick);\n\n this._handleNode.off('mousedown', this._onHandleMouseDown);\n $(document).off('mousemove', this._onDocumentMouseMove);\n $(document).off('mouseup', this._onDocumentMouseUp);\n\n this._handleNode.off('touchstart', this._onHandleTouchStart);\n $(document).off('touchmove', this._onDocumentTouchMove);\n $(document).off('touchend', this._onDocumentTouchEnd);\n\n this._handleNode.off('keydown', this._onHandleKeyPress);\n }", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "_removeEventListeners() {\n window.removeEventListener('deviceorientation', this._onOrientationFound);\n\n this._map\n .off('locationfound', this._onLocationFound, this)\n .off('locationerror', this._onLocationError, this)\n .off('dragstart', this._onDragStart, this)\n .off('moveend', this._onMoveEnd, this);\n }", "disconnectedCallback() {\n this.removeEventListener(\"mousedown\", this.tapEventOn);\n this.removeEventListener(\"mouseover\", this.tapEventOn);\n this.removeEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.removeEventListener(\"focused-changed\", this.focusToggle);\n super.disconnectedCallback();\n }", "function removeRedandYellowListeners(){\n\t\tfor (var i = $boxes.length -1; i>=0;i--){\n\t\t\tvar $box = $($boxes[i]);\n\t\t\t$box.off('click', addRedorYellow);\n\t\t}\n\t}", "_onMouseUp () {\n document.removeEventListener(\"mousemove\", this._onMouseMove);\n document.removeEventListener(\"touchmove\", this._onMouseMove);\n\n document.removeEventListener(\"mouseup\", this._onMouseUp);\n document.removeEventListener(\"touchend\", this._onMouseUp);\n }", "removeAllListeners() {\n const me = this,\n listeners = me.eventListeners || (me.eventListeners = {});\n\n for (let event in listeners) {\n listeners[event].forEach((cfg) => me.removeListener(event, cfg));\n }\n }", "function removeButtonListeners() {\n if (buttons.fw) {\n buttons.fw.removeEventListener('click', handleForwardButtonClick);\n }\n if (buttons.bk) {\n buttons.bk.removeEventListener('click', handleBackwardButtonClick);\n }\n }", "function removeEventListener(handle) {\n GEvent.removeListener(handle);\n }", "function off(event_name) { \n $.forEach(this.elements, function(element){\n element.removeEventListener(event_name);\n })\n }", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "removeSelectionListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tthis.document.removeEventListener(\"selectionchange\", this._onSelectionChange, { passive: true });\n\t\tthis._onSelectionChange = undefined;\n\t}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }" ]
[ "0.7509986", "0.7134042", "0.71030164", "0.7084824", "0.7084824", "0.7074644", "0.7054328", "0.7043545", "0.70386237", "0.7013113", "0.70039946", "0.69831365", "0.697547", "0.6941512", "0.6922025", "0.6917149", "0.69129825", "0.68990177", "0.68634945", "0.6861883", "0.68616617", "0.67960674", "0.67960674", "0.67960674", "0.6795808", "0.6794812", "0.67850107", "0.67723656", "0.67515284", "0.67424816", "0.6732611", "0.67242956", "0.67147917", "0.67147917", "0.67147917", "0.67045134", "0.6687702", "0.6673625", "0.66733694", "0.6659927", "0.66424817", "0.6620009", "0.6595564", "0.6579254", "0.65750617", "0.6574156", "0.65490717", "0.6538367", "0.65357244", "0.6535323", "0.65152216", "0.6482326", "0.64795136", "0.64592403", "0.6442625", "0.644094", "0.64138025", "0.64017564", "0.64017564", "0.64017564", "0.64017564", "0.6398485", "0.6391225", "0.6389696", "0.6383826", "0.63789004", "0.63691056", "0.6345152", "0.6334472", "0.63342404", "0.63320553", "0.6324591", "0.6314846", "0.6314846", "0.6314846", "0.6302107", "0.62978214", "0.62916404", "0.6290379", "0.62774456", "0.62699664", "0.6268728", "0.6266523", "0.6254141", "0.6248209", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394", "0.6244394" ]
0.0
-1
(For IE <=9) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetID){activeElement = target;activeElementID = targetID;activeElementValue = target.value;activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');// Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n// on DOM elements\nObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else{activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName !== 'value'){return;}var value=nativeEvent.srcElement.value;if(value === activeElementValue){return;}activeElementValue = value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n \"value\" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst) && manualDispatchChangeEvent(nativeEvent);\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}" ]
[ "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.71687317", "0.69440717", "0.6840082", "0.68314457", "0.6743528", "0.667276", "0.66622555", "0.66622555", "0.6652715", "0.66484404", "0.66484404", "0.66484404", "0.66484404", "0.66303355", "0.6627098", "0.6614821", "0.6614821", "0.6614821", "0.6614821", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.65952426", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.6581382", "0.65788394", "0.6564514", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703", "0.65410703" ]
0.66947204
27
SECTION: handle `click` event
function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName=elem.nodeName;return nodeName&&nodeName.toLowerCase()==='input'&&(elem.type==='checkbox'||elem.type==='radio');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSections(event);\n}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function _click(d){\n \n }", "function click_on() {\n console.log('called click function');\n}", "function clickHandler(e) {\n // Nur bei Linksklick\n if (e.button !== 0) return;\n clickAt(e.offsetX, e.offsetY);\n }", "clickHandler(event) {\n declarativeClickHandler(this);\n }", "function clickHandler(event) {\n \tconsole.log('event');\n \ttau.openPopup(popup);\n }", "function click(el){\n \n \n}", "function handleClick (e) {\n e.preventDefault();\n console.log('clicked');\n }", "_evtClick(event) { }", "_handleClick(event) {\n this.interaction.next(event);\n event.stopPropagation();\n }", "metodoClick(){\n console.log(\"diste click\")\n }", "handleClick(){\n alert(\"hey!!\");\n }", "handleJDotterClick() {}", "click(event) {\n if (event.target === this.get('element')) {\n this.sendAction();\n }\n }", "function doClick(e) {\n options.onClick(e);\n }", "click_extra() {\r\n }", "function click() {\n\tconsole.log('click')\n}", "click() { // add click event\n app.quit();\n }", "onClick() {\n // Verifica se existe a função para processar o click e a invoca\n if(this.handleClick) {\n this.handleClick(this);\n }\n }", "function onClick(e) {\n }", "click(e) {\n\n // type==custom a hack for version_select type\n if (this.type == 'button' || this.type == 'custom') {\n var url = '/api/parameters/' + this.props.p.id + '/event';\n var eventData = {'type': 'click'};\n fetch(url, {\n method: 'post',\n credentials: 'include',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRFToken': csrfToken\n },\n body: JSON.stringify(eventData)\n }).then(response => {\n if (!response.ok) {\n store.dispatch(wfModuleStatusAction(this.props.wf_module_id, 'error', response.statusText))\n } \n });\n }\n\n if (this.type == 'checkbox') {\n this.paramChanged(e.target.checked)\n }\n }", "function handleClick(el,e) {\n\tloadURL(el.attributes.target,el.text);\n}", "clickHandler (event) {\n this.onClick ({\n node: this.node,\n target: this,\n event: event\n })\n }", "clickHandler() {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // No click 'action' for input - text is removed in visualEffectOnActivation\n }\n }", "_handleClick(e) {\n this.dispatchEvent(\n new CustomEvent(\"hax-tray-button-click\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n eventName: this.eventName,\n index: this.index,\n value: this.eventData,\n },\n })\n );\n }", "_click(e) {\n const type = this.cel.getAttribute('data-type');\n\n this[type](e);\n }", "function __clickhandler() {\n buttonfunc(elemnode); return false;\n }", "function clickHandler() {\n console.log(\"Button 2 Pressed\");\n }", "handleClick(event, url) {\n event.preventDefault();\n this.postRequestOnClick(url);\n }", "onClick(element) {\n\t\taction(`You have clicked on element ${element.name}`).call();\n\t}", "clickHandler(evt) {\n if (evt.target.classList.contains('fa-check')) {\n gameApp.eventHandler(evt);\n }\n\n if (evt.target.classList.contains('assignment') || evt.target.parentElement.classList.contains('assignment')) {\n gameApp.activateContract(evt);\n }\n\n if (evt.target.classList.contains('loc')) {\n gameApp.addLoc();\n }\n\n if (evt.target.classList.contains('nav-button')) {\n let elem = evt.target;\n gameApp.gameView.changeMenue(elem);\n }\n }", "function clickHandler(){ // declare a function that updates the state\n elementIsClicked = true;\n isElementClicked();\n }", "function clickHandler(event){\n\t\t\tif(ignoreClick){\n\t\t\t\tignoreClick = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar offset = overlay.cumulativeOffset();\t\t\t\n\t\t\ttarget.fire('flotr:click', [{\n\t\t\t\tx: xaxis.min + (event.pageX - offset.left - plotOffset.left) / hozScale,\n\t\t\t\ty: yaxis.max - (event.pageY - offset.top - plotOffset.top) / vertScale\n\t\t\t}]);\n\t\t}", "function _clickHandler(ev) {\n\tvar $this = $(ev.target).closest(\".hm-container\").parent();\n\tvar $cfg = $this.data('heatmap').config;\n\n\tif ($cfg.onReady.state != loadStates.READY) return true;\n\n\t// If there's an event handler registered for clicks, invoke it,\n\t// passing an object containing all the relevant info for the event.\n\tif (typeof $cfg.onClick.val == 'function') {\n\t var $$ctx = $this.data('ctx');\n\t var mouse_pos = _mouseAbs(ev, $$ctx);\n\t var ndxs = _getIndexes(mouse_pos, $$ctx);\n\n\t return $cfg.onClick.val ( { \"profile\": (ndxs.profile == null ? 'undefined' : $$ctx.profile_metadata[ndxs.profile]), \n\t\t\t\t\t\"sample\": (ndxs.sample == null ? 'undefined' : $$ctx.sample_metadata[ndxs.sample]), \n\t\t\t\t\t\"indexes\": ndxs, \n\t\t\t\t\t\"context\": $$ctx, \n\t\t\t\t\t\"event\": ev } );\n\t}\n\treturn true;\n }", "function links_click_event(event) {\n console.log(\"works link\");\n}", "function listenForClick() {\n loopThroughGrid();\n clickTurnBtn();\n }", "function clickAssess() {\n\t$.trigger(\"clickAssess\");\n}", "onClick() {\n }", "function clicked() {\r\n // consists of animations and transitions\r\n resetClickLinks();\r\n // Click node Action and Info\r\n // only if it is defined\r\n click_node = drag_node; // defining here\r\n nodePop(click_node);\r\n loadInfo();\r\n}", "@action\n click() {\n this.args['on-click']?.();\n }", "function on_click(e) {\n cloud.on_click(e.clientX, e.clientY);\n}", "clickHandler(e) {\n // Only activate if there is a buttonHandler\n if (this.buttonHandler !== false) {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }\n }", "_click(event) {\n if (this.disabled) {\n event.preventDefault();\n }\n else {\n this._handleInteraction(event);\n event.stopPropagation();\n }\n }", "function handleClick(event) {\n // Get the clicked chart element:\n let activeElement = chart.getElementAtEvent(event);\n // Do nothing if the click is not on a point on the chart:\n if (!activeElement[0]) {\n return;\n }\n // Get the index number of the clicked element:\n let elementID = activeElement[0]._index;\n // Get the post ID from the taskData.xLabels object array:\n let postID = taskData.xLabels[activeElement[0]._index];\n // Go to the selected task:\n window.location.href = \"/single.html?task=\" + postID;\n }", "addHandlerClick(handler) {\n // NOTE Event delegation. Figure out which button was clicked, based on the event\n this._parentElement.addEventListener('click', function (e) {\n // Select the closest button-element to the clicked element.\n const btn = e.target.closest('.btn--inline');\n\n if (!btn) return;\n // The Controller is made and marked in the controller.js\n\n const goToPage = +btn.dataset.goto;\n\n handler(goToPage);\n });\n }", "handleClick(event) {\n const { location, isSelectable, onClick } = this.props;\n\n if (!isSelectable || event.target.closest('.c-finder-tree-leaf__btn--toggle-selection')) {\n return;\n }\n\n onClick(location);\n }", "function deal_click(){\n console.log(\"click!\");\n}", "function onClickEvent() {\n 'use strict';\n var sender = this.id;\n\n switch (sender) {\n case \"btnCreateCourse\":\n onCreateCourse();\n break;\n case \"btnModifyCourse\":\n onModifyCourse();\n break;\n case \"btnDeleteCourse\":\n onDeleteCourse();\n break;\n case \"btnRefreshCourses\":\n onRefreshCourse();\n break;\n }\n }", "clickHandler() {\n // Activate if not active\n if (this.active === 'safety') {\n // Button view press effect\n this.removeSafety();\n } else if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }", "function click() {\n d3_eventCancel();\n w.on(\"click.drag\", null);\n }", "onClick(e){\n console.log(\"onclick\")\n }", "function handleBtnClick(event) {\n handleEvent(event);\n}", "on_desklet_clicked(event) {\n this.retrieveEvents();\n }", "function onClick(event) {\n\t\t//console.log(event);\t\t\n\t\tvar target = event.target;\n\t\tif (target.classList.contains(\"ui-selector-indicator\")) {\n\t\t\t//console.log(\"Indicator clicked\");\n\t\t\tvar ItemClicked = event.srcElement.textContent;\n\t\t\tconsole.log(\"Item Clicked on home page was: \" + ItemClicked);\n\n\t\t\t//Handel home page click events\n\t\t\tif(ItemClicked == \"Switches\"){\n\t\t\t\ttau.changePage(\"switchesPage\");\n\t\t\t}else if(ItemClicked == \"Clear Database\"){\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t\t//This should be moved to it's own function.\n\t\t\t\tconsole.log(\"Clearing Database\");\n\t\t\t\tlocalStorage.clear();\n\t\t\t\tAccess_Token = null;\n\t\t\t\tAccess_Url = null;\n\t\t\t\tswitches_DB = null;\n\t\t\t\talert(\"Database Cleared\");\n\t\t\t\t//Maybe we should exit here?\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t}else if(ItemClicked == \"Routines\"){\n\t\t\t\ttau.changePage(\"routinesPage\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "function handleClick() {\n $('button').click(function(event){\n emptyAbilities();\n renderAbilities(event.currentTarget.innerHTML);\n showAbilities();\n });\n }", "HAXCMSButtonClick(e) {\n // stub, the classes implementing this will actually do something\n // you always will call super.HAXCMS\n }", "function click(e) {\r\n\t\tif(!e && typeof e=='string') e=document.getElementById(e);\r\n\t\tif(!e) return;\r\n\t\tvar evObj = e.ownerDocument.createEvent('MouseEvents');\r\n\t\tevObj.initMouseEvent(\"click\",true,true,e.ownerDocument.defaultView,0,0,0,0,0,false,false,false,false,0,null);\r\n\t\te.dispatchEvent(evObj);\r\n\t}", "function click(e) {\r\n\t\tif(!e && typeof e=='string') e=document.getElementById(e);\r\n\t\tif(!e) return;\r\n\t\tvar evObj = e.ownerDocument.createEvent('MouseEvents');\r\n\t\tevObj.initMouseEvent(\"click\",true,true,e.ownerDocument.defaultView,0,0,0,0,0,false,false,false,false,0,null);\r\n\t\te.dispatchEvent(evObj);\r\n\t}", "onInternalClick(event) {\n const me = this,\n bEvent = {\n event\n };\n\n if (me.toggleable) {\n // Clicking the pressed button in a toggle group should do nothing\n if (me.toggleGroup && me.pressed) {\n return;\n }\n\n me.toggle(!me.pressed);\n }\n /**\n * User clicked button\n * @event click\n * @property {Core.widget.Button} button - Clicked button\n * @property {Event} event - DOM event\n */\n\n me.trigger('click', bEvent);\n /**\n * User performed the default action (clicked the button)\n * @event action\n * @property {Core.widget.Button} button - Clicked button\n * @property {Event} event - DOM event\n */\n // A handler may have resulted in destruction.\n\n if (!me.isDestroyed) {\n me.trigger('action', bEvent);\n } // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n\n if (!this.href) {\n // stop the event since it has been handled\n event.preventDefault();\n event.stopPropagation();\n }\n }", "click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }", "function Click() {\n}", "_addClickFunctionality(button, option){\n\t\tvar config = this;\n\t\tbutton.click(function(){\n\t\t\tconfig.clicked_button = event.target;\n\t\t\tconfig._updatePrice(config.clicked_button)\n\t\t\tconfig._sortButtonColoring(config.clicked_button);\n\t\t\tconfig._updateMagento(config.clicked_button);\n\t\t\tconfig._eraseCategories(config.clicked_button);\n\t\t\tconfig._hideCategories(config.clicked_button);\n\t\t\tconfig._decideNext(config.clicked_button, option);\n\t\t});\n\t}", "function handleClick(e) {\n sendRequest()\n }", "clicked(x, y) {}", "function do_click() {\n alert('you clicked');\n}", "function testclick(e) {\n\talert('Clicked ' + '\\'' + e.source.id + '\\'');\n}", "function cb_beforeClick(cb, pos) { }", "click(callback, bubbles=false) {\n this.self.addEventListener('click', callback, bubbles);\n }", "function handleClick (event){\n\tconsole.log(event);\n\tvar elementText = event.target.innerHTML; // the target html to var\n\tsayWhat.innerHTML = \"You clicked on the \" + elementText + \" section\"; // assign to output this\n}", "function onClick(e) {\n \t\t// console.log(this);\n\t\t}", "onParcelClick() {\n console.log('u clicked the lil parcel')\n }", "function clickEvents(){\n alert('i am clicked');\n}", "addClickHandler() {\n this.$el.find(this.settings.menuGroupTitleSelector).on('click', (e) => {\n e.preventDefault();\n e.stopPropagation();\n window.open(this.menu.find(this.settings.firstItemSelector).first().attr('href'), e.metaKey ? '_blank' : '_self');\n });\n this.toggler.on('click', (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.menu.toggleClass(this.settings.visibleCssClass);\n this.setTogglerIcon(this.settings.icon.selector);\n });\n }", "_onTap(e) {}", "function clickHandler(e) {\r\n if (that.currentGameState.onClick) {\r\n that.currentGameState.onClick.call(this, that.currentGameState, e);\r\n }\r\n }", "handleClick() {\n\t\tthis.setState( { clicked: true } );\n\t\tthis.props.addProductCallback( this.props.product.id );\n\t}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function handleClick(e){\n switch (e.target.classList[0]){\n // For like and delete, I've loaded up the id in two different ways for funsies.\n case \"btn-success\": \n // In this case (like), I know the API is going to return the relevant quote object on a success, which has a quoteId. \n // When I pass through the callback function (quoteObject) => addLikeById(quote.quoteId)) and call it in the second .then, the response from the fetch is passed to it as an argument.\n adapter.likeQuote(parseInt(e.target.dataset.likeId), (quoteObject) => addLikeById(quoteObject.quoteId));\n break;\n case \"btn-danger\":\n // In this case (delete), the API doesn't send back anything, so I pulled the id from the dataset from the target of the event.\n adapter.deleteQuote(e.target.dataset.deleteId, () => removeQuoteById(e.target.dataset.deleteId))\n break;\n default:\n break;\n }\n }", "function handleClick() {\n if (props.type == 'todo') {\n return finishTask(props.task, props.index)\n }\n\n else if (props.type == 'done') {\n return undoTask(props.task, props.index)\n }\n }", "onItemClick(name, elem, evt){\r\n this.emit('click', name, elem, evt);\r\n }", "clicked() {\n this.get('onOpen')();\n }", "handleClick(articleToPlay) {\r\n // Asserting if an utterance is being played it gets canceled\r\n this.playing = 'LIST_PLAY';\r\n // Sending data to PlayerPage component changing state\r\n this.clickHandler(this.playing, true, articleToPlay.headline, articleToPlay.author, articleToPlay.content);\r\n }", "elementClick(e) {\n if (e.detail) {\n e.detail.target.dispatchEvent(\n new MouseEvent(\"click\", {\n bubbles: true,\n cancelable: true,\n view: window,\n })\n );\n }\n }", "onclick(){}", "function setClickBehaviour(){\n\t\t\tbutton.on(\"click\", changeButtonLabelAndSendEvent);\n\t\t}", "buttonClick(ev) {\n\n\t\t// Get the button using the index\n\t\tvar btn = this.props.buttons[ev.currentTarget.dataset.index];\n\n\t\t// If there's a callback\n\t\tif(typeof btn.callback == 'function') {\n\t\t\tbtn.callback(btn);\n\t\t} else {\n\t\t\tthis.props.close();\n\t\t}\n\t}", "handleClick () {\n super.handleClick();\n if (this.casting) {\n return this.stopCasting();\n } else {\n return this.doLaunch();\n }\n }", "_onLabelClick(ev) {\n const $target = $(ev.currentTarget);\n this.trigger('revisionSelected', [0, $target.data('revision')]);\n }" ]
[ "0.8123866", "0.7879277", "0.7531671", "0.7500634", "0.7475805", "0.7402668", "0.73915786", "0.7379595", "0.7379595", "0.7331232", "0.7330436", "0.7245654", "0.72390676", "0.72122186", "0.7116352", "0.7082111", "0.7062615", "0.7056091", "0.7017624", "0.7006748", "0.6982211", "0.69725585", "0.6969008", "0.6940908", "0.6886495", "0.6866536", "0.6859694", "0.68442965", "0.68236756", "0.6817138", "0.68103236", "0.68081677", "0.6805614", "0.680148", "0.6785153", "0.6783431", "0.6759283", "0.6754726", "0.6740714", "0.67305374", "0.6720963", "0.6707124", "0.6705986", "0.6694178", "0.66818166", "0.6671246", "0.6657273", "0.6655512", "0.66379064", "0.6624547", "0.66195226", "0.6616446", "0.6603907", "0.6601692", "0.65978515", "0.65958583", "0.65890324", "0.65886736", "0.65840906", "0.6581051", "0.65719074", "0.65687764", "0.655458", "0.6552917", "0.6552641", "0.6552641", "0.6528553", "0.65236956", "0.6521108", "0.6520102", "0.6519221", "0.6515924", "0.65125406", "0.6512157", "0.6505019", "0.6500281", "0.64877325", "0.64848256", "0.6479867", "0.64731705", "0.6470219", "0.64697886", "0.6464425", "0.6460205", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64493674", "0.6448905", "0.6448193", "0.64468056", "0.64439505", "0.6439658", "0.64387053", "0.64304215", "0.64304113", "0.6428534", "0.6425676" ]
0.0
-1
Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support getModifierState. If getModifierState is not supported, we map it to a set of modifier keys exposed by the event. In this case, Lockkeys are not supported. Translation from modifier key to the associated property in the event.
function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifierStateGetter(keyArg){ /*jshint validthis:true */var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){ /*jshint validthis:true */var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function getModifierState(event, mod) {\n return typeof event.getModifierState === \"function\"\n ? event.getModifierState(mod)\n : false;\n}", "function modifierStateGetter(keyArg) {\r\n\t var syntheticEvent = this;\r\n\t var nativeEvent = syntheticEvent.nativeEvent;\r\n\t if (nativeEvent.getModifierState) {\r\n\t return nativeEvent.getModifierState(keyArg);\r\n\t }\r\n\t var keyProp = modifierKeyToProp[keyArg];\r\n\t return keyProp ? !!nativeEvent[keyProp] : false;\r\n\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this, nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) return nativeEvent.getModifierState(keyArg);\n var keyProp = modifierKeyToProp[keyArg];\n return !!keyProp && !!nativeEvent[keyProp];\n}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}" ]
[ "0.78773606", "0.78773606", "0.7797534", "0.76025754", "0.7566912", "0.7566912", "0.7566912", "0.7530796", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74900687", "0.74551624", "0.74217284", "0.74217284", "0.74217284", "0.74217284", "0.74217284", "0.74217284" ]
0.7976579
11
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y// eslint-disable-line no-self-compare ;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function u(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "static hasObjectify(object) {\n return isObjectAssigned(object) && isFunction(object.objectify);\n }", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function is(obj) {\n return obj instanceof __WEBPACK_IMPORTED_MODULE_3__Range__[\"c\" /* default */];\n}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function _isPlainObject(obj) {\n return (obj && obj.constructor.prototype === Object.prototype);\n}", "isObject(obj) {\n return obj !== null && typeof obj === 'object'\n }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObjectLike(value) {\n return value != null && (typeof value === \"function\" || typeof value === \"object\");\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray$1(obj);\n}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject(obj) { // 71\n\t\treturn toString.call(obj) === '[object Object]'; // 72\n\t} // 73", "function isObject (o) { return o && typeof o === 'object' }", "function isObject (o) { return o && typeof o === 'object' }", "function isObject$1(obj){\nreturn kindOf(obj)==='object'||kindOf(obj)==='function';\n}", "function isObject(entry) {\n return entry.constructor === Object;\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "function isObject$1(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject$8(val) {\n return kindOf$3(val) === 'object' || typeof val === 'function';\n}", "function isObject(e){return Object.prototype.toString.call(e)===\"[object Object]\"}", "function isObjectLike(value) {\n return typeof value === \"object\" && !!value;\n}", "function isObject(obj){return obj!==null&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object';}", "function IsObject(x) {\n\t return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n\t }", "function isObject(o){ return typeof o === 'object' && o !== null; }", "function isObjectLike(value) {\n return _typeof$1(value) == 'object' && value !== null;\n }", "function isObject$2556(x$2572) {\n return function isObject$2556(x$2573) {\n return function (a0$2574) {\n if (Object.prototype.toString.call(a0$2574) === '[object Object]') {\n return true;\n }\n return false;\n }.call(this, x$2573);\n }.curry().apply(null, arguments);\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject(a) {\r\n return (a && typeof a == 'object') || isFunction(a);\r\n}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject(obj){\n return Object.prototype.toString.call(obj) == '[object Object]';\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function isObjectLike$a(value) {\n return typeof value == 'object' && value !== null;\n}", "function isObject(obj) {\n\n return obj && typeof obj === \"object\";\n}", "function isObject$1(value) {\n return typeof value === 'object' && value !== null || typeof value === 'function';\n }", "function isIterableObject(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n var t = typeof(obj);\n var types = {'string': 0, 'function': 0, 'number': 0, 'undefined': 0, 'boolean': 0};\n return types[t] === undefined;\n}", "function isObject(value) { return typeof value === \"object\" && value !== null; }", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject(a) {\n return (!!a) && (a.constructor === Object);\n}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isObject(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function utilIsIterable(obj) {\n\t\treturn obj != null && typeof obj[Symbol.iterator] === 'function'; // lazy equality for null\n\t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function isObject(x) {\n return x != null && typeof x === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function isObjectLike(obj) {\n return typeof obj === \"object\" && obj !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObject(obj) {\r\n\t var type = typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\r\n\t return type === \"function\" || type === \"object\" && !!obj;\r\n\t}", "__key_in_object(object, key) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n return true\n } else {\n return false\n }\n }", "function isObject(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n}", "function isObject(value) {\n return value && typeof value === 'object';\n}" ]
[ "0.7044135", "0.6979357", "0.68574303", "0.6821805", "0.68029666", "0.67803156", "0.6729492", "0.67206", "0.6709456", "0.66839457", "0.6676559", "0.6676559", "0.6676559", "0.66488636", "0.6640003", "0.6640003", "0.6640003", "0.6640003", "0.6625777", "0.6623136", "0.6623136", "0.6623136", "0.6623136", "0.6623136", "0.6623136", "0.6623136", "0.662287", "0.6618518", "0.6595099", "0.6595099", "0.65774083", "0.65703195", "0.6569617", "0.65671754", "0.6543235", "0.6543235", "0.6538236", "0.65326965", "0.6511998", "0.6488952", "0.6488125", "0.64771014", "0.64713323", "0.6466541", "0.64663655", "0.64571035", "0.64571035", "0.64571035", "0.64571035", "0.64571035", "0.64571035", "0.64571035", "0.6455472", "0.64549524", "0.6450416", "0.6444659", "0.6444073", "0.6444073", "0.6444073", "0.64432347", "0.6439252", "0.64356256", "0.6426215", "0.6422075", "0.64203924", "0.64203924", "0.64203924", "0.64203924", "0.64203924", "0.64148235", "0.64148235", "0.6389013", "0.6385379", "0.6385379", "0.6377821", "0.63778096", "0.63684386", "0.63643175", "0.6364171", "0.6350019", "0.6350019", "0.6350019", "0.6350019", "0.6350019", "0.6349771", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6346276", "0.6345589", "0.634452", "0.63377774", "0.63374823" ]
0.0
-1
Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.
function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B. for(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function allEqual(args) {\n for (var i = 1; i < args.length; i++) {\n if (args[i] != args[0])\n return false;\n }\n return true;\n}", "function keyValueChecker (object1, object2) {\r\n\tfor (var property1 in object1) {\r\n\t\tfor (var property2 in object2) {\r\n\t\t\tif (property1 == property2 && object1[property1] == object2[property2]) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function allEqual(args) {\r\n\tvar firstValue = arguments[0],\r\n\t\ti;\r\n\tfor (i = 1; i < arguments.length; i += 1) {\r\n\t\tif (arguments[i] != firstValue) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "function isEqual(left, right) {\n const OBJECT_STRING = '[object Object]';\n if (typeof left !== 'object' || typeof right !== 'object') {\n return left === right;\n }\n if (left === null || right === null)\n return left === right;\n const leftArray = Array.isArray(left);\n const rightArray = Array.isArray(right);\n if (leftArray !== rightArray)\n return false;\n const leftPlainObject = Object.prototype.toString.call(left) === OBJECT_STRING;\n const rightPlainObject = Object.prototype.toString.call(right) === OBJECT_STRING;\n if (leftPlainObject !== rightPlainObject)\n return false;\n if (!leftPlainObject && !leftArray)\n return false;\n const leftKeys = Object.keys(left);\n const rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length)\n return false;\n const keySet = {};\n for (let i = 0; i < leftKeys.length; i += 1) {\n keySet[leftKeys[i]] = true;\n }\n for (let i = 0; i < rightKeys.length; i += 1) {\n keySet[rightKeys[i]] = true;\n }\n const allKeys = Object.keys(keySet);\n if (allKeys.length !== leftKeys.length) {\n return false;\n }\n const l = left;\n const r = right;\n const pred = (key) => {\n return isEqual(l[key], r[key]);\n };\n return allKeys.every(pred);\n}", "function sameKeys(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function isEqual(objA, objB, ...ignoredKeys) {\n if (objA === objB) {\n // Reference equality\n return true;\n }\n\n if (!objA !== !objB) {\n // Either one undefined/null but not both\n return false;\n }\n\n let keysA = immutable.Set.fromKeys(objA);\n let keysB = immutable.Set.fromKeys(objB);\n let keys = keysA.union(keysB).subtract(ignoredKeys);\n\n return keys.every(key => {\n // Use Immutable.js's equivalence algorithm. Note that StoreRef and\n // QueryData implement valueOf() or equals()/hashCode(), which this\n // algorithm uses for comparisons.\n return immutable.is(objA[key], objB[key]);\n });\n}", "function isEqual(a, b) {\n let aKeys = Object.keys(a);\n let bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n for (let i = 0; i < aKeys.length; i++) {\n var currentKey = aKeys[i];\n\n if (a[currentKey] !== b[currentKey]) {\n return false;\n } \n }\n\n return true;\n}", "function isKeyMatch(object1, object2) {\n var object1Keys = Object.keys(object1);\n var object2Keys = Object.keys(object2);\n\n for (var i = 0; i < object1Keys.length; i++) {\n if (object1Keys[i] !== object2Keys[i]) {\n return false; // not the same key here\n }\n return true; //if made it here, all keys match\n }\n }", "function Object$prototype$equals(other) {\n var self = this;\n var keys = Object.keys(this).sort();\n return equals(keys, Object.keys(other).sort()) &&\n keys.every(function(k) { return equals(self[k], other[k]); });\n }", "function iterableEquality(a, b) {\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n Array.isArray(a) ||\n Array.isArray(b) ||\n a === null ||\n b === null\n ) {\n return undefined\n }\n if (a && b && a.constructor !== b.constructor) {\n // check if the object are natives and then shallow equal them\n return a.sketchObject && b.sketchObject && a.sketchObject == b.sketchObject\n }\n\n if (a.size !== undefined) {\n if (a.size !== b.size) {\n return false\n } else if (isA('Set', a)) {\n var allFound = true\n for (var aValue of a) {\n if (!b.has(aValue)) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n } else if (isA('Map', a)) {\n var allFound = true\n for (var aEntry of a) {\n if (\n !b.has(aEntry[0]) ||\n !equals(aEntry[1], b.get(aEntry[0]), [iterableEquality])\n ) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n }\n }\n\n if (Object.keys(a).length !== Object.keys(a).length) {\n return false\n }\n\n var aKeys = Object.keys(a).sort()\n var bKeys = Object.keys(b).sort()\n\n for (var i = 0; i < aKeys.length; i += 1) {\n var aKey = aKeys[i]\n var bKey = bKeys[i]\n if (aKey !== bKey || !equals(a[aKey], b[bKey], [iterableEquality])) {\n return false\n }\n }\n\n return true\n}", "function Object$prototype$equals(other) {\n var self = this;\n var keys = sortedKeys (this);\n return equals (keys, sortedKeys (other)) &&\n keys.every (function(k) { return equals (self[k], other[k]); });\n }", "function setsEqual(a, b) {\n var ka = Object.keys(a).sort();\n var kb = Object.keys(b).sort();\n if (ka.length != kb.length) {\n return false;\n }\n for (var i in ka) {\n if (kb[i] != ka[i]) {\n return false;\n }\n }\n return true;\n}", "function allEqual() {\n\tfor (let i = 1; i < arguments.length; i++) {\n\t\tif (arguments[i] === '' || arguments[i] !== arguments[i - 1]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function validateKeys(object, expectedKeys) {\n // if the enumerable properties of object is not the same as expectedKeys, return false\n if (Object.keys(object).length !== expectedKeys.length) {\n return false;\n }\n\n // Loop through expectedKeys\n for(let i = 0; i < expectedKeys.length; i++) {\n // While loop through expectedkeys.length\n // if Object.keys(object) DOES NOT find, the key matching expectedKey[i], return false\n // Goes through the array of strings, that is the keys of the object parameter, and if the key is found, it returns true\n if(!Object.keys(object).find(key => key === expectedKeys[i])) {\n return false;\n }\n }\n // otherwise return true\n return true;\n}", "function deepEqual(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n if (value1 == null || typeof value1 != \"object\" ||\n value2 == null || typeof value2 != \"object\") {\n return false;\n }\n // The Object.keys() method returns an array of a given object's own property names, in the same order as we get with a normal loop. Example below:\n // const object1 = {\n // a: 'somestring',\n // b: 42,\n // c: false\n // };\n\n // console.log(Object.keys(object1));\n // expected output: Array [\"a\", \"b\", \"c\"]\n // basically runs a for loop thru each object and creates an array of those values\n let keysA = Object.keys(value1);\n let keysB = Object.keys(value2);\n\n if (keysA.length != keysB.length) {\n return false;\n }\n\n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(value1[key], value2[key])) {\n return false;\n }\n }\n \n return true;\n}", "function sameProps(objA, objB) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++) {\n if (keysA[i] !== keysB[i])\n return false\n }\n\n return true\n}", "function objectsEqual(obj1, obj2) {\n let obj1Keys = Object.keys(obj1);\n let obj1Values = Object.values(obj1);\n let obj2Keys = Object.keys(obj2);\n let obj2Values = Object.values(obj2);\n\n if (obj1Keys.length !== obj2Keys.length || obj1Values.length !== obj2Values.length) {\n return false;\n }\n\n for (let i = 0; i < obj1Keys.length; i += 1) {\n if (obj1Keys[i] !== obj2Keys[i]) {\n return false;\n }\n }\n\n for (let i = 0; i < obj1Values.length; i += 1) {\n if (obj1Values[i] !== obj2Values[i]) {\n return false;\n }\n }\n\n return true;\n}", "function objectsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n return (keysMatch(a, b) && valuesMatch(a, b));\n}", "function equalObjects(a, b) {\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== (typeof b === 'undefined' ? 'undefined' : _typeof(b))) {\n return false;\n }\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object') {\n return a === b;\n }\n if (a === b) {\n return true;\n }\n if (toString.call(a) === '[object Date]') {\n if (toString.call(b) === '[object Date]') {\n return +a === +b;\n }\n return false;\n }\n if (Array.isArray(a)) {\n if (Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!equalObjects(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (var key in a) {\n if (!equalObjects(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}", "function compareObjects(left, right) {\n var left_keys = Object.keys(left);\n var right_keys = Object.keys(right);\n if (!compareArrays(left_keys, right_keys)) {\n return false;\n }return left_keys.every(function (key) {\n return compare(left[key], right[key]);\n });\n}", "function hasPropsAndVals(obj, kv) {\n if (typeof (obj) !== 'object' || typeof (kv) !== 'object') {\n return (false);\n }\n\n if (Object.keys(kv).length === 0) {\n return (true);\n }\n\n return (Object.keys(kv).every(function (k) {\n return (obj[k] && obj[k] === kv[k]);\n }));\n}", "function compareKeyValuePair(object1, object2){\r\n for (objectKey in object1){\r\n if (typeof object1[objectKey] !== 'function'){\r\n if (typeof object2[objectKey] != 'undefined'){\r\n if (object1[objectKey] == object2[objectKey]){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false; \r\n}", "deepEqual(a, b) {\n // If two \n if(a === b) {\n return true\n }; \n\n // Check for any condition that would cause args not to be equal\n if(a === null || b === null || typeof a != 'object' || typeof b != 'object') {\n return false\n };\n\n // Check for equality in number of properties and properties themselves\n var propsA = 0, \n propsB = 0;\n\n for(var prop in a) {\n propsA += 1;\n\n for (var prop in b) {\n propsB += 1;\n if (!(prop in a) || !this.deepEqual(a[prop], b[prop])) {\n return false;\n }\n }\n }\n\n return propsInA == propsInB;\n }", "function forEveryKeyInObject (obj, fn) {\n if (Object.keys(obj).length < 1) {\n return false\n }\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (!fn(key)) return false\n }\n }\n return true\n }", "function comparePairs(obj1, obj2){\n\tvar keys1 = Object.keys(obj1);\n\tvar keys2 = Object.keys(obj2);\n\tfor(var i = 0; i < keys1.length; i ++){\n\t\tif (keys1[i] === keys2[i] || obj1[keys1[i]] === obj2[keys2[i]]){\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n}", "function sameKeys(objA, objB, protoCheck, deepCheck) {\n var keysA = Object.getNestedKeys(objA, protoCheck, !deepCheck)\n var keysB = Object.getNestedKeys(objB, protoCheck, !deepCheck)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function are_equal(a1, a2)\n{\n if (typeof(a1) != typeof(a2))\n return false;\n \n switch(typeof(a1)) {\n case 'object':\n // arrays\n if (a1.length) {\n if (a1.length != a2.length)\n return false;\n for (var i = 0; i < a1.length; ++i) {\n if (!are_equal(a1[i], a2[i]))\n return false\n }\n }\n // associative arrays\n else {\n var keys = {};\n for (var key in a1) {\n keys[key] = true;\n }\n for (var key in a2) {\n keys[key] = true;\n }\n for (var key in keys) {\n if (!are_equal(a1[key], a2[key]))\n return false;\n }\n }\n return true;\n \n default:\n return a1 == a2;\n }\n}", "function areEquals(a, b) {\n\n\tlet aProps = Object.getOwnPropertyNames(a);\n let bProps = Object.getOwnPropertyNames(b);\n\n if (bProps.length !== aProps.length)\n \treturn false;\n\n for (let key of aProps) {\n \tif (!bProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n for (let key of bProps) {\n \tif (!aProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n return true;\n}", "function allValuesEqualTo(input, value, opts) {\n if (Array.isArray(input)) {\n if (input.length === 0) {\n return true;\n }\n\n if (opts.arraysMustNotContainPlaceholders && input.length > 0 && input.some(el => isEq(el, value))) {\n return false;\n } // so at this point\n // backwards traversal for increased performance:\n\n\n for (let i = input.length; i--;) {\n if (!allValuesEqualTo(input[i], value, opts)) {\n return false;\n }\n }\n\n return true;\n }\n\n if (isObj(input)) {\n const keys = Object.keys(input);\n\n if (keys.length === 0) {\n return true;\n }\n\n for (let i = keys.length; i--;) {\n if (!allValuesEqualTo(input[keys[i]], value, opts)) {\n return false;\n }\n }\n\n return true;\n }\n\n return isEq(input, value);\n} // T H E E X P O S E D W R A P P E R F U N C T I O N", "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function keyValMatch(obj1, obj2){\n\tfor(key in obj1){\n\t\tfor(otherKey in obj2){\n\t\t\tif(key == otherKey && obj1[key] == obj2[otherKey]){\n\t\t\t\t\n\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\treturn false;\n}", "function areObjectsEqual(obj1, obj2) {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false;\n }\n let objectLength = Object.keys(obj1).length;\n let i = 1;\n for (let key in obj1) {\n if (!obj2[key] || obj1[key] !== obj2[key]) {\n return false;\n } else if (objectLength === i) {\n return true;\n }\n i++;\n }\n}", "function equal(a, b) {\n\n if (Object.is(a, b))\n return true;\n\n\t// Dates must have equal time values\n\tif (isDate(a) && isDate(b))\n\t\treturn a.getTime() === b.getTime();\n\n\t// Non-objects must be strictly equal (types must be equal)\n\tif (!isObject(a) || !isObject(b))\n\t\treturn a === b;\n\n\t// Prototypes must be identical. getPrototypeOf may throw on\n\t// ES3 engines that don't provide access to the prototype.\n\ttry {\n\n\t if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n\t\t return false;\n\n\t} catch (err) {}\n\n\tvar aKeys = Object.keys(a),\n\t\tbKeys = Object.keys(b);\n\n\t// Number of own properties must be identical\n\tif (aKeys.length !== bKeys.length)\n\t\treturn false;\n\n\tfor (var i$0 = 0; i$0 < aKeys.length; ++i$0) {\n\n\t\t// Names of own properties must be identical\n\t\tif (!OP_hasOwnProperty.call(b, aKeys[i$0]))\n\t\t\treturn false;\n\n\t\t// Values of own properties must be equal\n\t\tif (!equal(a[aKeys[i$0]], b[aKeys[i$0]]))\n\t\t\treturn false;\n\t}\n\n\treturn true;\n}", "function deepEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n \n if (keys1.length !== keys2.length) {\n return false;\n }\n \n for (const key of keys1) {\n const val1 = object1[key];\n const val2 = object2[key];\n const areObjects = isObject(val1) && isObject(val2);\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n \n return true;\n}", "function sameKeysNested(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n if (typeof objA[keysA[i]] === \"object\")\n sameKeysNested(objA[keysA[i]], objB[keysB[i]], ignoreOrder)\n\n return true\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function dictsAreEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}", "function keyValMatch(obj1, obj2) {\r\n\t//create nested loop\r\n\t//for each key in obj 1, check each key of obj 2 for match\r\n\tfor(key1 in obj1) {\r\n\t\tfor(key2 in obj2) {\r\n\t\t\tif ( (key1 == key2) && (obj1[key1] == obj2[key2])) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\n return true;\n } // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n\n\n var it;\n\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n it = a.entries();\n\n while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false;\n\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n return true;\n } // END: Modifications\n\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; // END: fast-deep-equal\n // START: react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element) return false; // custom handling for React/Preact\n\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n continue;\n } // all other properties should be traversed as usual\n\n\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n } // END: react-fast-compare\n // START: fast-deep-equal\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal", "function shallowEqual(actual /*: Object*/, expected /*: Object*/) /*: boolean*/ {\n\t var keys = _Object$keys(expected);\n\n\t for (var _iterator3 = (keys /*: Array<string>*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) {\n\t var _ref3;\n\n\t if (_isArray3) {\n\t if (_i3 >= _iterator3.length) break;\n\t _ref3 = _iterator3[_i3++];\n\t } else {\n\t _i3 = _iterator3.next();\n\t if (_i3.done) break;\n\t _ref3 = _i3.value;\n\t }\n\n\t var key = _ref3;\n\n\t if (actual[key] !== expected[key]) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "function sameProperties(objA, objB) {\n var keysA = Object.keys(objA).sort()\n var keysB = Object.keys(objB).sort()\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i] || objA[keysA[i]] !== objB[keysB[i]])\n return false\n\n return true\n}", "function _shallowCompareKeys(objA, objB, keys) {\n\t return _filterKeys(objA, objB, keys).every(function (key) {\n\t return objA.hasOwnProperty(key) === objB.hasOwnProperty(key) && objA[key] === objB[key];\n\t });\n\t}", "function has_all(obj, keys) {\n for (var i in keys) {\n let key = keys[i];\n if (!(key in obj)) {\n return false;\n }\n }\n return true;\n}", "function matchItems(object1, object2) {\n for (var key in object1) {\n for (var anotherKey in object2) {\n if (key === anotherKey) {\n if (object1[key] === object2[anotherKey]) {\n return true;\n } \n }\n }\n }\n return false;\n }", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function areThereDuplicates(...args) {\n let obj = {};\n\n for (let val of args) {\n obj[val] = (obj[val] || 0) + 1;\n }\n \n for(let key in obj) {\n if(obj[key] !== 1) return true;\n }\n \n return false;\n}", "function deepEqual(a, b) {\n if (typeof a !== 'object' || typeof b !== 'object' || a == null || b == null)\n return a === b;\n if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (let i = 0; i < Object.keys(a).length; i++)\n if (!deepEqual(a[Object.keys(a)[i]], b[Object.keys(a)[i]])) return false;\n return true;\n}", "function shallowEqualObjects(a, b) {\r\n if (a && !b || b && !a) {\r\n return false;\r\n }\r\n\r\n for (var key in a) {\r\n if (a[key] !== b[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n} // Copied from: https://github.com/jonschlinkert/is-plain-object", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0; )\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (\n hasArrayBuffer &&\n ArrayBuffer.isView(a) &&\n ArrayBuffer.isView(b)\n ) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0; ) if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp)\n return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf)\n return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString)\n return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0; )\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0; ) {\n if (\n (keys[i] === '_owner' ||\n keys[i] === '__v' ||\n keys[i] === '__o') &&\n a.$$typeof\n ) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n }", "function deepEqual(firstObject, secondObject) {\n const firstKeys = Object.keys(firstObject);\n const secondKeys = Object.keys(secondObject);\n\n if (firstKeys.length !== secondKeys.length) {\n return false;\n }\n\n for (const key of firstKeys) {\n const val1 = firstObject[key];\n const val2 = secondObject[key];\n const areObjects = val1 != null && typeof val1 === 'object' && val2 != null && typeof val2 === 'object';\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n\n return true;\n}", "function objEquals(a, b)\r\n{\r\n for(x in b)\r\n if(typeof(a[x]) == \"undefined\")\r\n return false;\r\n\r\n for(x in a)\r\n {\r\n if(typeof(b[x]) == \"undefined\")\r\n return false;\r\n\r\n if(a[x])\r\n {\r\n if(typeof(a[x]) == \"object\")\r\n {\r\n if(typeof(b[x]) != \"object\" || !objEquals(a[x], b[x]))\r\n return false;\r\n }\r\n else if(a[x] !== b[x])\r\n return false;\r\n }\r\n else if(b[x])\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "function shallowCompareKeys(objA, objB, keys) {\n\t // treat `null` and `undefined` as the same\n\t if (objA == null && objB == null) {\n\t return true;\n\t }\n\t else if (objA == null || objB == null) {\n\t return false;\n\t }\n\t else if (Array.isArray(objA) || Array.isArray(objB)) {\n\t return false;\n\t }\n\t else if (keys != null) {\n\t return _shallowCompareKeys(objA, objB, keys);\n\t }\n\t else {\n\t // shallowly compare all keys from both objects\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t return (_shallowCompareKeys(objA, objB, { include: keysA }) && _shallowCompareKeys(objA, objB, { include: keysB }));\n\t }\n\t}", "function has_match(first_object, second_object) {\n\tfor (key in first_object) {\n\t\tif (first_object.key === second_object.key) {\n\t\t\treturn true; break;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function keyValueMatch(obj1, obj2) {\n\tfor (var key1 in obj1) {\n\t\tfor (var key2 in obj2) {\n\t\t\tif (key1 == key2) {\n\t\t\t\tif (obj1[key1] == obj2[key2]) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}" ]
[ "0.65732783", "0.65732783", "0.6468339", "0.6454703", "0.64346886", "0.63351655", "0.62950313", "0.62711096", "0.62403786", "0.6222752", "0.6213266", "0.6182621", "0.61569595", "0.6129296", "0.6127958", "0.6072991", "0.6034009", "0.6013137", "0.60031307", "0.59769714", "0.59752697", "0.5948945", "0.5943454", "0.5940558", "0.5939276", "0.59206945", "0.5919172", "0.58968604", "0.5848691", "0.58424157", "0.5828431", "0.58224416", "0.58224416", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.57999474", "0.5795523", "0.5784069", "0.57777274", "0.5773772", "0.5744925", "0.57147026", "0.57147026", "0.57135206", "0.56961316", "0.5695808", "0.56951445", "0.56831366", "0.5663536", "0.56598604", "0.56596214", "0.5659257", "0.5659257", "0.5659257", "0.5652973", "0.5637811", "0.5632446", "0.56251794", "0.56251794", "0.5614499", "0.56140304", "0.56026334", "0.560088", "0.5599421", "0.55934656", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865", "0.5590865" ]
0.0
-1
`ReactInstanceMap` maintains a mapping from a public facing stateful instance (key) and the internal representation (value). This allows public methods to accept the user facing instance as an argument and map them back to internal methods. Note that this module is currently shared and assumed to be stateless. If this becomes an actual Map, that will break. This API should be called `delete` but we'd have to make sure to always transform these to strings for IE support. When this transform is fully supported we can rename it.
function get(key){return key._reactInternalFiber;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWrapper(key)\n{\n\tthis.key = key;\n}", "function Map() {\n this.container = new Object();\n}", "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, value) {\n\t\tthis.keys.push(key);\n\t\tthis.values.push(value);\n\t}\n\n\t// get value from key\n\tthis.get = function(key) {\n\t\treturn this.keys.indexOf(key) != -1 ? this.values[this.keys.indexOf(key)] : null;\n\n\t}\n}", "function InvokeDefinitionMap() {\n this.map = [];\n this.lookup_table = {}; // Just for building dictionary\n}", "function Map() {\n\t\tthis._values = {};\n\t}", "function Map(implementation){\n\tvar map;\n\t\n\tswitch(implementation){\n\t\tcase 'hashMap':\n\t\t\tmap = new HashMap();\n\t\tbreak;\n\t\tdefault:\n\t\t\ttry{\n\t\t\t\tmap = instantiate(implementation)\n\t\t\t} catch(e) {\n\t\t\t\tthrow Error(\"Undefined implemantation name \" + implementation);\n\t\t\t}\n\t}\n\tInterface.ensureImplements(map, MapInterface);\n\treturn map;\n}", "function ValueMap(data) {\n this.data = data || {};\n}", "_saveInstanceProperties() {\n for (const [p] of this.constructor\n ._classProperties) {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n }\n }", "function ObjectMap ()\n\t{\n\t\t\n\t\t/**\n\t\t * Key value pairs\n\t\t * \n\t\t * @type {array of objects}\n\t\t */\n\t\tthis._keyValuePairs = [];\n\t}", "function Map() {}", "function TsMap(intrator) {\n // Used to store keys.\n this.keyStore = [];\n // Used to store values.\n this.valueStore = [];\n // The Map's size,\n // increase at function set,\n // decrease at function remove,\n // clear at function clear.\n this.size = 0;\n if (intrator) {\n for (var _i = 0, intrator_1 = intrator; _i < intrator_1.length; _i++) {\n var item = intrator_1[_i];\n this.keyStore.push(item[0]);\n this.valueStore.push(item[1]);\n this.size++;\n }\n }\n }", "function CachedMap(mappingFunction) {\n this._map = mappingFunction || null;\n this._cachedOutput = null;\n this._cachedInput = Number.NaN; //never valid as input\n }", "function Map() {\n this.dict = {};\n\n /**\n * Returns the number of key-value mappings in this map.\n * @method\n */\n this.size = function () {\n return Object.keys(this.dict).length;\n };\n\n /**\n * Returns true if this map contains no key-value mappings.\n * @method\n */\n this.isEmpty = function () {\n return Object.keys(this.dict).length == 0;\n };\n\n /**\n * Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.\n * @method\n */\n this.get = function (key) {\n return this.dict[key];\n };\n\n /**\n * Returns true if this map contains a mapping for the specified key.\n * @method\n */\n this.containsKey = function (key) {\n if (this.get(key) !== undefined) {\n return true;\n } else {\n return false;\n }\n };\n\n /**\n * Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.\n * @method\n */\n this.put = function (key, value) {\n this.dict[key] = value;\n };\n\n /**\n * Removes the mapping for the specified key from this map if present.\n * @method\n */\n this.remove = function (key) {\n try {\n 'use strict';\n delete this.dict[key];\n } catch (e) {\n console.log(e);\n }\n };\n\n /**\n * Removes all of the mappings from this map. The map will be empty after this call returns.\n * @method\n */\n this.clear = function () {\n this.dict = {};\n };\n\n /**\n * Executes the given callback for each entry in this map until all entries have been processed.\n * The given callback will be passed a map entry as parameter. So, for example...\n *\n * function myCallback(mapEntryItem) {\n * \t\tconsole.log('I will process this item: ' + mapEntryItem.text);\n * }\n *\n * myMap.forEach(myCallback);\n *\n * @method\n */\n this.forEach = function (callback) {\n var len = this.size();\n for (i = 0; i < len; i++) {\n var item = this.get(Object.keys(this.dict)[i]);\n callback(item);\n }\n };\n\n this.first = function (callback) {\n var len = this.size();\n for (i = 0; i < len && i < 1; i++) {\n var item = this.get(Object.keys(this.dict)[0]);\n callback(Object.keys(this.dict)[0], item);\n }\n };\n\n this.forAll = function (callback) {\n var len = this.size();\n for (i = 0; i < len; i++) {\n var key = Object.keys(this.dict)[i];\n var item = this.get(key);\n callback(key, item);\n }\n };\n}", "function Map(index, type) {\n\n // Constants -------------------------------------------------------------------\n\n const ID_PROP = '_id';\n\n // Instances -------------------------------------------------------------------\n\n // Keep track of the entry listeners added by the user.\n var _entryListeners = [];\n\n\t// Privates --------------------------------------------------------------------\n\n /**\n * Adds an entry listener which can be notified via callback function when an entry is added,\n * removed, updated or evicted from the map. These notifications will occur asynchronously and\n * they occur _after_ the event has been performed on the cache.\n *\n * The listener will have to provide at least one valid callback function. The function names\n * are entryAdded(entry), entryRemoved(entry), entryUpdated(entry) and entryEvicted(entry). If\n * the entry is a JSON object (which they all are), the entry will be a parsed JSON object. If\n * not, the entry parameter will be passed as-is.\n *\n * Each listener has a name property that uniquely identifies the listener. This is a bit of\n * a hack to prevent multiple listeners from being registered when the JS platform reloads\n * modules when they have been modified. In these cases, the registerListener() functions\n * fire again when the module is reloaded, and there is insufficient uniqueness in the\n * current set of parameters to determine if the registration is a duplicate or two\n * different listeners on the same event.\n *\n * @param listener\n */\n var addEntryListener = function(listener) {\n if (!listener.entryAdded && !listener.entryRemoved &&\n !listener.entryUpdated && !listener.entryEvicted) {\n throw 'EntryListener must implement a valid callback function.';\n }\n\n if (!listener.name) {\n throw 'EntryListener must have a unique name.';\n }\n\n // Remove a listener with the same name if it exists\n _entryListeners = _entryListeners.filter(function (l) {\n return listener.name !== l.name\n });\n\n _entryListeners.push(listener);\n };\n\n var clearEntryListeners = function() {\n _entryListeners = [];\n };\n\n var invokeListeners = function(eventName, event) {\n log.debug('Received internal event: {}, checking for listeners among [{}] candidates.',\n eventName, _entryListeners.length);\n if (_entryListeners.length > 0) {\n // Create the object we will be passing into each of our listeners\n var entry = {\n key: event.key,\n index: index,\n type: type,\n source: name,\n value: event.value,\n oldValue: event.oldValue\n };\n\n if (typeof entry.value === 'string') {\n try {\n entry.value = JSON.parse(entry.value);\n } catch(e) {\n }\n }\n\n if (typeof entry.oldValue === 'string') {\n try {\n entry.oldValue = JSON.parse(entry.oldValue);\n } catch(e) {\n }\n }\n\n for (var i = 0; i < _entryListeners.length; i++) {\n var handler = _entryListeners[i][eventName];\n if (handler) {\n executor.submit(createTask(eventName, handler, entry));\n }\n }\n }\n\n function createTask(eventName, func, entry) {\n return new java.lang.Runnable({\n run: function() {\n try {\n func(entry);\n } catch (e) {\n log.error('Error executing listener event: {}', eventName, e);\n }\n }\n });\n }\n };\n\n\t/**\n\t * Put can be called with or without a 'key' parameter. If the key parameter is not present, the\n\t * JSON value object is queried for an '_id' property. If found, the ID_PROP is the key. If not\n\t * found, a new UUID is generated and used as the key.\n\t *\n\t * This is completely arbitrary, but I am stipulating the key is a string and the value is an\n\t * object. If we decide later to allow values to be a string, date, or something else, this\n\t * logic will have to be rewritten.\n\t *\n\t * @params {string, object [,ttl, units]}\n\t * @params {object [,ttl, units]}\n\t *\n\t */\n\tvar put = function() {\n if (arguments.length === 0)\n throw 'IllegalArgumentException, map.put requires at least one argument.';\n\n var args = Array.prototype.slice.call(arguments);\n\n var result = putValue.apply(this, args);\n\n if (typeof result === 'string') {\n return JSON.parse(result);\n } else {\n return null;\n }\n\t};\n\n\n\tvar putValue = function() {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\tvar types = args.map(function(arg) {\n\t\t\treturn typeof arg;\n\t\t});\n\n\t\t// If the first parameter is a string, it is our key\n\t\tif (types[0] === 'string') {\n\t\t\treturn putKeyValue.apply(this, args);\n\t\t}\n\n\t\t// If the first parameter is an object, we have to check to see if it has a key. If so, we\n\t\t// will use it, otherwise we will generate a new key.\n\t\tif (types[0] === 'object') {\n\t\t\tvar value = args[0];\n\t\t\tvar key = value[ID_PROP];\n\t\t\tif (!key) key = value[ID_PROP] = generateId();\n\n\t\t\t// push the key into the argument list and invoke putKeyValue\n\t\t\targs.unshift(key);\n\t\t\treturn putKeyValue.apply(this, args);\n\t\t}\n\n\t\tthrow 'IllegalArgumentException, map.put requires the first parameter to be a string or an ' +\n\t\t\t\t'object.';\n\t};\n\n\n\t/**\n\t * Puts an entry into this map with a given ttl (time to live) value.\n\t * Entry will expire and get evicted after the ttl.\n\t *\n\t * @param key {String} key of the entry\n\t * @param value {Object} value of the entry\n\t * @param ttl {Number} maximum time for this entry to stay in the map\n\t * @param timeunit {String} time unit for the ttl\n\t * @return {Object} old value of the entry\n\t */\n\tvar putKeyValue = function(key, value, ttl, timeunit) {\n\t\tlog.debug('Putting into map <' + name + '>: ' + key);\n\n if(!ttl) ttl = 0;\n if(!timeunit) timeunit = java.util.concurrent.TimeUnit.MILLISECONDS;\n if (typeof timeunit === 'string') timeunit = java.util.concurrent.TimeUnit.valueOf(timeunit);\n\n\t\tdelete value._type;\n\t\tdelete value._version;\n\t\tdelete value._index;\n\t\tdelete value._score;\n\n var json = JSON.stringify(value);\n\t\treturn map.put(key, json, ttl, timeunit);\n\t};\n\n\t/**\n\t * Returns the value to which the specified key is mapped,\n\t * or {@code null} if this map contains no mapping for the key.\n\t *\n\t * <p>If this map permits null values, then a return value of\n\t * {@code null} does not <i>necessarily</i> indicate that the map\n\t * contains no mapping for the key; it's also possible that the map\n\t * explicitly maps the key to {@code null}. The {@link #containsKey\n\t * containsKey} operation may be used to distinguish these two cases.\n\t *\n\t * @param key the key whose associated value is to be returned\n\t * @return the value to which the specified key is mapped, or\n\t * {@code null} if this map contains no mapping for the key\n\t */\n\tvar get = function(key) {\n\t\tif (typeof key === 'object') return queryGet(key);\n\t\tlog.debug('Getting from map [{}]: {}', name, key);\n\t\tvar value = map.get(key);\n\t\tif (typeof value === 'string') {\n\t\t\treturn JSON.parse(value);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\n /**\n * Returns a set view of the keys contained in this map. The set is\n * backed by the map, so changes to the map are reflected in the set, and\n * vice-versa. If the map is modified while an iteration over the set is\n * in progress (except through the iterator's own <tt>remove</tt>\n * operation), the results of the iteration are undefined. The set\n * supports element removal, which removes the corresponding mapping from\n * the map, via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,\n * <tt>removeAll</tt> <tt>retainAll</tt>, and <tt>clear</tt> operations.\n * It does not support the add or <tt>addAll</tt> operations.\n *\n * @return a set view of the keys contained in this map.\n */\n\tvar keySet = function() {\n return map.keySet();\n\t};\n\n /**\n * Determines if the key passed is in the cache. Does not use the MapLoader to find the\n * key. Useful for testing map eviction.\n *\n * @param key\n */\n var hasKey = function ( key ) {\n var predicate = new com.hazelcast.query.Predicate( {\n apply: function(entry) {\n return entry.key === key;\n }\n } );\n var keys = map.keySet(predicate);\n return keys.size() > 0;\n };\n\n\tvar count = function(query) {\n\t\treturn elastic.count(query, index, type);\n\t};\n\n\n\tvar evict = function(key) {\n\t\tlog.debug('Evicting from map <' + name + '>: ' + key);\n\t\treturn map.evict(key);\n\t};\n\n\n\t//var refresh = function(query) {\n var refresh = function(query) {\n\t\treturn elastic.refresh(index);\n\t};\n\n\n\t/**\n\t * Removes the mapping for a key from this map if it is present\n\t * (optional operation). More formally, if this map contains a mapping\n\t * from key <tt>k</tt> to value <tt>v</tt> such that\n\t * <code>(key==null ? k==null : key.equals(k))</code>, that mapping\n\t * is removed. (The map can contain at most one such mapping.)\n\t *\n\t * <p>Returns the value to which this map previously associated the key,\n\t * or <tt>null</tt> if the map contained no mapping for the key.\n\t *\n\t * <p>The map will not contain a mapping for the specified key once the\n\t * call returns.\n\t *\n\t * @param key key whose mapping is to be removed from the map\n\t * @return the previous value associated with <tt>key</tt>, or\n\t * <tt>null</tt> if there was no mapping for <tt>key</tt>.\n\t */\n\tvar remove = function(key) {\n\t\tif (typeof key === 'object') return queryRemove(key);\n\t\tlog.debug('Removing from map [{}] using key: {}', name, key);\n\t\tvar previous = map.remove(key);\n\t\treturn (previous) ? JSON.parse(previous) : null;\n\t};\n\n\n\t/**\n\t * Removes all of the mappings from this map (optional operation).\n\t * The map will be empty after this call returns.\n\t */\n\tvar clear = function() {\n\t\tmap.clear();\n\t};\n\n\tvar size = function() {\n\t\treturn map.size();\n\t};\n\n\n\n\t/**\n\t * Hazelcast's strength is not querying because it is possible for some data to not yet be in\n\t * the in-memory cache. Because of this, querying is better suited to be performed against\n\t * Elastic Search or some other backing store which has access to the full set of data.\n\t *\n\t * @param json Object that describes the ES query\n\t */\n\tvar queryGet = function(json) {\n //var splitArr = name.split(\"-\");\n\t\tlog.debug('Searching map [{}]: {}', name, JSON.stringify(json));\n\t\treturn elastic.search(json, index, type);\n\t};\n\n\t/**\n\t * The query used to remove items from the map will be an ElasticSearch query. We don't\n\t * currently have a way to easily determine which id's are affected by the query, so we will\n\t * evict all elements from the map.\n\t *\n\t * // todo: It may be feasible to run the query and get the ids of all elements affected,\n\t * then evict them individually from the Hazelcase map by id,\n\t *\n\t * @param json\n\t */\n\tvar queryRemove = function(json) {\n\t\tlog.debug('Removing from map [{}] using query.: {}', name, JSON.stringify(json));\n\t\telastic.remove(json, index, type);\n\t\tmap.clear();\n\t};\n\n\n\tvar toString = function() {\n\t\treturn 'Hazelcast Map [' + name + ']';\n\t};\n\n\t// Constructors ----------------------------------------------------------------\n\n if (name === 'undefined' || type === 'undefined' || name === null || type === null)\n {\n\t throw 'Name of index and type of map must be set.';\n }\n\n // The name of the map in Hazelcast is a concatination of index and type.\n var name = index + '-' + type;\n\n // Use the Hazelcast instance to retrieve the map by name\n \tvar map = hazelcast.getMap(name);\n\n // attach a listener to the map to be notified of any events that occur on the map.\n var listener = new com.hazelcast.core.EntryListener({\n entryAdded: function(event) {\n invokeListeners('entryAdded', event);\n\t },\n entryRemoved: function(event) {\n invokeListeners('entryRemoved', event);\n\t },\n entryUpdated: function(event) {\n invokeListeners('entryUpdated', event);\n\t },\n entryEvicted: function(event) {\n invokeListeners('entryEvicted', event);\n\t }\n });\n\n // We use the local version of the entry listener because we usually only want one node in the\n // cluster to handle the event. If all of our nodes were notified when an event fired, we would\n // have to do some distributed gymnastics to ensure only one node handled the event. So, this\n // local event listening is very crucial, and provides excellent performance.\n log.debug('Adding Hazelcast event listener to map [{}]', name);\n map.addLocalEntryListener(listener);\n\n\n\treturn {\n addEntryListener: addEntryListener,\n clearEntryListeners: clearEntryListeners,\n\t\tclear: clear,\n\t\tevict: evict,\n\t\tget: get,\n\t\tkeySet: keySet,\n\t\thasKey: hasKey,\n\t\thzObject: map,\n index: index,\n type: type,\n\t\tname: name,\n\t\tput: put,\n\t\tcount: count,\n\t\tremove: remove,\n\t\trefresh: refresh,\n\t\tsize: size,\n\t\ttoString: toString\n\t};\n}", "function getInstanceContext(instanceId) {\n return instanceMap[instanceId]; \n }", "function get(key){return key._reactInternals;}", "function get(key){return key._reactInternals;}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function mapState(state) {\n return {\n counterValue: state.counterValue\n }\n}", "function Map() {\n this.members = {};\n this.length = 0;\n }", "render() {\n return(\n <div className=\"drumkit\">\n <div className=\"keys\">\n {\n Object.keys(this.state.keymaps)\n .map(key => <Keys key={key} map={this.state.keymaps[key]} index={key} className={this.state.keymaps[key].className} />)\n }\n </div>\n </div>\n )\n }", "function Map() {\n var keys = [], values = [];\n\n return {\n contains: function (key) {\n var at = keys.indexOf(key);\n return at > -1;\n },\n get: function (key) {\n var at = keys.indexOf(key);\n if (at >= 0) {\n return values[at];\n }\n },\n put: function (key, value) {\n var at = keys.indexOf(key);\n if (at < 0) {\n at = keys.length;\n }\n keys[at] = key;\n values[at] = value;\n },\n remove: function (key) {\n var at = keys.indexOf(key);\n if (at >= 0) {\n keys.splice(at, 1);\n values.splice(at, 1);\n }\n }\n }\n}", "map(predicate) {\n const tuples = this.toArray().map(([component, value]) => {\n const newValue = predicate(value, component);\n return [component.id.toString(), [component, newValue]];\n });\n return new ComponentMap(new Map(tuples));\n }", "add(index, instance) {\n // Add a single object only one parameter is passed\n // so index = instance\n if( instance === undefined) this.map.set( 0, index );\n else this.map.set( index, instance );\n }", "constructor () {\n this.storage = immutable.Map()\n }", "function Map() {\n if (this instanceof Map) {\n this._keys = OrderedSet.create();\n this._values = Object.create(null);\n this.size = 0;\n } else {\n missingNew('Map');\n }\n }", "function MapCache() {\n this.__data__ = {};\n}", "_saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.constructor\n ._classProperties.forEach((_v, p) => {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n });\n }", "_saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.constructor\n ._classProperties.forEach((_v, p) => {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n });\n }", "_saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.constructor\n ._classProperties.forEach((_v, p) => {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n });\n }", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function ObjectWithMap(){\r\n\t\r\n\tthis.map = (func) => {\r\n\t\t\r\n\t\tfor (let i in this){\r\n\t\t\tif(i != 'map') this[i] = func(this[i]);\r\n\t\t}\r\n\t\t\r\n\t}\r\n}", "function jsonMapMember(keyConstructor, valueConstructor, options) {\n if (options === void 0) { options = {}; }\n return function (target, propKey) {\n var decoratorName = \"@jsonMapMember on \" + nameof(target.constructor) + \".\" + String(propKey); // For error messages.\n if (typeof keyConstructor !== \"function\") {\n logError(decoratorName + \": could not resolve constructor of map keys at runtime.\");\n return;\n }\n if (typeof valueConstructor !== \"function\") {\n logError(decoratorName + \": could not resolve constructor of map values at runtime.\");\n return;\n }\n // If ReflectDecorators is available, use it to check whether 'jsonMapMember' has been used on a map. Warn if not.\n if (isReflectMetadataSupported && Reflect.getMetadata(\"design:type\", target, propKey) !== Map) {\n logError(decoratorName + \": property is not a Map. \" + MISSING_REFLECT_CONF_MSG);\n return;\n }\n injectMetadataInformation(target, propKey, {\n ctor: Map,\n elementType: [valueConstructor],\n keyType: keyConstructor,\n emitDefaultValue: options.emitDefaultValue,\n isRequired: options.isRequired,\n options: extractOptionBase(options),\n key: propKey.toString(),\n name: options.name || propKey.toString(),\n deserializer: options.deserializer,\n serializer: options.serializer,\n });\n };\n}", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function Map(){\r\n\r\n\tthis.elements = new Array();\r\n\t\r\n\tthis.size = function(){\r\n\t\treturn this.elements.length;\r\n\t};\r\n\t\r\n\tthis.isEmpty = function(){\r\n\t\treturn (this.elements.length < 1);\r\n\t};\r\n\t\r\n\tthis.clear = function(){\r\n\t\tthis.elements = new Array();\r\n\t};\r\n\t\r\n\tthis.put = function(_key, _value){\r\n\t\tthis.remove(_key);\r\n\t\tthis.elements.push({key: _key, value: _value});\r\n\t};\r\n\t\r\n\tthis.remove = function(_key){\r\n\t\ttry {\r\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\r\n\t\t\t\tif (this.elements[i].key == _key) {\r\n\t\t\t\t\tthis.elements.splice(i, 1);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\t\r\n\tthis.get = function(_key){\r\n\t\ttry {\r\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\r\n\t\t\t\tif (this.elements[i].key == _key) { return this.elements[i].value; }\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\t\r\n\tthis.element = function(_index){\r\n\t\tif (_index < 0 || _index >= this.elements.length) { return null; }\r\n\t\treturn this.elements[_index];\r\n\t};\r\n\t\r\n\tthis.containsKey = function(_key){\r\n\t\ttry {\r\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\r\n\t\t\t\tif (this.elements[i].key == _key) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\t\r\n\tthis.values = function(){\r\n\t\tvar arr = new Array();\r\n\t\tfor (i = 0; i < this.elements.length; i++) {\r\n\t\t\tarr.push(this.elements[i].value);\r\n\t\t}\r\n\t\treturn arr;\r\n\t};\r\n\t\r\n\tthis.keys = function(){\r\n\t\tvar arr = new Array();\r\n\t\tfor (i = 0; i < this.elements.length; i++) {\r\n\t\t\tarr.push(this.elements[i].key);\r\n\t\t}\r\n\t\treturn arr;\r\n\t};\r\n}", "function HashMap(){\n return {\n get: function(k){\n return this.store[k];\n },\n set: function(k, v){\n this.store[k] = v;\n return this;\n },\n has: function(k){\n return this.store[k] !== undefined;\n },\n delete: function(k){\n if(this.store[k] !== undefined){\n delete this.store[k];\n return true;\n }\n return false;\n },\n entries: function(){\n var entries = [];\n for(key in this.store){\n entries.push([key, this.store[key]]);\n }\n return entries;\n },\n forEach: function(callback, thisArg){\n for(key in this.store){\n if(thisArg !== undefined){\n thisArg.callback(key, this.store[key]);\n }else{\n callback(key, this.store[key]);\n }\n }\n },\n keys: function(){\n var keys = [];\n for(key in this.store){\n keys.push(key);\n }\n return keys;\n },\n values: function(){\n var values = [];\n for(key in this.store){\n values.push(this.store[key]);\n }\n return values;\n },\n\n store: {}\n };\n }", "function Map(){\n\n\tthis.elements = new Array();\n\t\n\tthis.size = function(){\n\t\treturn this.elements.length;\n\t}\n\t\n\tthis.isEmpty = function(){\n\t\treturn (this.elements.length < 1);\n\t}\n\t\n\tthis.clear = function(){\n\t\tthis.elements = new Array();\n\t}\n\t\n\tthis.put = function(_key, _value){\n\t\tthis.remove(_key);\n\t\tthis.elements.push({key: _key, value: _value});\n\t}\n\t\n\tthis.remove = function(_key){\n\t\ttry {\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\n\t\t\t\tif (this.elements[i].key == _key) {\n\t\t\t\t\tthis.elements.splice(i, 1);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\tthis.get = function(_key){\n\t\ttry {\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\n\t\t\t\tif (this.elements[i].key == _key) { return this.elements[i].value; }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t}\n\t\n\tthis.element = function(_index){\n\t\tif (_index < 0 || _index >= this.elements.length) { return null; }\n\t\treturn this.elements[_index];\n\t}\n\t\n\tthis.containsKey = function(_key){\n\t\ttry {\n\t\t\tfor (i = 0; i < this.elements.length; i++) {\n\t\t\t\tif (this.elements[i].key == _key) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\tthis.values = function(){\n\t\tvar arr = new Array();\n\t\tfor (i = 0; i < this.elements.length; i++) {\n\t\t\tarr.push(this.elements[i].value);\n\t\t}\n\t\treturn arr;\n\t}\n\t\n\tthis.keys = function(){\n\t\tvar arr = new Array();\n\t\tfor (i = 0; i < this.elements.length; i++) {\n\t\t\tarr.push(this.elements[i].key);\n\t\t}\n\t\treturn arr;\n\t}\n}", "function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }", "function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }", "function Map() {\n\t this.items = Object.create(null);\n\t this.length = 0;\n\t this.next = 0;\n\t }", "function MapCache() {\n this.__data__ = {};\n }", "function Map() {\n\t\t this.items = Object.create(null);\n\t\t this.length = 0;\n\t\t this.next = 0;\n\t\t }", "function replacer(key, value) {\n const originalObject = this[key];\n\n if(originalObject instanceof Map) {\n const entry = Array.from(originalObject.entries());\n return entry.reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n } else {\n return value;\n }\n}", "function createMap() {\n return Object.create(null)\n}", "function createAutoBindMap(){if(!current.__reactAutoBindMap){return;}var __reactAutoBindMap={};for(var name in current.__reactAutoBindMap){if(typeof proxy[name]==='function'&&current.__reactAutoBindMap.hasOwnProperty(name)){__reactAutoBindMap[name]=proxy[name];}}return __reactAutoBindMap;}", "function createAutoBindMap(){if(!current.__reactAutoBindMap){return;}var __reactAutoBindMap={};for(var name in current.__reactAutoBindMap){if(typeof proxy[name]==='function'&&current.__reactAutoBindMap.hasOwnProperty(name)){__reactAutoBindMap[name]=proxy[name];}}return __reactAutoBindMap;}", "_saveInstanceProperties(){// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nthis.constructor._classProperties.forEach((_v,p)=>{if(this.hasOwnProperty(p)){const value=this[p];delete this[p];if(!this._instanceProperties){this._instanceProperties=new Map}this._instanceProperties.set(p,value)}})}", "function Map() {\n if (this instanceof this.constructor) {\n this._keys = OrderedSet.create();\n this._keys._silenceRemoveDeprecation = true;\n this._values = new _emberMetalEmpty_object.default();\n this.size = 0;\n } else {\n missingNew('OrderedSet');\n }\n }", "function Map() {\n if (this instanceof this.constructor) {\n this._keys = OrderedSet.create();\n this._keys._silenceRemoveDeprecation = true;\n this._values = new _emberMetalEmpty_object.default();\n this.size = 0;\n } else {\n missingNew('OrderedSet');\n }\n }", "function mapData(instances) {\n const diffData = {}\n instances.forEach((instance, idx) => {\n diffData[instance.name.toLowerCase()] = idx\n })\n return diffData\n}", "function saveInstance(instanceContext) {\n instanceId = instanceContext.instanceId;\n if (!instanceId) throw '--- instanceId is undefined';\n if (!instanceMap[instanceId]) throw '--- undefined instance ---';\n instanceMap[instanceId] = instanceContext;\n }", "function MapCache() {\n this.__data__ = {};\n }", "handleMap() {\r\n this.setState({displayMap: true});\r\n this.setState({displayedState: 'Map'});\r\n this.setState({displayedData: []});\r\n this.setState({output: []});\r\n this.setState({submitted: false});\r\n this.setState({allEntries: false});\r\n this.clearSearchFields();\r\n }" ]
[ "0.56250936", "0.5444014", "0.54394263", "0.54297894", "0.52931684", "0.5229124", "0.52213204", "0.5153877", "0.5149647", "0.5146485", "0.5124302", "0.5117343", "0.5113928", "0.51124424", "0.5056032", "0.50448793", "0.50252193", "0.50252193", "0.49983275", "0.49983275", "0.49983275", "0.49983275", "0.49909443", "0.49803767", "0.4962937", "0.4955822", "0.4953732", "0.49308357", "0.49193725", "0.49101692", "0.49062556", "0.4883781", "0.4883781", "0.4883781", "0.4881514", "0.4881514", "0.4881514", "0.4881514", "0.4881514", "0.4881514", "0.48750275", "0.48641154", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48534456", "0.48524112", "0.48321706", "0.4826128", "0.4821695", "0.4821695", "0.48125446", "0.4810177", "0.48087206", "0.4801939", "0.47919175", "0.47887778", "0.47887778", "0.47789326", "0.47722894", "0.47722894", "0.47636974", "0.47591412", "0.47533804", "0.4751104" ]
0.4917855
38
Find the deepest React component completely containing the root of the passedin instance (for use when entire React trees are nested within each other). If React trees are not nested, returns null.
function findRootContainerNode(inst){// TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while(inst.return){inst=inst.return;}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree. return null;}return inst.stateNode.containerInfo;}// Used to store ancestor hierarchy in top level callback
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n }\n else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}" ]
[ "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6876151", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.6797642", "0.67871845", "0.67871845", "0.67871845", "0.67871845", "0.67871845", "0.67871845", "0.67871845", "0.67806417", "0.67806417", "0.67806417", "0.67806417", "0.6759185", "0.6759185", "0.6759185", "0.6752743", "0.6723364", "0.6699298", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304", "0.66683304" ]
0.0
-1
Implements an host component that warns when `selected` is set.
function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too. // Warn about invalid children here so that client and hydration are consistent. // TODO: this seems like it could cause a DEV-only throw for hydration // if children contains a non-element object. We should try to avoid that. if(_typeof(props.children)==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;warning$1(false,'Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>. if(props.selected!=null&&!didWarnSelectedSetOnOption){warning$1(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _shouldUpdateSelection(){return this.selected!=null;}", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "select() { this.selected = true; }", "get _shouldUpdateSelection(){return this.selected!=null||this.selectedValues!=null&&this.selectedValues.length;}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n\t{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "get disallowEmptySelection() {\n return this.state.disallowEmptySelection;\n }", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "select () {\n this.selected = true;\n }", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{if(props.selected!=null&&!didWarnSelectedSetOnOption){warning(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{if(props.selected!=null&&!didWarnSelectedSetOnOption){warning(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "_hideSelected() {\n this.props.hideSelected();\n }", "checkSelection(){\n Ember.run.next(() =>{\n let sel = this.getSelection(),\n hasSelection = !!$.trim(sel.toString());\n\n this.$toolpane.css('visibility', hasSelection ? 'visible' : 'hidden');\n\n if(hasSelection) {\n this.$toolpane.css(this.getToolpaneCoords(sel));\n }\n });\n }", "_setSelectedOption() {\n if (this.options.length > 1) super._setSelectedOption();\n }", "set selectedItem(aItem) {\n // A predicate is allowed to select a specific item.\n // If no item is matched, then the current selection is removed.\n if (typeof aItem == \"function\") {\n aItem = this.getItemForPredicate(aItem);\n }\n\n // A falsy item is allowed to invalidate the current selection.\n let targetElement = aItem ? aItem._target : null;\n let prevElement = this._widget.selectedItem;\n\n // Make sure the selected item's target element is focused and visible.\n if (this.autoFocusOnSelection && targetElement) {\n targetElement.focus();\n }\n if (this.maintainSelectionVisible && targetElement) {\n // Some methods are optional. See the WidgetMethods object documentation\n // for a comprehensive list.\n if (\"ensureElementIsVisible\" in this._widget) {\n this._widget.ensureElementIsVisible(targetElement);\n }\n }\n\n // Prevent selecting the same item again and avoid dispatching\n // a redundant selection event, so return early.\n if (targetElement != prevElement) {\n this._widget.selectedItem = targetElement;\n let dispTarget = targetElement || prevElement;\n let dispName = this.suppressSelectionEvents ? \"suppressed-select\" : \"select\";\n ViewHelpers.dispatchEvent(dispTarget, dispName, aItem);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "get selected() { return this.selectionList.selectedOptions.isSelected(this); }", "get selected() { return this.selectionList.selectedOptions.isSelected(this); }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }", "get selected() {\n return this._selected;\n }", "get selected() {\n return this._selected;\n }", "get selected() {\n return this._selected;\n }", "_canItemBeSelected(item) {\n return item.disabled === false && item.templateApplied !== true;\n }", "_setSelected(selected) {\n if (selected === this._selected) {\n return false;\n }\n this._selected = selected;\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n }\n else {\n this.selectionList.selectedOptions.deselect(this);\n }\n this.selectedChange.emit(selected);\n this._changeDetector.markForCheck();\n return true;\n }", "mounted(el, { value }) {\r\n setSelected(el, value);\r\n }", "mounted(el, { value }) {\r\n setSelected(el, value);\r\n }", "displayUnreliableSuppressed() {\n // Don't display unreliable/suppressed unless the selected maternal health is one of the following values.\n if ([\"Maternal Mortality Rate\", \"Late Maternal Death Rate\"].includes(this.getMaternalHealthSelected())) {\n return true;\n }\n return false;\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n }\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n }\n }", "@readOnly\n @computed('selectedItems', 'disabled')\n /**\n * Input should be disabled if anything is selected\n * @param {Number[]} selected - the selected indices\n * @param {Boolean} disabled - the selected indices\n * @returns {Boolean} true if anything is selected\n */\n disableInput (selected, disabled) {\n return disabled || (selected.length > 0)\n }", "set selected(value) {\n this._selected = value;\n this._selectedTimestamp = value ? new Date() : undefined;\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "function handleSelection(value) {\n setCategory(value);\n setVisible(false);\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }", "function checkSelection(name, value){\n\tif (value == -1) {\n \t errMessages += \"<li>\" + name + \" - Please select a choice.</li>\"; \n\t}\n\telse {\n\t\treturn true;\n\t}\n}", "notify(options) {\n\t\tif (options.model==='MenuModel' && options.method==='selected') {\n\t\t\t//console.log(['In ',this.name,' selected = ',options.selected]);\n\t\t\tif (this.name === options.selected) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t\tthis.restore();\n\t\t\t\t\tthis.show();\n\t\t\t\t}, 100);\n\t\t\t} else {\n\t\t\t\tthis.visible = false;\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}\n\t}", "'state.selected_diagnostics'() {\n if (this.state.selected_diagnostics.length !== 0) {\n this.uncheckLabelsButtons();\n this.createPlot();\n }\n }", "function SelectableDropdownItem({ isSelected, ...props }) {\n return (\n <li className=\"relative\"> \n <DropdownItem \n {...props} \n handleClick={!isSelected ? props.handleClick : (e) => e.preventDefault()} \n {\n ...(isSelected && { rootClass: 'border-2 border-primary pointer-events-none' })\n } />\n {\n isSelected && (\n <div className=\"absolute top-2 right-2 py-1 px-2 rounded-lg bg-green-200 font-bold text-sm text-green-700 pointer-events-none shadow-main\">\n <p>Selected</p>\n </div>\n )\n }\n </li>\n )\n}", "get hidden() {\n return !this.selected;\n }", "setSelected(selected) {\n if (selected !== this.state.selected) {\n this.setState({ selected })\n }\n }", "select(item) {\n if (this.state.selected !== item) {\n this.state.selected = item;\n this.props.updateFilter(this.state.selected);\n }\n }", "getSelectedTarget() {\n this.socket.emit('get_selected_target');\n return false;\n }", "_selectionHandler(activeProject) {\n for (projectElement of this.projects) {\n projectElement.markUnchecked();\n }\n activeProject.markChecked();\n this.emitter.emit('did-change-path-selection', activeProject.path);\n }", "mounted (el, { value }) {\n setSelected(el, value);\n }", "function Update()\r\n{\r\n\tif (selected && !activated)\r\n\t{\r\n\t\tif (puzzle_desc_box.enabled == false)\r\n\t\t{\r\n\t\t\teditor_object.SendMessage(\"assign_target\", this.gameObject, \r\n\t\t\t\t\t\t\t\t\t SendMessageOptions.DontRequireReceiver);\r\n\t\t\tpuzzle_desc_box.enabled = true;\r\n\t\t}\r\n\t} else if (puzzle_desc_box.enabled == true) \r\n\t{\r\n\t\tpuzzle_desc_box.enabled = false;\r\n\t}\r\n}", "function validateProps(element, props) {\n\t // TODO (yungsters): Remove support for `selected` in <option>.\n\t {\n\t warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\t }\n\t}", "set Selected(value) {\n this._selected = value;\n if (value) {\n selectedInput = this;\n }\n else {\n selectedInput = null;\n }\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function Selected(props) {\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", { className: 'selected ' + (props.clear || '') },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", null,\n \"The \",\n props.selecting,\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, props.selected),\n \" has been selected\"),\n props.clear === 'clear' ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", { onClick: props.clearWS },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", { xmlns: 'http://www.w3.org/2000/svg', id: 'Close', width: '12', height: '12', viewBox: '0 0 12 12' },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", { id: 'X_5_', d: 'M6.21,6.5l2.65-2.65c0.19-0.19,0.19-0.51,0-0.71 s-0.51-0.19-0.71,0L5.5,5.79L2.85,3.15c-0.19-0.19-0.51-0.19-0.71,0s-0.19,0.51,0,0.71L4.79,6.5L2.15,9.15 c-0.19,0.19-0.19,0.51,0,0.71c0.19,0.19,0.51,0.19,0.71,0L5.5,7.21l2.65,2.65c0.19,0.19,0.51,0.19,0.71,0 c0.19-0.19,0.19-0.51,0-0.71L6.21,6.5z', fillRule: 'evenodd', clipRule: 'evenodd', fill: '#666766' }))) : '')));\n}", "get selectable() { return this._selectable; }", "get selectable() { return this._selectable; }", "__$$triggerSelectionChange() {\n\t\tconst selected = this.state.selected\n\t\tthis.refs.headerCheckbox.indeterminate = this.__$$checkboxShouldBeIndeterminate(selected)\n\n\t\tconst fn = this.props.onChange || (() => { })\n\t\tfn(this, this.getSelectedIndices(selected))\n\t}", "selectionChanged(selected) {\n const vizConf = this.visualConfig;\n this.selected = selected;\n if (selected) {\n this.label.tint = vizConf.ui.label.font.highlight;\n this.labelBgContainer.forEach((labelBg) => {\n labelBg.tint = vizConf.ui.label.background.highlight;\n });\n } else {\n this.label.tint = vizConf.ui.label.font.color;\n this.labelBgContainer.forEach((labelBg) => {\n labelBg.tint = vizConf.ui.label.background.color;\n });\n }\n }", "constructor(value, selected) {\r\n this.value = value;\r\n this.selected = selected;\r\n }", "selected(value) {\n value = this.convertOutput(value);\n this.set('model.' + this.get('field'), value);\n // Send action if it is passed.\n if (this.get('onSelect')) {\n this.get('onSelect')(value);\n }\n }", "validateSelect(target) {\n\t\tif(target.value == '') {\n\t\t\ttarget.style.border = '1px solid red';\n\t\t\tthis.selectWarning.classList.add('warning');\n\t\t} else {\n\t\t\ttarget.style.border = '';\n\t\t\tthis.selectWarning.classList.remove('warning');\n\t\t}\n\t}", "_checkSelectIsAble () {\n return true\n }", "_setSelected(selected) {\n if (selected === this._selected) {\n return false;\n }\n this._selected = selected;\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n }\n else {\n this.selectionList.selectedOptions.deselect(this);\n }\n this._changeDetector.markForCheck();\n return true;\n }", "onMultiSelectionComponentPress(event) {\n if (this.isInactive) {\n return;\n }\n this.fireEvent(\"_selection-requested\", {\n item: this,\n selected: event.target.checked,\n selectionComponentPressed: true\n });\n }", "selectHandler(e) {\n const { trigger } = this.props;\n trigger(e);\n }", "function option(value, selected) {\n return {\n selected: observable(has(selected) ? selected : allCheckbox()),\n value: has(value) ? value.toString() : \"\"\n };\n }", "@className('is-invalid')\n @computed('selectedColor')\n get _isInvalid() {\n return !this._validateColor(this.get('selectedColor'));\n }" ]
[ "0.5835138", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.56534386", "0.55851144", "0.5576835", "0.5574898", "0.55625105", "0.55625105", "0.5542894", "0.55244917", "0.55244917", "0.5513038", "0.5443834", "0.5435288", "0.5418387", "0.5413063", "0.5413063", "0.5413063", "0.5413063", "0.5412548", "0.5412548", "0.53901887", "0.53684646", "0.53684646", "0.53684646", "0.53647757", "0.5356113", "0.53322697", "0.53322697", "0.53093964", "0.53039145", "0.53039145", "0.5297552", "0.5277064", "0.52712804", "0.52712804", "0.52712804", "0.52712804", "0.52712804", "0.52712804", "0.52712804", "0.52655303", "0.5262013", "0.5258836", "0.5254594", "0.5252073", "0.5246993", "0.524382", "0.52432406", "0.52172583", "0.52165884", "0.5214721", "0.5213948", "0.5211734", "0.52097267", "0.519453", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.5188785", "0.518406", "0.51572895", "0.51572895", "0.51396114", "0.51368636", "0.5132361", "0.5119722", "0.51153034", "0.5114101", "0.51056343", "0.510285", "0.5101597", "0.5100261", "0.50969684" ]
0.0
-1
Validation function for `value` and `defaultValue`.
function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'validateValue'(value) {}", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : parseInt(value);\n const signedNumber = !canBeNegative\n ? Math.abs(valueAsNumber)\n : valueAsNumber;\n\n return !isNaN(signedNumber) ? signedNumber : defaultValue;\n } else if (canBeEmpty) {\n return '';\n }\n\n return defaultValue;\n}", "function requireValue(field, value) { }", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n}", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n }", "function valueCheck(props, ...args) {\n if (props.multiple) return p.arrayOf(valueShape).isRequired(props, ...args)\n return valueShape(props, ...args)\n}", "function validate(value){\r\n \r\n if(typeof(value) !== \"undefined\" && value !== \"\"){\r\n // console.log(\"value exists: \", value);\r\n\r\n return value;\r\n\r\n }\r\n\r\n // console.log(\"value does not exist: \", value);\r\n \r\n return \"\";\r\n\r\n }", "validateValue (value) {\n return TypeNumber.isNumber(value) && !isNaN(value)\n }", "function defaulted(value,defaultValue){return value!==undefined?value:defaultValue;}", "function validator(value) {\n if (value === undefined || value === null)\n return true;\n if (Number.isNaN(value))\n return false;\n return true;\n}", "validate(value) {\n if (value < 0) return 0;\n else if (value > 5) return 5;\n }", "validateRequired(propValue, value) {\n return !(propValue && _isEmpty(value));\n }", "function ValidateTypeValue(type, value)\n{\n\tif (type == \"Bool\")\n\t{\n\t\tif (value != \"true\" && value != \"false\")\n\t\t{\n\t\t\treturn \"default value must be either 'True' or 'False' for Bool\";\n\t\t}\n\t}\n\telse if (type == \"Int\" || type == \"Float\")\n\t{\n\t\tif (isNaN(value))\n\t\t{\n\t\t\treturn \"default value must be digit(s) for Int or Float\";\n\t\t}\n\t}\n\telse\n\t{\n\t\t// everything is fine as a string or custom type\n\t\treturn null;\n\t}\n}", "validInput(value) {\r\n let props = this.props;\r\n if (!value)\r\n return props.eReq;\r\n else if (props.eClientValidation)\r\n return props.eClientValidation(value, props.inputProps.floatingLabelText)\r\n return null;\r\n }", "function CheckInputValue($mask, $input, value, validationType, def, isFormSubmit) {\n\n var $parentForm = $input.closest(\".responsive-form\");\n\n // validate\n switch (validationType) {\n // =======================================================\n // === VAL TYPE: Required field\n // === REQUIRMENTS: not null\n // === Data-Validation(s): \"req-field\"\n // =======================================================\n\n case \"req-field\":\n def.resolve(!IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Required Drop Down Selection\n // === REQUIRMENTS: not null or not zero\n // === SUPPORTED Data-Validation: \"req-selection\"\n // =======================================================\n\n case \"req-selection\":\n\n def.resolve(!IsNoSelection(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Checkbox/Radio Button field\n // === REQUIRMENTS: checked\n // === SUPPORTED Data-Validation: \"req-checked\"\n // =======================================================\n\n case \"req-checked\":\n\n def.resolve(!$input.is(\":checked\"));\n break;\n\n // =======================================================\n // === VAL TYPE: Checkbox/Radio Button List fields\n // === REQUIRMENTS: at least one input checked\n // === Data-Validation(s): \"req-checked-list\"\n // =======================================================\n\n case \"req-checked-list\":\n\n def.resolve(!$input.find(\"input:checked\").size());\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: not null, valid number, greater than zero, or \"N/A\"\n // === Data-Validation(s): \"req-price\"\n // =======================================================\n\n case \"req-price\":\n if ($input.hasClass(\"format-price\")){\n value = value.replace(/[^.0-9]/g, '');\n $input.val('$' + parseFloat(value).toFixed(2));\n }\n def.resolve(!IsPrice(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: not null, valid number, greater than or equal to a minimum number, or \"N/A\"\n // === SUPPORTED CLASSES: \"req-price-min\"\n // === requires attribute: data-minprice=\"10\"\n // =======================================================\n\n case \"req-price-min\":\n var enteredPriceText = value.replace(/[^.0-9]/g, \"\"),\n enteredPrice = parseFloat(enteredPriceText),\n minPrice = $input.attr(\"data-minprice\");\n\n $input.val('$' + enteredPrice);\n\n def.resolve(!IsNotEmpty(enteredPrice) || !IsNumber(enteredPrice) || enteredPrice < minPrice);\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: valid number, greater than zero, or \"N/A\" and within range\n //\t=== Data-Validation(s): \"req-price-range\"\n // === SUPPORTED CLASSES: \" req-price-top, req-price-bottom\"\n // =======================================================\n\n case \"req-price-range\":\n var showDollar = \"$\";\n if ($input.hasClass(\"format-price\")) {\n value = value.replace(/[^.0-9]/g, '');\n $input.val('$' + parseFloat(value).toFixed(2));\n }\n\n case \"req-number-range\":\n var isNumber = IsNumber(value),\n topPriceText = ($input.closest(':has(.req-price-top)').find('.req-price-top').text()).replace(/[^.0-9]/g, ''),\n topPrice = parseFloat(topPriceText),\n bottomPriceText = ($input.closest(':has(.req-price-bottom)').find('.req-price-bottom').text()).replace(/[^.0-9]/g, ''),\n bottomPrice = parseFloat(bottomPriceText),\n enteredPriceText = value.replace(/[^.0-9]/g, ''),\n enteredPrice = parseFloat(enteredPriceText),\n\t\t\t\t\tdollar = showDollar || \"\",\n returnValue = false;\n\t\t\t\t\t\n if (value != \"N/A\" && (!isNumber || value <= 0)) {\n \t\t\t\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter a valid amount.');\n\n }\n else if (!isNaN(topPrice) && topPrice < enteredPrice) {\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter an amount less than or equal to ' + dollar + topPrice + '.');\n }\n else if (!isNaN(bottomPrice) && bottomPrice > enteredPrice) {\n \t\t\t\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter an amount more than ' + dollar + bottomPrice + '.');\n }\n def.resolve(returnValue);\n break;\n\n\n case \"req-number\":\n if (!IsNotEmpty(value)) {\n\n $mask.removeAttr('data-warning-override');\n }\n else {\n $mask.attr('data-warning-override', $mask.attr('title') + ' (Must be a valid number)');\n }\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Number field\n // === REQUIRMENTS: valid number, greater than zero, less than 3\n // === Data-Validation(s): \"req-three\"\n // =======================================================\n \n case \"req-three\":\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || parseInt(value) < 0 || parseInt(value) > 3 );\n break;\n\n // =======================================================\n // === VAL TYPE: Number field\n // === REQUIRMENTS: valid number, greater than zero\n // === Data-Validation(s): \"opt-number\"\n // =======================================================\n\n case \"opt-number\":\n\n def.resolve(IsNotEmpty(value) && (!IsWholeNumber(value) || !IsNumber(value) ));\n break;\n\n // =======================================================\n // === VAL TYPE: UPC field\n // === REQUIRMENTS: not null, valid number, 11 or 12 digits\n // === Data-Validation(s): \"req-upc\"\n // =======================================================\n\n case \"req-upc\":\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || (value.length != 11 && value.length != 12));\n break;\n\n // =======================================================\n // === VAL TYPE: UPC field\n // === REQUIRMENTS: not null, valid number, 13 digits \n // === Data-Validation(s): \"req-upc\"\n // =======================================================\n case \"opt-isbn\":\n if (value == \"\") {\n def.resolve(false);\n }\n case \"req-isbn\":\n value = value.replace(\"-\", \"\");\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || !IsISBN(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Phone Number field\n // === REQUIRMENTS: not null, valid phone number\n // === Data-Validation(s): \"req-phone\"\n // =======================================================\n\n case \"req-phone\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve((!IsPhoneNumber(value) && !IsInternationalPhoneNumber(value)) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Phone Number field\n // === REQUIRMENTS: valid phone number\n // === Data-Validation(s): \"opt-phone\"\n // =======================================================\n\n case \"opt-phone\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(!IsPhoneNumber(value) && !IsInternationalPhoneNumber(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: US Phone Number field\n // === REQUIRMENTS: not null, valid US phone number\n // === Data-Validation(s): \"req-phone-us\"\n // =======================================================\n\n case \"req-phone-us\":\n\n FormatUSPhoneNumber($input, value, true);\n def.resolve(!IsUSPhoneNumber(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional US Phone Number field\n // === REQUIRMENTS: valid US phone number\n // === Data-Validation(s): \"opt-phone-us\"\n // =======================================================\n\n case \"opt-phone-us\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(!IsUSPhoneNumber(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Phone Number field by country value\n // === REQUIRMENTS: not null, valid phone number by country\n // === Data-Validation(s): \"req-phone-bycountry\"\n // =======================================================\n\n case \"req-phone-bycountry\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(IsPhoneNumberByCountry(value, $parentForm.find(\".dd-country select\").val().toLowerCase()) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Phone Number field by country value\n // === REQUIRMENTS: not null, valid phone number by country\n // === Data-Validation(s): \"req-phone-bycountry\"\n // =======================================================\n\n case \"opt-phone-bycountry\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(IsPhoneNumberByCountry(value, $parentForm.find(\".dd-country select\").val().toLowerCase()) && IsNotEmpty(value) && value != \"+\" + $input.data('phonecode'));\n break;\n\n // =======================================================\n // === VAL TYPE: Address1 field\n // === REQUIRMENTS: valid add from UPS web API\n // === Data-Validation(s): \"req-address1\"\n // =======================================================\n\n case \"req-address1\":\n\n var jsonCurrentAddress = { addressline1: $parentForm.find(\".txt-address1 .textbox\").val(), city: $parentForm.find(\".txt-city .textbox\").val(), state: $parentForm.find(\".dd-states .dropdown\").val(), zipCode: $parentForm.find(\".txt-zipcode .textbox\").val(), country: $parentForm.find(\".dd-country .dropdown\").val() };\n \n // if the zip code is empty, fail\n if (!IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n\n // if the address has been certified to be correct, even though UPS said otherwise...pass\n else if (CertifiedAddressMatches(jsonCurrentAddress))\n {\n def.resolve(false);\n } // else if\n\n else {\n\n // get the values for the current zip code and country code\n var countryCode = $parentForm.find(\".dd-country .dropdown\").val();\n\n // make sure we have a valid country code and valid ZIP code before checking for city/state population and only perform this check on form submit\n if (countryCode == \"US\" && isFormSubmit) {\n\n // build the json request\n var jsonData = { testing: false, companyname: $parentForm.find(\".txt-company .textbox\").val(), addressline1: $parentForm.find(\".txt-address1 .textbox\").val(), addressline2: $parentForm.find(\".txt-address2 .textbox\").val(), city: $parentForm.find(\".txt-city .textbox\").val(), state: $parentForm.find(\".dd-states .dropdown\").val(), zipCode: $parentForm.find(\".txt-zipcode .textbox\").val(), country: $parentForm.find(\".dd-country .dropdown\").val() },\n addressString = $parentForm.find(\".txt-address1 .textbox\").val() + \" \" + $parentForm.find(\".txt-address2 .textbox\").val() + \" \" + $parentForm.find(\".txt-city .textbox\").val() + \" \" + $parentForm.find(\".dd-states .dropdown\").val() + \" \" + $parentForm.find(\".txt-zipcode .textbox\").val();\n\n // debug console output\n if (showJSONAddressData) { console.log(jsonData); }\n\n // send the json request to the handler\n $.ajax({\n url: '/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationStreetLevel.ashx',\n type: 'POST',\n data: JSON.stringify(jsonData),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (data) {\n\n // the json in values produced json out values\n if (data != undefined && data.Response != undefined) {\n\n // assign the response objects\n var dataResponse = data.Response,\n dataAddressClassification = data.AddressClassification,\n dataAddressKeyFormats = data.AddressKeyFormats,\n dataAddressIndicator = data.AddressIndicator;\n\n // debug console output\n if (showJSONAddressData) { console.log(data); }\n\n // a response has been returned, but check to see if it is an error response \n if (dataResponse.ResponseStatusDescription == \"Failure\") {\n // something went wrong, pass by default?\n def.resolve(false);\n } // if\n else {\n\n // LOGIC:\n // ---------------------------------------------------------------------------------------------------------------------\n // If there are no address responses:\n // - ask to verify their address is correct or change the address\n\n // If there is one address response:\n // - update the address with the response address\n // - pass\n\n // If there is more than one address response:\n // - ask to choose from one of the response addresses, verify their address is correct, or change the address\n // ---------------------------------------------------------------------------------------------------------------------\n\n var bypassResultsModal = (typeof placeOrder !== 'undefined' && placeOrder);\n\n // there are no address response matches\n if (dataAddressKeyFormats.length == 0) {\n\n // before we show the modal for no matches, let's make sure we have all the information needed for a full address...\n if (!bypassResultsModal && $.trim(jsonData.addressline1) != \"\" && $.trim(jsonData.city) != \"\" && $.trim(jsonData.state) != \"\" && $.trim(jsonData.zipCode) != \"\") {\n // show the address results modal with the appropriate message\n BuildAddressResultsModal($parentForm.find(\".txt-address1 .textbox\").attr(\"id\"), \"none\", addressString);\n } // if\n\n // fail\n def.resolve(true);\n } //if\n\n // there is an exact match -> auto populate the other address fields\n else if (dataAddressKeyFormats.length == 1) {\n\n // Address: 255 Hupi Rd Monterey, Ma 01245\n // UPS Returns: 1-99 Hupi Rd Monterey, Ma 01245\n // Issue: Since there was only 1 match, we were assuming it was an exact match and auto updating the street address incorrectly.\n // Solution: Check to make sure the address returned by UPS api does not start with \"1-\" for street number ranges. If it does, move forward\n // with the user submitted address and do not overwrite automatically.\n if (dataAddressKeyFormats[0].AddressLine1.lastIndexOf(\"1-\", 0) !== 0) {\n $parentForm.find(\".txt-address1 .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].AddressLine1)).trigger(\"change\");\n }\n // make sure UPS was actually returning address2 value before setting...\n if (dataAddressKeyFormats[0].AddressLine2 != \"\") {\n $parentForm.find(\".txt-address2 .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].AddressLine2)).trigger(\"change\");\n } // if\n $parentForm.find(\".txt-city .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].PoliticalDivision2)).trigger(\"change\");\n $parentForm.find(\".dd-states .dropdown\").focus().val(dataAddressKeyFormats[0].PoliticalDivision1).blur().trigger(\"update\");\n $parentForm.find(\".txt-zipcode .textbox\").val(dataAddressKeyFormats[0].PostcodePrimaryLow);\n\n $parentForm.find(\".txt-zipcode label\").addClass(\"inputted\");\n $parentForm.find(\".txt-city label\").addClass(\"inputted\");\n\n // pass\n def.resolve(false);\n\n } // if\n \n // there are multiple addresses responses\n else {\n\n var fullAddresses = [],\n tempAddresses = [],\n distinctAddress = [],\n passingAddress = false;\n\n // construct the address values and push into a temp array\n $.each(dataAddressKeyFormats, function (index, value) {\n fullAddresses.push(CapitalizeFirstLetter(dataAddressKeyFormats[index].AddressLine1) + \", \" + CapitalizeFirstLetter(dataAddressKeyFormats[index].PoliticalDivision2) + \" \" + dataAddressKeyFormats[index].PoliticalDivision1 + \" \" + CapitalizeFirstLetter(dataAddressKeyFormats[index].PostcodePrimaryLow));\n }); // each\n\n // make sure we have unique addresses, because there could be street number/apt number groups\n $.each(fullAddresses, function (i, el) {\n if ($.inArray(el, tempAddresses) === -1) {\n tempAddresses.push(el);\n dataAddressKeyFormats[i].fullAddress = fullAddresses[i];\n distinctAddress.push(dataAddressKeyFormats[i]);\n } // if\n }); // each\n\n // show the address results modal with the appropriate message, as long as this is not a validation from an placed order\n if (!bypassResultsModal) {\n BuildAddressResultsModal($parentForm.find(\".txt-address1 .textbox\").attr(\"id\"), \"multiple\", addressString, distinctAddress);\n } // if\n\n // fail\n def.resolve(true);\n } // else\n\n\n\n } // else\n } // if\n },\n fail: function (data) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n // pass the validation since there was an error getting the JSON\n def.resolve(false);\n } // $.ajax() Fail.error(function () {\n }); // ajax\n\n } // if\n else {\n // no address validation for non-US countries...\n def.resolve(false);\n } // else\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: Address2 field\n // === REQUIRMENTS: valid apartment / suite/ building #\n // === Data-Validation(s): \"opt-address2\"\n // === https://developerkitcommunity.ups.com/index.php/Address_Validation_Street_Level_XML_Developers_Guide_-_July_9,_2011\n // =======================================================\n\n case \"opt-address2\":\n\n // only perform address line 2 validation if this is in the US\n if ( !IsNonUSCountry($input) && $(\"#bypassed-\" + $input.attr(\"id\")).size() == 0) {\n // grab the parts of the address\n var inAddress1 = $.trim($parentForm.find(\".txt-address1 .textbox\").val()),\n inAddress2 = $.trim($parentForm.find(\".txt-address2 .textbox\").val()),\n inCity = $.trim($parentForm.find(\".txt-city .textbox\").val()),\n useStateDD = $parentForm.find(\".dd-states\").css(\"display\") != \"none\",\n inState = useStateDD ? $parentForm.find(\".dd-states .dropdown\").val() : $.trim($parentForm.find(\".txt-state .textbox\").val()),\n inZip = $.trim($parentForm.find(\".txt-zipcode .textbox\").val());\n\n // make sure we have a complete address so we can validate the address2 line\n if (inAddress1 != \"\" && inCity != \"\" && inState != \"\" && inZip != \"\") {\n\n var addressXML = \"<address><addressline1>\" + inAddress1 + \"</addressline1><addressline2>\" + inAddress2 + \"</addressline2><city>\" + inCity + \"</city><state>\" + inState + \"</state><zip>\" + inZip + \"</zip></address>\",\n $loadingImg = $input.parent().find(\".input-loading\"),\n isMissingApartment = false;\n\n ShowLoadingImage($mask, $input, $loadingImg);\n\n // call the satori web service\n $.ajax({\n type: \"POST\",\n url: \"/AVLUtilities/AddressVerification.aspx\",\n contentType: \"text/xml\",\n dataType: \"text\",\n data: addressXML,\n success: function (msg) {\n $loadingImg.fadeOut(100, function () {\n // parse the ml response\n var xmlDoc = $.parseXML(msg),\n $xml = $(xmlDoc),\n missingApt = $xml.find(\"ismissingaptnumber\");\n // assign the return value for the missing apartment number\n if (missingApt != null && missingApt != \"\") {\n // determine if the address is missing an apartment number\n isMissingApartment = missingApt.text().toLowerCase() === \"true\";\n // if the missing apratment is true, flag so we let this go next time around\n if (isMissingApartment) { address2Flagged = true; }\n // send back the value\n def.resolve(isMissingApartment);\n } // if\n else {\n def.resolve(false);\n } // else\n }); // fadeOut\n },\n error: function (msg) {\n $loadingImg.hide();\n def.resolve(false);\n }\n });\n } // if\n else {\n // not enough addres information to test the address2 data\n def.resolve(false);\n } // else\n } // if\n else {\n def.resolve(false);\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: Zipcode field\n // === REQUIRMENTS: not null, correct zipcode format, valid in US verified by UPS API\n // === Data-Validation(s): \"req-zipcode\"\n // === https://developerkitcommunity.ups.com/index.php/Address_Validation_XML_Developers_Guide_-_July_08,_2013\n // =======================================================\n\n case \"req-zipcode\":\n\n // if the zip code is empty, fail\n if (!IsNotEmpty(value) || (/[\\/\\\\\\\"?&.*:<>|@#%,]/g).test(value)) {\n def.resolve(true)\n } // if\n\n else {\n\n // get the values for the current zip code and country code\n var countryCode = $parentForm.find(\".dd-country .dropdown\").val();\n\n // make sure we have a valid country code and valid ZIP code before checking for city/state population\n if (countryCode == \"US\") {\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // display the loading images for the city/state inputs \n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").show();\n } // if\n\n // build the json request\n var jsonData = { testing: false, country: $parentForm.find(\".dd-country .dropdown\").val(), zipCode: value };\n\n // debug console output\n if (showJSONAddressData) { console.log(jsonData); }\n\n // send the json request to the handler\n $.ajax({\n url: '/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationCityStateZIP.ashx',\n type: 'POST',\n data: JSON.stringify(jsonData),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (data) {\n\n // the json in values produced json out values\n if (data != undefined && data.Response != undefined) {\n\n // assign the two main objects: response details and address result(s)\n var dataResponse = data.Response,\n dataAVResults = data.AddressValidationResults;\n\n // debug console output\n if (showJSONAddressData) { console.log(dataResponse); } // if\n\n // a response has been returned, but check to see if it is an error response \n if (dataResponse.ResponseStatusDescription == \"Failure\") {\n\n // hide any failed validation display for the city / state since there is a failure\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n } // if\n\n // we know these error codes result from an invalid zip code\n if (dataResponse.ErrorCode == \"101112\" || dataResponse.ErrorCode == \"20008\") {\n // UPS telling us that this postal code is invalid\n def.resolve(true);\n } // if\n // all other error codes cannot be determined for pass/fail, so pass by default\n else {\n def.resolve(false);\n }\n } // if\n else {\n\n // debug console output\n if (showJSONAddressData) {\n $.each(dataAVResults, function (index, value) {\n console.log(dataAVResults[index]);\n }); // each\n } // if\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the state laoder\n $parentForm.find(\".txt-state .input-loading, .dd-states .input-loading\").fadeOut(100);\n\n // hide the loading images for the city/state\n $parentForm.find(\".txt-city .input-loading\").fadeOut(100, function () {\n\n if (dataAVResults.length > 0) {\n // we will assume that the first result will have the more likely state option (cannot do anything else since this is already a drop down)\n var upsState = dataAVResults[0].StateProvinceCode;\n\n // hide any failed validation display for the state\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n // make sure there is a city response\n if (dataAVResults[0].City != \"\") {\n // assign the city to the textbox value since there is only one result\n if (dataAVResults.length == 1) {\n $parentForm.find(\".txt-city .textbox\").val(CapitalizeFirstLetter(dataAVResults[0].City));\n // hide any failed validation display for the city\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n } // if\n // assign the cityresults to the textbox autocomplete plugin since there is more than one result\n else {\n\n var cities = new Array(),\n cityAlreadyPresent = false;\n\n // pull out the city values and push into a temp array\n $.each(dataAVResults, function (index, value) {\n cities[index] = CapitalizeFirstLetter(dataAVResults[index].City);\n // if the the city currently set as the city value is in the array, do not clear the value\n if (dataAVResults[index].City.toLowerCase() == $.trim($parentForm.find(\".txt-city .textbox\").val()).toLowerCase()) {\n cityAlreadyPresent = true;\n } // if\n }); // each\n\n // clear the current city value, if exists, since it is not in the returned city array\n if (!cityAlreadyPresent) {\n $parentForm.find(\".txt-city .textbox\").val(\"\");\n // reset the label\n $parentForm.find(\".txt-city\").find(\"label\").removeClass(\"inputted\");\n } // if\n\n $parentForm.find(\".txt-city .textbox\").autocomplete({\n position: { my: \"left top\", at: \"left bottom-1\", of: $parentForm.find(\".txt-city\") },\n delay: 0,\n source: cities,\n minLength: 0,\n select: function (event, ui) {\n var $this = $parentForm.find(\".txt-city .textbox\");\n // set the sibling label as inputted\n $this.parent().find(\"label\").addClass(\"inputted\");\n // hide any failed validation display for the city\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n }, // onSelect\n close: function (event, ui) {\n // trigger the local storage save...\n $parentForm.find(\".txt-city .textbox\").trigger(\"change\");\n }\n })\n .on(\"focus\", function () {\n if ($(this).hasClass(\"ui-autocomplete-input\")) {\n $(this).autocomplete(\"search\", \"\");\n } // if\n });\n\n\n } // else\n } // if\n\n // assign the state\n // make sure there is a state textbox and it is currently displayed\n if ($parentForm.find(\".txt-state\").size() > 0 && $parentForm.find(\".txt-state\").css(\"display\") != \"none\") {\n // for the state's textbox\n $parentForm.find(\".txt-state .textbox\").val(upsState);\n // remove the warning note if it exists\n DisplayValidationResult($parentForm.find(\".txt-state\"), $parentForm.find(\".txt-state .textbox\"), false, isFormSubmit)\n } // if\n else {\n // for the state's drop down...\n // update the custom dropdown control\n $parentForm.find(\".dd-states select\").val(upsState).trigger(\"update\");\n // remove the warning note if it exists\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n } // else\n\n // update the label states for the address fieldset\n InitFormLabels($(\"#address-container\"));\n\n // return with passed validation\n def.resolve(false);\n } // if\n else {\n def.resolve(true);\n }\n }); // fadeOut\n } // if\n\n // form submission validation with passed validation\n else {\n def.resolve(false);\n } // else\n\n } // else\n } // if\n\n // no data was returned so we cannot validate at this time, so pass validation :(\n else {\n\n // debug console output\n if (showJSONAddressData) { console.log(data); } // if\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n } // if\n\n def.resolve(false);\n\n } // else\n },\n fail: function (data) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n // pass the validation since there was an error getting the JSON\n def.resolve(false);\n } // $.ajax() Fail.error(function () {\n }); // ajax\n\n } // if\n else {\n // Not a US or PR zip code address, check for general validatin\n def.resolve(false);\n } // else\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: CVV field\n // === REQUIRMENTS: not null, positive integer number, either 3 or 4 digits\n // === Data-Validation(s): \"req-cvv\"\n // =======================================================\n\n case \"req-cvv\":\n\n def.resolve(!IsNotEmpty(value) || !IsNumber(value) || value.length < 3 || value.length > 4);\n break;\n\n // =======================================================\n // === VAL TYPE: Credit Card field\n // === REQUIRMENTS: not null, LUHN test (http://en.wikipedia.org/wiki/Luhn)\n // === Data-Validation(s): \"req-creditcard\"\n // =======================================================\n\n case \"req-creditcard\":\n\n def.resolve(!IsLuhnPass(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"req-email\"\n // =======================================================\n\n case \"req-email\":\n\n def.resolve(!IsEmailAddress(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Email field\n // === REQUIRMENTS: correct email format\n // === Data-Validation(s): \"optional-email\"\n // =======================================================\n\n case \"opt-email\":\n\n def.resolve(!IsEmailAddress(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Multi Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"req-multi-email\"\n // =======================================================\n\n case \"req-multi-email\":\n\n var isFail = false,\n emailList = value.split(','),\n n;\n\n for (n in emailList) {\n var validEmail = IsEmailAddress(emailList[n]);\n if (!validEmail || !IsNotEmpty(validEmail)) {\n isFail = true\n } // if\n break;\n } // for\n\n def.resolve(isFail);\n\n break;\n\n // =======================================================\n // === VAL TYPE: Optional multi CC Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"opt-multi-email\"\n // =======================================================\n\n case \"opt-multi-email\":\n\n var isFail = false,\n emailList = value.split(','),\n n;\n\n if (IsNotEmpty(emailList)) {\n for (n in emailList) {\n var validEmail = IsEmailAddress(emailList[n]);\n if (!validEmail) {\n isFail = true\n } // if\n break;\n } // for\n } // if\n\n def.resolve(isFail);\n\n break;\n\n // =======================================================\n // === VAL TYPE: Email field for new account\n // === REQUIRMENTS: not null, correct email format, doesn't exist\n // === Data-Validation(s): \"req-email\"\n // === Assistance: modal content, email verification page\n // =======================================================\n\n case \"req-email-newaccount\":\n\n isFail = (!IsEmailAddress(value) || !IsNotEmpty(value));\n $mask.removeAttr('data-warning-override');\n if (IsEmailAddress(value) && IsNotEmpty(value)) {\n\n var $loadingImg = $input.parent().find(\".input-loading\");\n\n ShowLoadingImage($mask, $input, $loadingImg);\n\n // verify the email is valid\n $.get(\"/MyAccount/VerifyEmailAddress.aspx?email=\" + value, function (data) {\n\n $loadingImg.fadeOut(100, function () {\n // the email address is currently registered...\n if (data == \"true\") {\n $mask.attr('data-warning-override', 'This email is already registered. Please enter another email.');\n def.resolve(true);\n // only do if this is instant validation\n if (!isFormSubmit) {\n // assign the email address value to the modal window\n $(\"#email-value\").text(value);\n // trigger the modal window with the conflict message and options\n $.openModal({\n target: '#email-registered',\n showCloseButton: false,\n width: '500px'\n });\n }\n } else if (data === \"guest\") {\n $('.check-guest input').attr('checked', true);\n def.resolve(false);\n } else {\n def.resolve(false);\n }\n }); // fadeOut\n\n }); // get\n } // if\n else {\n\n def.resolve(true);\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: SSN field\n // === REQUIRMENTS: correct ssn format\n // === Data-Validation(s): \"req-ssn\"\n // =======================================================\n\n case \"req-ssn\":\n\n def.resolve(!IsSSN(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: URL field\n // === REQUIRMENTS: not null, correct url format\n // === Data-Validation(s): \"req-url\"\n // =======================================================\n\n case \"req-url\":\n\n def.resolve(!IsURL(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Date field\n // === REQUIRMENTS: not null, correct date format\n // === Data-Validation(s): \"req-date\"\n // =======================================================\n\n case \"req-date\":\n\n def.resolve(!IsDate(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Date field\n // === REQUIRMENTS: not null, correct date format\n // === Data-Validation(s): \"req-date-mm-dd-yy\"\n // =======================================================\n\n case \"req-date-mm-dd-yy\":\n\n def.resolve(!IsDateMMDDYY(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Credit Card Exp Date field\n // === REQUIRMENTS: date later than today\n // === Data-Validation(s): \"req-expyear, req-expmonth\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n \tcase \"req-expmonth\":\n \t\tvar $expYear = $parentForm.find(\"select[data-validation=req-expyear]\"),\n \t\thasMonth = IsNotEmpty(value);\n \t\tif (hasMonth && IsNotEmpty($expYear.val())) {\n \t\t\tValidateInput($expYear);\n \t\t}\n \t\tdef.resolve(!hasMonth);\n \t\tbreak;\n\n case \"req-expyear\":\n\n var now = new Date(),\n nowMonth = now.getMonth() + 1,\n nowYear = now.getFullYear(),\n expMonthString = $($parentForm.find(\"select[data-validation=req-expmonth]\")[0]).val() || '12',\n expMonth = 0,\n expYear = parseInt(value) || 0;\n\n expMonth = (expMonthString[0] == \"0\") ? parseInt(expMonthString[1]) : parseInt(expMonthString);\n\n def.resolve((expYear < nowYear) || (expYear == nowYear && expMonth < nowMonth));\n break;\n\n // =======================================================\n // === VAL TYPE: Date Drop Down Comparison\n // === REQUIRMENTS: greater than date > less than date\n // === Data-Validation(s): \"req-dateddl-gt\", \"req-dateddl-lt\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n case \"req-dateddl-gt\":\n\n var gtDate = new Date(),\n gtDateparts = value.split('/'),\n ltDate = new Date(),\n ltDateparts = $parentForm.find(\"select[data-validation=req-dateddl-lt]\").val().split('/');\n\n gtDate.setDate(parseInt(gtDateparts[0]));\n gtDate.setMonth((parseInt(gtDateparts[1]) - 1));\n gtDate.setYear(parseInt(gtDateparts[2]));\n\n ltDate.setDate(parseInt(ltDateparts[0]));\n ltDate.setMonth((parseInt(ltDateparts[1]) - 1));\n ltDate.setYear(parseInt(ltDateparts[2]));\n\n def.resolve(gtDate.getTime() < ltDate.getTime());\n break;\n\n // =======================================================\n // === VAL TYPE: Email and Confirmation field\n // === REQUIRMENTS: not null, correct email format, matches\n // === Data-Validation(s): \"req-email1\",\"req-email2\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n \tcase \"req-email1\":\n \tcase \"req-email\":\n\n def.resolve(!IsEmailAddress(value) || !IsNotEmpty(value));\n break;\n\n case \"req-email2\":\n\n var email1Val = $parentForm.find(\"input[data-validation=req-email1]\").val();\n\n if (!IsEmailAddress(value) || !IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n else if (value != email1Val) {\n $mask.attr(\"title\", \"The email address and confirmation don't match.\");\n def.resolve(true);\n } // else if\n else {\n def.resolve(false);\n } // else\n break;\n\n\n // =======================================================\n // === VAL TYPE: Password and Confirmation field\n // === REQUIRMENTS: not null, at least 6 characters, matches\n // === Data-Validation(s): \"req-password1\",\"req-password2\"\n // =======================================================\n\n case \"req-password\":\n case \"req-password1\":\n\n if (value.length == 0) { $mask.attr(\"title\", \"Please enter a password.\"); }\n else if (value.length < 6) { $mask.attr(\"title\", \"Your password must be at least 6 characters.\"); }\n else if (value.length > 20) { $mask.attr(\"title\", \"Your password must be 20 characters or less.\"); }\n\n def.resolve(!IsNotEmpty(value) || value.length < 6 || value.length > 20);\n break;\n\n case \"req-password2\":\n\n var password1Val = $parentForm.find(\"input[data-validation=req-password1]\").val();\n\n if (!IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n else if (value != password1Val) {\n $mask.attr(\"title\", \"The password and confirmation don't match.\");\n def.resolve(true);\n } // else if\n else if (value.length < 6) {\n $mask.attr(\"title\", \"Your confirming password must be at least 6 characters.\");\n def.resolve(true);\n } // else if\n else if (value.length > 20) {\n $mask.attr(\"title\", \"Your confirming password must be 20 characters or less.\");\n def.resolve(true);\n } // else if\n else {\n def.resolve(false);\n } // else\n break;\n\n \t// =======================================================\n \t// === VAL TYPE: volumename and trackname field\n \t// === REQUIRMENTS: not null, no special characters\n \t// === Data-Validation(s): \"req-volumename\",\"req-trackname\"\n \t// =======================================================\n\n \tcase \"req-volumename\":\n case \"req-trackname\":\n case \"req-urlpage\":\n var illegalChars = validationType == \"req-volumename\" ? /[\\[\\]\\/\\\\\\\"~'&^$!}{\\;()?.*+=:<>|@#%,]/g : /[\\/\\\\\\\"?.*:<>|@#%]/g;\n \t value = $input.val().replace(/[^\\x00-\\x7F]/g, \"\"); //remove non ascii characters\n \t value = value.replace(illegalChars, \"\"); // remove illegal ascii characters\n \t\t$input.val(value);\n \t\t$input.closest('fieldset').sisyphus().saveAllData();\n \t\tif (isFormSubmit) {\n \t\t\tdef.resolve(!IsNotEmpty(value.trim()));\n \t\t}\n \t\telse{\n \t\t\tdef.resolve(false);\n \t\t}\n \t\tbreak;\n\n \t\t// =======================================================\n \t\t// === VAL TYPE: ISRC field\n \t\t// === REQUIRMENTS: not null, matches ISRC regExp\n \t\t// === Data-Validation(s): \"req-isrc\"\n \t\t// =======================================================\n case \"opt-isrc\":\n if (!IsNotEmpty(value)) {\n def.resolve(false);\n break;\n }\n \tcase \"req-isrc\":\n \t\tdef.resolve( !IsNotEmpty(value) || !/^[a-zA-Z]{2}(-?)[0-9a-zA-Z]{3}(-?)\\d{2}(-?)\\d{5}$/.test(value));\n \t\tbreak;\n\n case \"req-search\":\n def.resolve(!IsNotEmpty(value) || value.trim().toLowerCase() == 'search');\n break;\n\n default:\n // for any data-validation values that have no validation, return with a pass value\n def.resolve(false);\n break;\n } // switch\n\n return def.promise();\n\n } // CheckInputValue", "function defaultValue(v) { }", "function customValidation(input) { \n}", "validate(_value, _utils) {\n return false;\n }", "function canBeValue() { }", "function customValidation(input){\n return input;\n \n}", "function _setValue(a, defaultValue, errorMessage) {\n var b = (typeof a !== 'undefined') ? a : defaultValue;\n\n if(defaultValue == \"no_default\" && b == defaultValue) {\n console.error(errorMessage);\n return false;\n }\n\n return b;\n}", "validator(name, value) {\n switch (name) {\n case 'name':\n return this.nameValidation(value);\n case 'keyword1':\n return this.keywordValidation(value);\n case 'keyword2':\n return this.keywordValidation(value);\n case 'keyword3':\n return this.keywordValidation(value);\n }\n }", "function vaildator(value){\n if(value!=''){\n return value;\n }\n else{\n return '(name not given)';\n }\n}", "function validator(fn)\r\n {\r\n return function()\r\n {\r\n if(($(this).attr(\"required\") == \"required\"))\r\n {\r\n if(!($(this).val())) return false;\r\n if ( this.value == $(this).attr(\"placeholder\") ) return false;\r\n }\r\n\r\n if(fn)\r\n return fn.apply(this);\r\n\r\n return true\r\n }\r\n }", "function valueExists(val, defaultValue)\r\n{\r\n\tif (val != null && val.toString().length > 0)\r\n\t\treturn val;\r\n\t\t\r\n\treturn defaultValue;\r\n}", "function validateValueWithFunc(value, parseFunc, type) {\n if (parseFunc(value))\n console.log('Invalid ' + type);\n else\n console.log('Valid ' + type);\n}", "isValid(value){\n return !isNaN(value);\n }", "validate(name, value) {\n switch (name) {\n case 'name':\n if (!isNotEmpty(value)) {\n return FORM_LOCK_NAME_MISSING\n }\n break\n case 'expirationDuration':\n if (!isPositiveInteger(value)) return FORM_EXPIRATION_DURATION_INVALID\n break\n case 'maxNumberOfKeys':\n if (value !== INFINITY && !isPositiveInteger(value)) {\n return FORM_MAX_KEYS_INVALID\n }\n break\n case 'keyPrice':\n if (!isPositiveNumber(value)) {\n return FORM_KEY_PRICE_INVALID\n }\n break\n }\n return false\n }", "validate(value) { //The validate method recieves (as its first argument) the value to be validated\n if (value < 0) {\n throw new Error('Age must be a positive number!');\n }\n }", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function validate(newValue) {\n if(newValue==\"\"){\n target.hasError(true);\n target.validationMessage(options.overrideMessage);\n return target;\n }else\n {\n var n1=parseInt(newValue,10);\n var n2=Number(newValue);\n if(isNaN(n1) ||isNaN(n2)) {\n target.hasError(true);\n target.validationMessage(\"This field is numberic\");\n return target;\n }else{\n if((n1<options.min) || (n1>options.max) ) {\n target.hasError(true);\n target.validationMessage(\"Trebuie sa fie intre \"+options.min+\" si \"+options.max);\n return target;\n\n }else{\n target.hasError(false);\n target.validationMessage(\"all is OK!\");\n return target;\n }\n }\n }\n\n }", "validate(value) {\n if(value < 0){\n throw new Error('Age must be positive')\n }\n }", "_validateInitialPropertyValues() {\n const that = this,\n value = typeof (that.value) === String ? that.value.replace(/\\s/g, '') : that.value.toString().replace(/\\s/g, '');\n\n if (that.mode === 'numeric' && that._numericProcessor.regexScientificNotation.test(value)) {\n that.value = that._numericProcessor.scientificToDecimal(value);\n delete that._valueBeforeCoercion;\n }\n\n //Validates significantDigits\n that.significantDigits = (that.significantDigits !== null) ? Math.min(Math.max(that.significantDigits, 1), 21) : null;\n\n if (that.significantDigits === null && that.precisionDigits === null) {\n that.significantDigits = 8;\n }\n else if (that.significantDigits !== null && that.precisionDigits !== null) {\n that.error(that.localize('significantPrecisionDigits', { elementType: that.nodeName.toLowerCase() }));\n }\n\n //minMax validation\n that._validateMinMax('both', true);\n\n if (that.showTooltip && that.showThumbLabel) {\n that.showTooltip = false;\n }\n }", "function date$validateValue(value) {\n if (isNaN(value)) {\n // TODO(floitsch): Use real exception object.\n throw Error(\"Invalid Date\");\n }\n return value;\n}", "function validateAndSetNumericOption(default_value, start, end, id, value){\n\n // regular expression to check if numeric\n var regex = /[^\\d|.]/gi;\n \n // if not numeric or value is out of range, warn\n if ((value.match(regex)) || (start > value) || (value > end)) {\n alert(getMessage('inputRange') + \" \" + start + '-' + end);\n }\n else {\n \n // otherwise, proceed to set property\n setChartProperty(default_value, id, value);\n }\n}", "validate(value) {\n if (value < 0) {\n throw new Error(\"age must be a positive number\");\n }\n }", "function validate (value, minLength, maxLength = 999) {\n return {\n state: state(value, minLength, maxLength),\n invalidFeedback: invalidFeedback(value, minLength, maxLength),\n validFeedback: validFeedback(value, minLength, maxLength)\n }\n}", "function default_missing_values(default_val)\n{\n\treturn default_val;\n}", "function validateValue(validationType, value) {\n\t\t\t\tif (validationType == 'alpha_numeric') {\n\t\t\t\t\t/*\n\t\t\t\t\tvar Exp = /^[0-9a-zA-Z\\s]+$/;\n\t\t\t\t\treturn value.match(Exp);\n\t\t\t\t\t*/\n\t\t\t\t\treturn value;\n\t\t\t\t} else if (validationType == 'email') {\n\t\t\t\t\tvar re = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\t\t\t\treturn re.test(value);\n\t\t\t\t} else if (validationType == 'numeric') {\n\t\t\t\t\treturn !isNaN(value)\n\t\t\t\t}\n\t\t\t}", "function validate(value){\r\n const error={\r\n\r\n };\r\n if(!value.title){\r\n error.title='Enter a UserName !';\r\n }\r\n if(!value.categories){\r\n error.categories='Enter a Category !!';\r\n }\r\n if(!value.content){\r\n error.content='Enter some content !!';\r\n }\r\n return error;\r\n}", "function validateUser({ name = \"unknown\" }) {\n return name === \"john\";\n}", "validate( _value, _utils ) {\n\t\t\treturn false;\n\t\t}", "function checkValueType(value, valueStructure) {\n\tif(valueStructure && valueStructure.hasOwnProperty('valueType')) {\n\t\tvar result = false;\n\t\tswitch(valueStructure['valueType']) {\n\t\t case valueTypes[0]: // option\n\t\t if(valueStructure.hasOwnProperty('defaultValue') && valueStructure['defaultValue'].length > 0) {\n\t\t \tif(valueStructure['defaultValue'].indexOf(value) > -1) {\n\t\t \t\tresult = true\n\t\t \t} else {\n\t\t \t\tresult = false;\n\t\t \t\twriteLog(value + ' is not existed in default value.');\n\t\t \t}\n\t\t } else {\n\t\t \tresult = false;\n\t\t \twriteLog('Default value property is not existed.');\n\t\t }\n\n\t\t return result;\n\t\t break;\n\t\t case valueTypes[1]: // number\n\t\t return !isNaN(parseFloat(value)) && isFinite(value);\n\t\t break;\n\t\t default:\n\t\t if(value) {\n\t\t \treturn true;\n\t\t } else {\n\t\t \treturn false;\n\t\t }\n\t\t}\n\t} else {\n\t\twriteLog('valueType property is not existed.');\n\t\treturn false;\n\t}\n}", "function validate(val, affectedKey, affectedKeyGeneric, def, op, skipRequiredCheck, strictRequiredCheck) {\n\n // Get the schema for this key, marking invalid if there isn't one.\n if (!def) {\n invalidKeys.push(Utility.errorObject(\"keyNotInSchema\", affectedKey, val, def, ss));\n return;\n }\n\n // Check for missing required values. The general logic is this:\n // * If the operator is $unset or $rename, it's invalid.\n // * If the value is null, it's invalid.\n // * If the value is undefined and one of the following are true, it's invalid:\n // * We're validating a key of a sub-object.\n // * We're validating a key of an object that is an array item.\n // * We're validating a document (as opposed to a modifier).\n // * We're validating a key under the $set operator in a modifier, and it's an upsert.\n if (!skipRequiredCheck && !def.optional) {\n if (val === null || val === void 0) {\n invalidKeys.push(Utility.errorObject(\"required\", affectedKey, null, def, ss));\n return;\n }\n }\n\n // Value checks are not necessary for null or undefined values\n if (Utility.isNotNullOrUndefined(val)) {\n\n // Check that value is of the correct type\n var typeError = doTypeChecks(def, val, op);\n if (typeError) {\n invalidKeys.push(Utility.errorObject(typeError, affectedKey, val, def, ss));\n return;\n }\n\n // Check value against allowedValues array\n if (def.allowedValues && !_.contains(def.allowedValues, val)) {\n invalidKeys.push(Utility.errorObject(\"notAllowed\", affectedKey, val, def, ss));\n return;\n }\n\n }\n\n // Perform custom validation\n var lastDot = affectedKey.lastIndexOf('.');\n var fieldParentName = lastDot === -1 ? '' : affectedKey.slice(0, lastDot + 1);\n var validators = def.custom ? [def.custom] : [];\n validators = validators.concat(ss._validators).concat(SimpleSchema._validators);\n _.every(validators, function(validator) {\n var errorType = validator.call(_.extend({\n key: affectedKey,\n genericKey: affectedKeyGeneric,\n definition: def,\n isSet: (val !== void 0),\n value: val,\n operator: op,\n field: function(fName) {\n mDoc = mDoc || new MongoObject(obj, ss._blackboxKeys); //create if necessary, cache for speed\n var keyInfo = mDoc.getInfoForKey(fName) || {};\n return {\n isSet: (keyInfo.value !== void 0),\n value: keyInfo.value,\n operator: keyInfo.operator\n };\n },\n siblingField: function(fName) {\n mDoc = mDoc || new MongoObject(obj, ss._blackboxKeys); //create if necessary, cache for speed\n var keyInfo = mDoc.getInfoForKey(fieldParentName + fName) || {};\n return {\n isSet: (keyInfo.value !== void 0),\n value: keyInfo.value,\n operator: keyInfo.operator\n };\n }\n }, extendedCustomContext || {}));\n if (typeof errorType === \"string\") {\n invalidKeys.push(Utility.errorObject(errorType, affectedKey, val, def, ss));\n return false;\n }\n return true;\n });\n }", "static getErrorMessage(value, validator) {\n let content = '';\n let isMultiple = Array.isArray(value);\n\n switch (validator.rule) {\n case 'alpha':\n if (validator.allowDashes && validator.allowSpaces) {\n content = 'letters, dashes and spaces';\n } else if (validator.allowSpaces) {\n content = 'letters and spaces';\n } else if (validator.allowDashes) {\n content = 'letters and dashes';\n } else {\n content = 'letters';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'alphanumeric':\n if (validator.allowDashes && validator.allowSpaces) {\n content = 'letters, numbers, dashes and spaces';\n } else if (validator.allowSpaces) {\n content = 'letters, numbers and spaces';\n } else if (validator.allowDashes) {\n content = 'letters, numbers and dashes';\n } else {\n content = 'letters and numbers';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'number':\n if (validator.allowNegative && validator.allowDecimal) {\n content = 'positive or negative decimal numbers';\n } else if (validator.allowNegative) {\n content = 'positive or negative numbers';\n } else if (validator.allowDecimal) {\n content = 'decimal numbers';\n } else {\n content = 'numbers';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'email':\n return isMultiple ?\n 'Please select only valid email address.' :\n 'Please enter a valid email address.';\n case 'max':\n return isMultiple ?\n `Please select values up to a maximum of ${validator.value}.` :\n `Please enter a value up to a maximum of ${validator.value}.`;\n case 'maxLength':\n return isMultiple ?\n `Please select up to ${validator.value} options.` :\n `Please enter up to ${validator.value} characters.`;\n case 'min':\n return isMultiple ?\n `Please select values up from a minimum of ${validator.value}.` :\n `Please enter a value up from a minimum of ${validator.value}.`;\n case 'minLength':\n return isMultiple ?\n `Please select at least ${validator.value} options.` :\n `Please enter at least ${validator.value} characters.`;\n case 'required':\n return isMultiple ?\n 'Please select at least one option.' :\n 'Please enter a value for this field.';\n case 'sameAs':\n return `Please make sure that the two values match.`;\n default:\n return 'Please enter a correct value for this field.';\n }\n }", "validate(state, setError) {\n let errmsg = null,\n minimum = state.minimum,\n maximum = state.maximum,\n start = state.start;\n\n errmsg = emptyValidator('Owner', state.seqowner);\n if (errmsg) {\n setError('seqowner', errmsg);\n return true;\n } else {\n setError('seqowner', errmsg);\n }\n\n errmsg = emptyValidator('Schema', state.schema);\n if (errmsg) {\n setError('schema', errmsg);\n return true;\n } else {\n setError('schema', errmsg);\n }\n\n if (!this.isNew(state)) {\n errmsg = emptyValidator('Current value', state.current_value);\n if (errmsg) {\n setError('current_value', errmsg);\n return true;\n } else {\n setError('current_value', errmsg);\n }\n\n errmsg = emptyValidator('Increment value', state.increment);\n if (errmsg) {\n setError('increment', errmsg);\n return true;\n } else {\n setError('increment', errmsg);\n }\n\n errmsg = emptyValidator('Minimum value', state.minimum);\n if (errmsg) {\n setError('minimum', errmsg);\n return true;\n } else {\n setError('minimum', errmsg);\n }\n\n errmsg = emptyValidator('Maximum value', state.maximum);\n if (errmsg) {\n setError('maximum', errmsg);\n return true;\n } else {\n setError('maximum', errmsg);\n }\n\n errmsg = emptyValidator('Cache value', state.cache);\n if (errmsg) {\n setError('cache', errmsg);\n return true;\n } else {\n setError('cache', errmsg);\n }\n }\n\n let min_lt = gettext('Minimum value must be less than maximum value.'),\n start_lt = gettext('Start value cannot be less than minimum value.'),\n start_gt = gettext('Start value cannot be greater than maximum value.');\n\n if (isEmptyString(minimum) || isEmptyString(maximum))\n return null;\n\n if ((minimum == 0 && maximum == 0) ||\n (parseInt(minimum, 10) >= parseInt(maximum, 10))) {\n setError('minimum', min_lt);\n return true;\n } else {\n setError('minimum', null);\n }\n\n if (start && minimum && parseInt(start) < parseInt(minimum)) {\n setError('start', start_lt);\n return true;\n } else {\n setError('start', null);\n }\n\n if (start && maximum && parseInt(start) > parseInt(maximum)) {\n setError('start', start_gt);\n return true;\n } else {\n setError('start', null);\n }\n return null;\n }", "_checkValue(value) {\n if (!_.isFunction(value)) {\n throw new Error('functionsDict._checkValue: must provide only Function as values.');\n }\n }", "checkValidation(value, type) {\n switch (type) {\n case \"firstName\":\n return value.length > 0;\n case \"lastName\":\n return value.length > 0;\n case \"email\":\n return validateEmail(value);\n case \"password\":\n return validatePassword(value);\n case \"confirmPassword\":\n return value === this.state.password.value;\n case \"username\":\n return value.length > 6 && this.checkUsername(value);\n default:\n return false;\n }\n }", "acceptValue(value) {\n let accept = !isNaN(value);\n\n if (accept && !(this.okMin(value) && this.okMax(value))) {\n accept = false;\n const current = this.input.value; // current is a string, so compare to int or string... hence == here not ===\n // noinspection EqualityComparisonWithCoercionJS\n\n if (current != value) {\n // The new value is out of range, but we accept it if the current value\n // is also problematic. Consider the case where the input is empty and the\n // minimum value is 100. The user must first type \"1\" and we must accept it\n // if they are to get the opportunity to type the \"0\"s.\n accept = !this.acceptValue(current); // Also, if we are checking the current value, be sure not to infinitely\n // recurse here.\n }\n }\n\n return accept;\n }", "function floatFn(rule, value, callback, source, options) {\n\t\t var errors = [];\n\t\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\t if (validate) {\n\t\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t\t return callback();\n\t\t }\n\t\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t\t if (value !== undefined) {\n\t\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t\t _rule2[\"default\"].range(rule, value, source, errors, options);\n\t\t }\n\t\t }\n\t\t callback(errors);\n\t\t}", "function validateValue(value) {\n // check that value is a a valid Number -> no negative numbers or NaN allowed\n if (typeof value === 'number' && value >= 0 && value === value) return value;\n\n // check that value is a string and can be turned into a valid positive Number\n if (typeof value === 'string') return validateValue(parseInt(value, 10));\n return null;\n}", "validate(value) {\n if (value < 0) {\n throw new Error('Age must be a positive number');\n }\n }", "function calculateValue(testValue, defaultValue) {\n if (testValue) {\n return testValue;\n }\n else {\n return defaultValue;\n }\n }", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n }", "function checkValidInput(value) {\n if (!value || value === \"\") {\n return false;\n } else {\n return true;\n }\n}", "function myValidation(value) {\n //console.log ('value = ', value);\n scope.signupCtrl.validateMenuItem(value)\n .then(function() {\n if (!scope.signupCtrl.error) {\n mCtrl.$setValidity('menuItem', true);\n } else {\n mCtrl.$setValidity('menuItem', false);\n }\n });\n return value;\n }", "function noempty(input_value, default_value)\n{\n if (!input_value)\n {\n return default_value;\n }\n if (input_value.length==0)\n {\n return default_value;\n }\n return input_value;\n}", "function lnameVal() {\n var elm = document.getElementById(\"lname\");\n\n if (elm.validity.valueMissing) {\n elm.setCustomValidity(\"Please enter in your last name!\");\n } else {\n elm.setCustomValidity(\"\");\n }\n}", "validate(value){\n if(value < 0) throw new Error('The age must be a positive number')\n }", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n}", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n}", "function validate(input, val) {\n\t\n\tswitch(input) {\n\t\tcase 'home':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'mobile':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'work':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'country':\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn validateLength(val);\n\t\t\tbreak;\n\t}\n}", "FieldValidation(key, value) {\n switch(key) {\n case 'firstName':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'lastName':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'email':\n if(value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)){\n return 'error';\n }\n break;\n case 'pec':\n if(value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)){\n return 'error';\n }\n break;\n case 'role':\n if(value.length > 15){\n return 'error';\n }\n case 'password':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'password2':\n if(!value.match('passowrd')){\n return 'error';\n }\n break;\n case 'phoneNumber':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'telAz':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'nomeAzienda':\n if(value.length > 50){\n return 'error';\n }\n break;\n case 'subCategoria':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'piva':\n if(value.length > 11){\n return 'error';\n }\n break;\n case 'ateco':\n if(value.length > 8){\n return 'error';\n }\n break;\n case 'provCCIAA':\n if(value.length > 2){\n return 'error';\n }\n break;\n case 'numREA':\n if(value.length > 6){\n return 'error';\n }\n break;\n case 'sedeLegInd':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'sedeLegNum':\n if(value.length > 3){\n return 'error';\n }\n break;\n case 'capLeg':\n if(value.length > 5){\n return 'error';\n }\n break;\n case 'sedeLegFax':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'sedeAmmInd':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'sedeAmmNum':\n if(value.length > 3){\n return 'error';\n }\n break;\n case 'capAmm':\n if(value.length > 5){\n return 'error';\n }\n break;\n case 'sedeAmmFax':\n if(value.length > 10){\n return 'error';\n }\n break;\n }\n }", "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "function regexp(rule, value, callback, source, options) {\n\t\t var errors = [];\n\t\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\t if (validate) {\n\t\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t\t return callback();\n\t\t }\n\t\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t\t if (!(0, _util.isEmptyValue)(value)) {\n\t\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t\t }\n\t\t }\n\t\t callback(errors);\n\t\t}", "preValidate(key, value, errors, values) {}", "function defaultValue(test,defaultValue) {\r\n\treturn (typeof test !== 'undefined' ? test : defaultValue);\r\n}", "function validateUserInput(userValue, minValue, maxValue) {\n if (isNumber(userValue)) {\n if (userValue > maxValue || userValue < minValue) {\n return false;\n }\n\n else {\n return true;\n }\n }\n\n else {\n return false;\n }\n}", "_validateMaskValue() {\n const that = this;\n\n if (that.readonly || that.disabled || !that.validation || typeof that.validation !== 'function') {\n return;\n }\n\n const value = that.value;\n\n const success = that.validation(value);\n\n if (!success) {\n that.setAttribute('error', '');\n }\n else {\n that.removeAttribute('error');\n }\n\n that.$.fireEvent('validation', {\n 'success': success\n });\n }", "function floatFn(rule, value, callback, source, options) {\n\t var errors = [];\n\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t if (validate) {\n\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t return callback();\n\t }\n\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t if (value !== undefined) {\n\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t _rule2[\"default\"].range(rule, value, source, errors, options);\n\t }\n\t }\n\t callback(errors);\n\t}", "function validateUser({ name = \"unknown\" } = {}) {\n return name === \"john\";\n}", "validate(value){\n if (!validator.isEmail(value)){\n throw new Error('Email invalid')\n }\n }", "function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}", "function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}", "function CfnTaskTemplate_DefaultFieldValuePropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('defaultValue', cdk.requiredValidator)(properties.defaultValue));\n errors.collect(cdk.propertyValidator('defaultValue', cdk.validateString)(properties.defaultValue));\n errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));\n errors.collect(cdk.propertyValidator('id', CfnTaskTemplate_FieldIdentifierPropertyValidator)(properties.id));\n return errors.wrap('supplied properties not correct for \"DefaultFieldValueProperty\"');\n}", "function value(val) { return control_1.default(val); }", "validationHandler(rules, value) {\n let isValid = true;\n\n if (!rules) {\n return true;\n }\n\n if (rules.required) {\n isValid = value.trim() !== \"\" && isValid;\n }\n\n if (rules.minLength) {\n isValid = value.length >= rules.minLength && isValid;\n }\n\n if (rules.maxLength) {\n isValid = value.length <= rules.maxLength && isValid;\n }\n\n if (rules.isEmail) {\n const pattern = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n isValid = pattern.test(value) && isValid;\n }\n\n return isValid;\n }", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function validateMinMaxValue(val)\n{\n var dt = P2.getFieldValue(TYPE_NAME);\n if (dt == INT_TYPE || dt == DEC_TYPE)\n {\n if(!val || val.length == 0)\n return \"Min/Max values are required\"\n }\n return null;\n}", "function valueOrDefault(value, defaultValue) {\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\n\t}", "function validateNamedOptionalPropertyEquals(functionName,inputName,optionName,input,expected){if(input!==undefined){validateNamedPropertyEquals(functionName,inputName,optionName,input,expected);}}", "function regexp(rule, value, callback, source, options) {\n\t var errors = [];\n\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t if (validate) {\n\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t return callback();\n\t }\n\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t if (!(0, _util.isEmptyValue)(value)) {\n\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t }\n\t }\n\t callback(errors);\n\t}", "function defaulted(value, defaultValue) {\n return value !== undefined ? value : defaultValue;\n }", "function undefinedDefault(value, defaultValue) {\n return (value !== undefined) ? value : defaultValue;\n}", "function _validateIsNotBlank(def){\n return !isEmpty(def.attrValue);\n}" ]
[ "0.7436162", "0.6856192", "0.65868", "0.6431272", "0.64279246", "0.64279246", "0.6416799", "0.6416799", "0.6416799", "0.6316331", "0.6230596", "0.6195563", "0.616348", "0.61238676", "0.6050824", "0.6044303", "0.6036909", "0.59743184", "0.59359854", "0.58691984", "0.58653325", "0.5850534", "0.58382624", "0.5832495", "0.5827688", "0.581331", "0.58104706", "0.57828456", "0.57550627", "0.57483244", "0.5705512", "0.56952184", "0.5676993", "0.5666483", "0.5665817", "0.5665817", "0.5665817", "0.56593883", "0.56593883", "0.56593883", "0.56593883", "0.565329", "0.5645423", "0.56385815", "0.5634249", "0.5631972", "0.561746", "0.55995023", "0.5598736", "0.5596319", "0.55823517", "0.5581123", "0.5576831", "0.55748844", "0.5567295", "0.555334", "0.55509", "0.5537622", "0.5533782", "0.55309516", "0.55252206", "0.5524409", "0.5519985", "0.55082774", "0.54966646", "0.54965717", "0.54833883", "0.5482924", "0.5481612", "0.54746187", "0.5464223", "0.5464223", "0.5461036", "0.5458784", "0.5458329", "0.5455748", "0.5455748", "0.5455748", "0.54516596", "0.54510033", "0.54487586", "0.5434088", "0.54293984", "0.54275113", "0.54243594", "0.5423496", "0.5421067", "0.5421067", "0.54184175", "0.54169947", "0.54120696", "0.54086924", "0.54086924", "0.54086924", "0.5408298", "0.54062825", "0.53942436", "0.53923774", "0.53907543", "0.5384356", "0.5383341" ]
0.0
-1
Implements a host component that allows optionally setting the props `value` and `defaultValue`. If `multiple` is false, the prop must be a stringable. If `multiple` is true, the prop must be an array of stringables. If `value` is not supplied (or null/undefined), user actions that change the selected option will trigger updates to the rendered options. If it is supplied (and not null/undefined), the rendered options will not update in response to user actions. Instead, the `value` prop must change in order for the rendered options to update. If `defaultValue` is provided, any options with the supplied values will be selected.
function getHostProps$2(element,props){return _assign({},props,{value:undefined});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectValueType(props,propName,componentName){if(props[propName]==null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be an array if \"+\"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be a scalar \"+\"value if `multiple` is false.\");}}}", "function selectValueType(props,propName,componentName){if(props[propName] == null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\" + propName + \"` prop supplied to <select> must be an array if \" + \"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return new Error(\"The `\" + propName + \"` prop supplied to <select> must be a scalar \" + \"value if `multiple` is false.\");}}}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function updateOptions() {\n /*jshint validthis:true */\n if (this.props.value == null) {\n return;\n }\n var options = this.getDOMNode().options;\n var selectedValue = '' + this.props.value;\n\n for (var i = 0, l = options.length; i < l; i++) {\n var selected = this.props.multiple ?\n selectedValue.indexOf(options[i].value) >= 0 :\n selected = options[i].value === selectedValue;\n\n if (selected !== options[i].selected) {\n options[i].selected = selected;\n }\n }\n}", "function useSelect(props) {\n const {\n buttonRef: buttonRefProp,\n defaultValue: defaultValueProp,\n disabled = false,\n listboxId: listboxIdProp,\n listboxRef: listboxRefProp,\n multiple = false,\n onChange,\n onHighlightChange,\n onOpenChange,\n open = false,\n options,\n optionStringifier = _defaultOptionStringifier.default,\n value: valueProp\n } = props;\n const buttonRef = React.useRef(null);\n const handleButtonRef = (0, _utils.unstable_useForkRef)(buttonRefProp, buttonRef);\n const listboxRef = React.useRef(null);\n const listboxId = (0, _utils.unstable_useId)(listboxIdProp);\n let defaultValue;\n if (valueProp === undefined && defaultValueProp === undefined) {\n defaultValue = [];\n } else if (defaultValueProp !== undefined) {\n defaultValue = multiple ? defaultValueProp : [defaultValueProp];\n }\n const value = React.useMemo(() => {\n if (valueProp !== undefined) {\n return multiple ? valueProp : [valueProp];\n }\n return undefined;\n }, [valueProp, multiple]);\n const optionsMap = React.useMemo(() => {\n const map = new Map();\n options.forEach(option => {\n map.set(option.value, option);\n });\n return map;\n }, [options]);\n\n // prevents closing the listbox on keyUp right after opening it\n const ignoreEnterKeyUp = React.useRef(false);\n\n // prevents reopening the listbox when button is clicked\n // (listbox closes on lost focus, then immediately reopens on click)\n const ignoreClick = React.useRef(false);\n\n // Ensure the listbox is focused after opening\n const [listboxFocusRequested, requestListboxFocus] = React.useState(false);\n const focusListboxIfRequested = React.useCallback(() => {\n if (listboxFocusRequested && listboxRef.current != null) {\n listboxRef.current.focus();\n requestListboxFocus(false);\n }\n }, [listboxFocusRequested]);\n const handleListboxRef = (0, _utils.unstable_useForkRef)(listboxRefProp, listboxRef, focusListboxIfRequested);\n const {\n notifySelectionChanged,\n notifyHighlightChanged,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler\n } = (0, _useSelectChangeNotifiers.default)();\n React.useEffect(() => {\n focusListboxIfRequested();\n }, [focusListboxIfRequested]);\n React.useEffect(() => {\n requestListboxFocus(open);\n }, [open]);\n const createHandleMouseDown = otherHandlers => event => {\n var _otherHandlers$onMous;\n otherHandlers == null ? void 0 : (_otherHandlers$onMous = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n if (!event.defaultPrevented && open) {\n ignoreClick.current = true;\n }\n };\n const createHandleButtonClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n otherHandlers == null ? void 0 : (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n if (!event.defaultPrevented && !ignoreClick.current) {\n onOpenChange == null ? void 0 : onOpenChange(!open);\n }\n ignoreClick.current = false;\n };\n const createHandleButtonKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n otherHandlers == null ? void 0 : (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n if (event.key === 'Enter') {\n ignoreEnterKeyUp.current = true;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n onOpenChange == null ? void 0 : onOpenChange(true);\n }\n };\n const createHandleListboxKeyUp = otherHandlers => event => {\n var _otherHandlers$onKeyU;\n otherHandlers == null ? void 0 : (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n const closingKeys = multiple ? ['Escape'] : ['Escape', 'Enter', ' '];\n if (open && !ignoreEnterKeyUp.current && closingKeys.includes(event.key)) {\n var _buttonRef$current;\n buttonRef == null ? void 0 : (_buttonRef$current = buttonRef.current) == null ? void 0 : _buttonRef$current.focus();\n }\n ignoreEnterKeyUp.current = false;\n };\n const createHandleListboxItemClick = React.useCallback(otherHandlers => event => {\n var _otherHandlers$onClic2;\n otherHandlers == null ? void 0 : (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n if (!multiple) {\n onOpenChange == null ? void 0 : onOpenChange(false);\n }\n }, [multiple, onOpenChange]);\n const createHandleListboxBlur = otherHandlers => event => {\n var _otherHandlers$onBlur;\n otherHandlers == null ? void 0 : (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n if (!event.defaultPrevented) {\n onOpenChange == null ? void 0 : onOpenChange(false);\n }\n };\n const listboxReducer = React.useCallback((state, action) => {\n const newState = (0, _useListbox.defaultListboxReducer)(state, action);\n switch (action.type) {\n case _useListbox.ActionTypes.keyDown:\n // change selection when listbox is closed\n if ((action.event.key === 'ArrowUp' || action.event.key === 'ArrowDown') && !open && !multiple) {\n return (0, _extends2.default)({}, newState, {\n selectedValues: newState.highlightedValue != null ? [newState.highlightedValue] : []\n });\n }\n break;\n case _useListbox.ActionTypes.blur:\n case _useListbox.ActionTypes.setValue:\n case _useListbox.ActionTypes.optionsChange:\n return (0, _extends2.default)({}, newState, {\n highlightedValue: newState.selectedValues.length > 0 ? newState.selectedValues[0] : null\n });\n default:\n return newState;\n }\n return newState;\n }, [open, multiple]);\n const {\n getRootProps: getButtonRootProps,\n active: buttonActive,\n focusVisible: buttonFocusVisible\n } = (0, _useButton.default)({\n disabled,\n ref: handleButtonRef\n });\n const optionValues = React.useMemo(() => options.map(o => o.value), [options]);\n const isOptionDisabled = React.useCallback(valueToCheck => {\n var _option$disabled;\n const option = optionsMap.get(valueToCheck);\n return (_option$disabled = option == null ? void 0 : option.disabled) != null ? _option$disabled : false;\n }, [optionsMap]);\n const stringifyOption = React.useCallback(valueToCheck => {\n const option = optionsMap.get(valueToCheck);\n if (!option) {\n return '';\n }\n return optionStringifier(option);\n }, [optionsMap, optionStringifier]);\n const useListboxParameters = {\n defaultValue,\n id: listboxId,\n isOptionDisabled,\n listboxRef: handleListboxRef,\n onChange: (e, newValues) => {\n if (multiple) {\n onChange == null ? void 0 : onChange(e, newValues);\n } else {\n var _newValues$;\n onChange == null ? void 0 : onChange(e, (_newValues$ = newValues[0]) != null ? _newValues$ : null);\n }\n },\n onHighlightChange: (e, newValue) => {\n onHighlightChange == null ? void 0 : onHighlightChange(e, newValue != null ? newValue : null);\n },\n options: optionValues,\n optionStringifier: stringifyOption,\n selectionLimit: multiple ? null : 1,\n stateReducer: listboxReducer,\n value\n };\n const {\n getRootProps: getListboxRootProps,\n getOptionProps: getListboxOptionProps,\n getOptionState,\n highlightedOption,\n selectedOption\n } = (0, _useListbox.default)(useListboxParameters);\n React.useEffect(() => {\n notifySelectionChanged(selectedOption);\n }, [selectedOption, notifySelectionChanged]);\n React.useEffect(() => {\n notifyHighlightChanged(highlightedOption);\n }, [highlightedOption, notifyHighlightChanged]);\n const getButtonProps = (otherHandlers = {}) => {\n return (0, _extends2.default)({}, getButtonRootProps((0, _extends2.default)({}, otherHandlers, {\n onClick: createHandleButtonClick(otherHandlers),\n onMouseDown: createHandleMouseDown(otherHandlers),\n onKeyDown: createHandleButtonKeyDown(otherHandlers)\n })), {\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': listboxId\n });\n };\n const getListboxProps = (otherHandlers = {}) => getListboxRootProps((0, _extends2.default)({}, otherHandlers, {\n onBlur: createHandleListboxBlur(otherHandlers),\n onKeyUp: createHandleListboxKeyUp(otherHandlers)\n }));\n const getOptionProps = React.useCallback((optionValue, otherHandlers = {}) => {\n return getListboxOptionProps(optionValue, (0, _extends2.default)({}, otherHandlers, {\n onClick: createHandleListboxItemClick(otherHandlers)\n }));\n }, [getListboxOptionProps, createHandleListboxItemClick]);\n React.useDebugValue({\n selectedOption,\n highlightedOption,\n open\n });\n const contextValue = React.useMemo(() => ({\n listboxRef,\n getOptionProps,\n getOptionState,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler\n }), [getOptionProps, getOptionState, registerHighlightChangeHandler, registerSelectionChangeHandler]);\n if (props.multiple) {\n return {\n buttonActive,\n buttonFocusVisible,\n disabled,\n getButtonProps,\n getListboxProps,\n contextValue,\n open,\n value: selectedOption,\n highlightedOption\n };\n }\n return {\n buttonActive,\n buttonFocusVisible,\n disabled,\n getButtonProps,\n getListboxProps,\n contextValue,\n open,\n value: selectedOption.length > 0 ? selectedOption[0] : null,\n highlightedOption\n };\n}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n invariant(\n Array.isArray(props[propName]),\n 'The `%s` prop supplied to <select> must be an array if `multiple` is ' +\n 'true.',\n propName\n );\n } else {\n invariant(\n !Array.isArray(props[propName]),\n 'The `%s` prop supplied to <select> must be a scalar value if ' +\n '`multiple` is false.',\n propName\n );\n }\n}", "function MultiSelect(props) {\n // props = Options, index of section, add/remove function from parent, default (preselected) values, in sync with other MultiSelect Components?\n // props = [ options:Array[obj], index:int, add:func, remove:func, defaultOptions:Array[obj], sync:bool ]\n\n const [currentlySelected, setCurrentlySelected] = useState([]);\n\n useEffect(() => {\n if (props.defaultOptions) {\n let replaceSelected = cloneDeep(props.defaultOptions);\n replaceSelected.sort(sortByLabel);\n setCurrentlySelected(replaceSelected);\n }\n }, [props.defaultOptions])\n\n const [currentlyNotSelected, setCurrentlyNotSelected] = useState([]);\n\n useEffect(() => {\n let replace = cloneDeep(props.options);\n // if props.sync, let parent component handle props.options instead\n if (props.defaultOptions && !props.sync) {\n // loop through each section to check for selected inputs\n if (props.defaultOptions.length > 0) {\n for (let i = 0; i < props.defaultOptions.length; i++) {\n const selected = props.defaultOptions[i];\n // loop through list of unselected inputs and compare\n for (let x = replace.length; x > 0; x--) {\n const input = replace.pop();\n // if not the selected input, add back to unselected\n if (input.label !== selected.label)\n replace.unshift(input);\n }\n }\n }\n }\n replace.sort(sortByLabel);\n setCurrentlyNotSelected(replace);\n }, [props.options, props.defaultOptions, props.sync])\n\n const [hasDropdown, setHasDropdown] = useState(false);\n const [searchInput, setSearchInput] = useState(\"\");\n\n const searchInputRef = useRef(null);\n\n // handleDropDown:func()\n // => check if dropdown is true\n // => true: close dropdown (display: none)\n // => false: dropdown (display: block)\n const handleDropDown = (e) => {\n if (e.key === \"Enter\" || e.key === undefined) {\n searchInputRef.current.value = \"\";\n setSearchInput(\"\");\n setHasDropdown(!hasDropdown);\n }\n };\n\n const handleSearchInput = (e) => setSearchInput(e.target.value);\n\n // handleSelectOption:func(e)\n // => add to currentlySelected\n // => call add function (prop)\n // => remove from currentlyNotSelected\n const handleSelectOption = (e) => {\n if (e.key === \"Enter\" || e.key === undefined) {\n let optionIndex = e.target.getAttribute(\"data-id\");\n\n let replaceSelected = cloneDeep(currentlySelected);\n let replaceNotSelected = cloneDeep(currentlyNotSelected);\n let transfer = replaceNotSelected.splice(optionIndex, 1);\n replaceSelected.push(...transfer);\n\n if (props.add !== undefined)\n props.add(...transfer, props.dataId);\n\n setCurrentlySelected(replaceSelected);\n setCurrentlyNotSelected(replaceNotSelected);\n }\n }\n\n // handleRemoveOption:func(e)\n // => remove from currentlySelected\n // => call remove function (prop)\n // => add to currentlyNotSelected\n const handleRemoveOption = (e) => {\n let optionIndex = e.target.getAttribute(\"data-id\");\n\n let replaceSelected = cloneDeep(currentlySelected);\n let replaceNotSelected = cloneDeep(currentlyNotSelected);\n let transfer = replaceSelected.splice(optionIndex, 1);\n replaceNotSelected.push(...transfer);\n\n if (props.rm !== undefined)\n if (props.dataId === undefined)\n console.error(\"Unable to call remove function, dataId is empty!\")\n else\n props.rm(...transfer, props.dataId);\n\n setCurrentlySelected(replaceSelected);\n setCurrentlyNotSelected(replaceNotSelected);\n }\n\n\n return (\n <div className=\"multiSelect\">\n <div className=\"multiSelectTop\" style={hasDropdown ? {} : { borderBottom: \"#e6e6e6 solid 1px\" }}>\n <div className=\"selectedBox\">\n {\n currentlySelected.map((option, index) => {\n return (\n <span key={index} className=\"selected noselect\">\n {option.label}\n <input data-id={index} onClick={handleRemoveOption} type=\"button\" value=\"&#10005;\" />\n </span>\n );\n })\n }\n </div>\n\n <div className=\"dropdownButton\" tabIndex=\"0\" onKeyPress={handleDropDown} onClick={handleDropDown}><i className=\"downArrow\"></i></div>\n </div>\n <div className=\"dropdown\" style={hasDropdown ? {} : { display: \"none\" }}>\n <input ref={searchInputRef} placeholder=\"Search\" className=\"selectSearch\" onChange={handleSearchInput} />\n <ul style={currentlyNotSelected.length === 0 ? { textAlign: \"center\", padding: \"10px\" } : {}}>\n {\n (currentlyNotSelected.length !== 0 && hasDropdown ? currentlyNotSelected.map((option, index) => {\n if (searchInput === \"\" || option.label.toUpperCase().includes(searchInput.toUpperCase())) {\n return (\n <li data-id={index}\n key={index}\n tabIndex=\"0\"\n onKeyPress={handleSelectOption}\n onClick={handleSelectOption}\n className=\"noselect\"\n >\n {option.label}\n </li>\n );\n }\n\n return null;\n }) : <span>List is empty!</span>)\n }\n </ul>\n </div>\n </div>\n );\n}", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map(v => this._getOptionId(v));\n\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n } else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function useSelect(props) {\n const {\n buttonRef: buttonRefProp,\n defaultOpen = false,\n defaultValue: defaultValueProp,\n disabled = false,\n listboxId: listboxIdProp,\n listboxRef: listboxRefProp,\n multiple = false,\n onChange,\n onHighlightChange,\n onOpenChange,\n open: openProp,\n options: optionsParam,\n optionStringifier = defaultOptionStringifier,\n value: valueProp\n } = props;\n const buttonRef = React.useRef(null);\n const handleButtonRef = useForkRef(buttonRefProp, buttonRef);\n const listboxRef = React.useRef(null);\n const listboxId = useId(listboxIdProp);\n let defaultValue;\n if (valueProp === undefined && defaultValueProp === undefined) {\n defaultValue = [];\n } else if (defaultValueProp !== undefined) {\n defaultValue = multiple ? defaultValueProp : [defaultValueProp];\n }\n const value = React.useMemo(() => {\n if (valueProp !== undefined) {\n return multiple ? valueProp : [valueProp];\n }\n return undefined;\n }, [valueProp, multiple]);\n const {\n subitems,\n contextValue: compoundComponentContextValue\n } = useCompoundParent();\n const options = React.useMemo(() => {\n if (optionsParam != null) {\n return new Map(optionsParam.map((option, index) => [option.value, {\n value: option.value,\n label: option.label,\n disabled: option.disabled,\n ref: /*#__PURE__*/React.createRef(),\n id: `${listboxId}_${index}`\n }]));\n }\n return subitems;\n }, [optionsParam, subitems, listboxId]);\n\n // prevents closing the listbox on keyUp right after opening it\n const ignoreEnterKeyUp = React.useRef(false);\n\n // prevents reopening the listbox when button is clicked\n // (listbox closes on lost focus, then immediately reopens on click)\n const ignoreClick = React.useRef(false);\n\n // Ensure the listbox is focused after opening\n const [listboxFocusRequested, requestListboxFocus] = React.useState(false);\n const focusListboxIfRequested = React.useCallback(() => {\n if (listboxFocusRequested && listboxRef.current != null) {\n listboxRef.current.focus();\n requestListboxFocus(false);\n }\n }, [listboxFocusRequested]);\n const handleListboxRef = useForkRef(listboxRefProp, listboxRef, focusListboxIfRequested);\n const {\n getRootProps: getButtonRootProps,\n active: buttonActive,\n focusVisible: buttonFocusVisible,\n rootRef: mergedButtonRef\n } = useButton({\n disabled,\n rootRef: handleButtonRef\n });\n const optionValues = React.useMemo(() => Array.from(options.keys()), [options]);\n const isItemDisabled = React.useCallback(valueToCheck => {\n const option = options.get(valueToCheck);\n return option?.disabled ?? false;\n }, [options]);\n const stringifyOption = React.useCallback(valueToCheck => {\n const option = options.get(valueToCheck);\n if (!option) {\n return '';\n }\n return optionStringifier(option);\n }, [options, optionStringifier]);\n const controlledState = React.useMemo(() => ({\n selectedValues: value,\n open: openProp\n }), [value, openProp]);\n const getItemId = React.useCallback(itemValue => options.get(itemValue)?.id, [options]);\n const handleSelectionChange = React.useCallback((event, newValues) => {\n if (multiple) {\n onChange?.(event, newValues);\n } else {\n onChange?.(event, newValues[0] ?? null);\n }\n }, [multiple, onChange]);\n const handleHighlightChange = React.useCallback((event, newValue) => {\n onHighlightChange?.(event, newValue ?? null);\n }, [onHighlightChange]);\n const handleStateChange = React.useCallback((e, field, fieldValue) => {\n if (field === 'open') {\n onOpenChange?.(fieldValue);\n if (fieldValue === false && e?.type !== 'blur') {\n buttonRef.current?.focus();\n }\n }\n }, [onOpenChange]);\n const useListParameters = {\n getInitialState: () => ({\n highlightedValue: null,\n selectedValues: defaultValue ?? [],\n open: defaultOpen\n }),\n getItemId,\n controlledProps: controlledState,\n isItemDisabled,\n rootRef: handleListboxRef,\n onChange: handleSelectionChange,\n onHighlightChange: handleHighlightChange,\n onStateChange: handleStateChange,\n reducerActionContext: React.useMemo(() => ({\n multiple\n }), [multiple]),\n items: optionValues,\n itemStringifier: stringifyOption,\n selectionMode: multiple ? 'multiple' : 'single',\n stateReducer: selectReducer\n };\n const {\n dispatch,\n getRootProps: getListboxRootProps,\n contextValue: listContextValue,\n state: {\n open,\n highlightedValue: highlightedOption,\n selectedValues: selectedOptions\n },\n rootRef: mergedListboxRef\n } = useList(useListParameters);\n React.useEffect(() => {\n focusListboxIfRequested();\n }, [focusListboxIfRequested]);\n React.useEffect(() => {\n requestListboxFocus(open);\n }, [open]);\n const createHandleMouseDown = otherHandlers => event => {\n otherHandlers?.onMouseDown?.(event);\n if (!event.defaultPrevented && open) {\n ignoreClick.current = true;\n }\n };\n const createHandleButtonClick = otherHandlers => event => {\n otherHandlers?.onClick?.(event);\n if (!event.defaultPrevented && !ignoreClick.current) {\n const action = {\n type: SelectActionTypes.buttonClick,\n event\n };\n dispatch(action);\n }\n ignoreClick.current = false;\n };\n const createHandleButtonKeyDown = otherHandlers => event => {\n otherHandlers?.onKeyDown?.(event);\n if (event.defaultPrevented) {\n return;\n }\n if (event.key === 'Enter') {\n ignoreEnterKeyUp.current = true;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n dispatch({\n type: SelectActionTypes.buttonArrowKeyDown,\n key: event.key,\n event\n });\n }\n };\n const createHandleListboxKeyUp = otherHandlers => event => {\n otherHandlers?.onKeyUp?.(event);\n if (event.defaultPrevented) {\n return;\n }\n const closingKeys = multiple ? ['Escape'] : ['Escape', 'Enter', ' '];\n if (open && !ignoreEnterKeyUp.current && closingKeys.includes(event.key)) {\n buttonRef?.current?.focus();\n }\n ignoreEnterKeyUp.current = false;\n };\n useEnhancedEffect(() => {\n // Scroll to the currently highlighted option.\n if (highlightedOption != null) {\n const optionRef = options.get(highlightedOption)?.ref;\n if (!listboxRef.current || !optionRef?.current) {\n return;\n }\n const listboxClientRect = listboxRef.current.getBoundingClientRect();\n const optionClientRect = optionRef.current.getBoundingClientRect();\n if (optionClientRect.top < listboxClientRect.top) {\n listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n }\n }\n }, [highlightedOption, options]);\n const getButtonProps = (otherHandlers = {}) => {\n return _extends({}, getButtonRootProps(_extends({}, otherHandlers, {\n onClick: createHandleButtonClick(otherHandlers),\n onMouseDown: createHandleMouseDown(otherHandlers),\n onKeyDown: createHandleButtonKeyDown(otherHandlers)\n })), {\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': listboxId\n });\n };\n const getOptionMetadata = React.useCallback(optionValue => options.get(optionValue), [options]);\n const getListboxProps = (otherHandlers = {}) => {\n return _extends({}, getListboxRootProps(_extends({}, otherHandlers, {\n onKeyUp: createHandleListboxKeyUp(otherHandlers)\n })), {\n id: listboxId,\n role: 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined\n });\n };\n React.useDebugValue({\n selectedOptions,\n highlightedOption,\n open\n });\n const contextValue = React.useMemo(() => _extends({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]);\n let selectValue;\n if (props.multiple) {\n selectValue = selectedOptions;\n } else {\n selectValue = selectedOptions.length > 0 ? selectedOptions[0] : null;\n }\n return {\n buttonActive,\n buttonFocusVisible,\n buttonRef: mergedButtonRef,\n contextValue,\n disabled,\n dispatch,\n getButtonProps,\n getListboxProps,\n getOptionMetadata,\n listboxRef: mergedListboxRef,\n open,\n options: optionValues,\n value: selectValue,\n highlightedOption\n };\n}", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "constructor(value, selected) {\r\n this.value = value;\r\n this.selected = selected;\r\n }", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$3);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$3);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "setOptions(prop, value) {\n\t\t\t\tset({ options: true, prop }, value);\n\t\t\t}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function valueProp() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var props = args[0],\n propName = args[1],\n Component = args[2];\n\n\n if ((0, _util.isLabelInValue)(props)) {\n var _err = genArrProps(_propTypes2['default'].shape({\n label: _propTypes2['default'].node,\n value: _propTypes2['default'].string\n })).apply(undefined, args);\n if (_err) {\n return new Error('Invalid prop `' + propName + '` supplied to `' + Component + '`. ' + 'You should use { label: string, value: string } or [{ label: string, value: string }] instead.');\n }\n return null;\n }\n\n var err = genArrProps(_propTypes2['default'].string).apply(undefined, args);\n if (err) {\n return new Error('Invalid prop `' + propName + '` supplied to `' + Component + '`. ' + 'You should use string or [string] instead.');\n }\n return null;\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}" ]
[ "0.60985404", "0.6063396", "0.5824173", "0.5824173", "0.57353365", "0.5712244", "0.57057315", "0.57057315", "0.57057315", "0.57057315", "0.57057315", "0.56855667", "0.56825453", "0.5640067", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.56325287", "0.5575192", "0.5523022", "0.5523022", "0.5523022", "0.5523022", "0.5523022", "0.5523022", "0.5523022", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.5512539", "0.54465693", "0.54465693", "0.54465693", "0.54404366", "0.54404366", "0.5435471", "0.54341644", "0.54341644", "0.543048", "0.543048", "0.543048", "0.54229355", "0.5415838", "0.5415838", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.5399433", "0.53887117", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075", "0.5387075" ]
0.0
-1
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the `value` prop must change in order for the rendered element to be updated. The rendered element will be initialized with an empty value, the prop `defaultValue` if specified, or the children content (deprecated).
function getHostProps$3(element,props){var node=element;!(props.dangerouslySetInnerHTML==null)?invariant(false,'`dangerouslySetInnerHTML` does not make sense on <textarea>.'):void 0;// Always set children to the same thing. In IE9, the selection range will // get reset if `textContent` is mutated. We could add a check in setTextContent // to only set the value if/when the value differs from the node value (which would // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this // solution. The value can be a boolean or object so that's why it's forced // to be a string. var hostProps=_assign({},props,{value:undefined,defaultValue:undefined,children:toString(node._wrapperState.initialValue)});return hostProps;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set value(val) {\n if (this.#el) this.#el.value = val;\n else this.#value = val;\n }", "setValue(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n /* TODO: Add validation */\n if(newValue !=thisWidget.value && thisWidget.isValid(newValue)){\n thisWidget.value = newValue;\n thisWidget.announce();\n }\n thisWidget.renderValue();\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "setValue(value) {\n ReactDOM.findDOMNode(this).value = value;\n }", "setValue(value, {update=true} = {}) {\n let numpad = this.numpad.querySelector('.value')\n if (numpad) numpad.setAttribute('text', {value})\n this.el.setAttribute('text', {value})\n this.inputField.value = value\n if (update && this.data.target)\n {\n this.data.target.setAttribute(this.data.component, {[this.data.property]: value})\n }\n }", "function setDefaultValue(node, type, value) {\n if (type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) node.defaultValue = toString(node._wrapperState.initialValue);\n else if (node.defaultValue !== toString(value)) node.defaultValue = toString(value);\n }\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "constructor(value, parentNode = null){\n this.children = [];\n this.value = value;\n this.parent = parentNode;\n }", "function patchDOMProp(el, key, value, // the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) unmountChildren(prevChildren, parentComponent, parentSuspense);\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS' && // custom elements may use _value internally\n !el.tagName.includes('-')) {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to\n // textContent if no value attribute is present. And setting .value for\n // OPTION has no side effect\n el.tagName === 'OPTION') el.value = newValue;\n if (value == null) el.removeAttribute(key);\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = _shared.includeBooleanAttr(value);\n return;\n } else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n } else if (type === 'number') {\n // e.g. <img :width=\"null\">\n // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n } catch (_a) {\n }\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n } catch (e) {\n _runtimeCore.warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` + `value ${value} is invalid.`, e);\n }\n}", "function patchDOMProp(el, key, value, \n // the following args are passed only due to potential innerHTML/textContent\n // overriding existing VNodes, in which case the old tree must be properly\n // unmounted.\n prevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n var newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' && typeof el[key] === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n }\n else if (value == null && typeof el[key] === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n }\n else {\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n warn(\"Failed setting prop \\\"\" + key + \"\\\" on <\" + (el.tagName.toLowerCase()) + \">: \" +\n \"value \" + value + \" is invalid.\", e);\n }\n }\n }\n }", "function patchDOMProp(el, key, value, \n // the following args are passed only due to potential innerHTML/textContent\n // overriding existing VNodes, in which case the old tree must be properly\n // unmounted.\n prevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n var newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' && typeof el[key] === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n }\n else if (value == null && typeof el[key] === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n }\n else {\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n warn(\"Failed setting prop \\\"\" + key + \"\\\" on <\" + (el.tagName.toLowerCase()) + \">: \" +\n \"value \" + value + \" is invalid.\", e);\n }\n }\n }\n }", "setValue(value) {\n //this.findDOMNode(this).value = value;\n }", "set value(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n //add validation\n if (newValue != thisWidget.correctValue && thisWidget.isValid(newValue)) {\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n } \n thisWidget.renderValue();\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n el.value = value == null ? '' : value;\r\n return;\r\n }\r\n if (value === '' && typeof el[key] === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n }\r\n else if (value == null && typeof el[key] === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n }\r\n else {\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n {\r\n warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n }\r\n}", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "constructor(defaultValue) {\n\t\tsuper(); \n\t\tthis.defaultValue = defaultValue;\n\t}", "function value(val) { return control_1.default(val); }", "setValue(value) {\n this.value = value;\n }", "setValue(value, options = {}) {\n return super.setValue(value, options);\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "initialValueChanged(previous, next) {\n // If the value is clean and the component is connected to the DOM\n // then set value equal to the attribute value.\n if (!this.dirtyValue) {\n this.value = this.initialValue;\n this.dirtyValue = false;\n }\n }", "function setValue( value ) {\n\n\t\t\t_state = _stateEnum[ \"entry\" ];\n\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"entry\";\n\t\t\t_widget[ \"content\" ][ \"impl\" ].value = value;\n\n\t\t\tif ( ! isValid() ) {\n\n\t\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"invalid\";\n\t\t\t}\n\n\t\t\treturn _that;\t\n\t\t}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "refreshValue() {\n if (this.isObject(this.markupElemIds) && this.isNumber(this.markupElemIds.value)) {\n const _value = this.isString(this.value) ?\n this.value : JSON.stringify(this.value);\n this.setMarkupOfPart('value', _value);\n }\n return this;\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "onInputValueChange() {\n assert && assert( this.node.inputValue !== undefined, 'use null to remove input value attribute' );\n\n if ( this.node.inputValue === null ) {\n this.removeAttributeFromElement( 'value' );\n }\n else {\n\n // type conversion for DOM spec\n const valueString = `${this.node.inputValue}`;\n this.setAttributeToElement( 'value', valueString, { asProperty: true } );\n }\n }", "set value(_value) {\n this.setValue(_value);\n }", "set value(value) {}", "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n return;\r\n }\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (value === '' && type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n return;\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n el[key] = 0;\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n }\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n if ((true)) {\r\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "function updateElementValue(element,attr,value){// Support: IE9 only\n// In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\nvar propValue=isDefined(value)?value:msie===9?'':null;element.prop('value',propValue);attr.$set('value',value);}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "set _textWhenEmpty(aValue) {\n if (this._emptyTextNode) {\n this._emptyTextNode.setAttribute(\"value\", aValue);\n }\n this._emptyTextValue = aValue;\n this._showEmptyText();\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n }\n else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "set value(val) {\n const input = this.refs.myInput\n input.value = val\n }", "renderValue(){\n const thisWidget = this;\n \n thisWidget.dom.wrapper.innerHTML = thisWidget.correctvalue;\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n }\n catch (_a) { }\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "function ConstantInputWidget(value) {\n\tWidget.apply(this);\n\tthis.behaviors.value = constant_b(value);\n\tthis.behaviors.inputElems = [];\n\tthis.dom = SPAN();\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' &&\n el.tagName !== 'PROGRESS' &&\n // custom elements may use _value internally\n !el.tagName.includes('-')) {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue ||\n // #4956: always set for OPTION elements because its value falls back to\n // textContent if no value attribute is present. And setting .value for\n // OPTION has no side effect\n el.tagName === 'OPTION') {\n el.value = newValue;\n }\n if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n let needRemove = false;\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n value = includeBooleanAttr(value);\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n value = '';\n needRemove = true;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n value = 0;\n needRemove = true;\n }\n }\n // some properties perform value validation and throw,\n // some properties has getter, no setter, will error in 'use strict'\n // eg. <select :type=\"null\"></select> <select :willValidate=\"null\"></select>\n try {\n el[key] = value;\n }\n catch (e) {\n }\n needRemove && el.removeAttribute(key);\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}" ]
[ "0.64213157", "0.5995463", "0.59781355", "0.59781355", "0.59781355", "0.59781355", "0.59781355", "0.59781355", "0.59781355", "0.5954646", "0.5930495", "0.5902076", "0.588062", "0.588062", "0.588062", "0.588062", "0.588062", "0.588062", "0.588062", "0.5823171", "0.57667893", "0.56788015", "0.56788015", "0.5673774", "0.56212133", "0.56118727", "0.559969", "0.5595349", "0.5595123", "0.5594345", "0.5581201", "0.5579534", "0.5564653", "0.5564653", "0.5564653", "0.5564653", "0.55506825", "0.5543594", "0.55430865", "0.5538494", "0.55306435", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.5523078", "0.55202335", "0.550967", "0.55065906", "0.55040085", "0.5472968", "0.54601705", "0.5454596", "0.5448652", "0.54392946", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5433665", "0.5432702", "0.54229116", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5420084", "0.5417257", "0.541501", "0.54115516", "0.5407917", "0.5407917" ]
0.0
-1
Assumes there is no parent namespace.
function getIntrinsicNamespace(type){switch(type){case'svg':return SVG_NAMESPACE;case'math':return MATH_NAMESPACE;default:return HTML_NAMESPACE$1;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentObject(){\r\n var obj = parent;\r\n if (namespace !== \"\") {\r\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\r\n obj = obj[ii[i]];\r\n }\r\n }\r\n return obj.easyXDM;\r\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function getParentObject(){\n var obj = parent;\n if (namespace !== \"\") {\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\n obj = obj[ii[i]];\n }\n }\n return obj.easyXDM;\n }", "function NamespaceContext(){\n this.ns = null; //full namespace string e.g. www.bond.co.uk/jsocs/something\n this.type_ = {}; //e.g. type_[mytype] types referenceable by rulesets in this or parent context\n //this.rootRuleSet = null; //tree of RuleSets NOT USED?\n this.ns_ = {}; //e.g. ns_[prefix] = {other ns context} other namespace rules this context references\n}", "function SVGParent() {}", "function exitNamespace() {\n namespaceStack.shift();\n return fw.utils.currentNamespace();\n}", "function ParentWithStatic() { }", "static isNamespace(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Namespace;\r\n }", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n }", "function ensureNamespace(namespace){\n var current = exports;\n namespace.split('.').forEach(function(name){\n if(typeof current[name] === 'undefined'){\n current[name] = {};\n }\n current = current[name];\n });\n }", "isAtRootLevel() {\n return this.namespaceAndFunctionDepth === 0;\n }", "function namespace(ns) {\n 'use strict';\n \n if (namespaces.indexOf(ns) === -1) {\n var segments = ns.split(\".\").reverse(),\n /*\n Inner recursive function to add a new object if not defined\n */\n createSegment = function (segments, currentSegment) {\n if (segments.length === 0) {\n return;\n }\n var segment = segments.pop();\n // prevent overwriting of existing segment\n if(currentSegment[segment] === undefined) {\n currentSegment[segment] = {};\n }\n createSegment(segments, currentSegment[segment]);\n };\n namespaces.push(ns);\n createSegment(segments, window);\n }\n}", "function isNamespace(thing) {\n return isObject(thing) && !!thing.__isNamespace;\n}", "parentFunction(){\n return \"This is coming from the parent!\";\n }", "function Namespace(inheritedNamespace) { \n function Namespace() {}; \n Namespace.prototype = inheritedNamespace; \n return new Namespace(); \n}", "function Namespaces() {\n this.nsByPfx = new Object();\n this.pfxByNs = new Object();\n this.index = 0;\n}", "static GetParentBone() {}", "function enterNamespaceName(namespaceName) {\n namespaceStack.unshift( namespaceName );\n return fw.namespace( fw.utils.currentNamespaceName() );\n}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "constructor() {\n super(NameSpace);\n }", "function TestRoot() {}", "namespace(source, importAs, importFrom) {\n return ensureNamespaceImportPresent(source.getSourceFile(), importAs, importFrom, statementToAdd => source.addStatement(statementToAdd, true));\n }", "getParent(){return this.__parent}", "isRoot () {\r\n return this.parent === null\r\n }", "function hasNamespace(node) {\n const specifiers = node.specifiers.\n filter(specifier => specifier.type === 'ImportNamespaceSpecifier');\n return specifiers.length > 0;\n}", "getBaseNamespace(text) {\n const parts = text.split('.');\n if (parts.length > 1) {\n return parts[0];\n }\n }", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "isRoot() {\nreturn this.parent === null;\n}", "requireParent() {\n return \"SCServer\";\n }", "function namespaceExists(nameSpace, libNodes)\n{\n var ret = false;\n \n for(var i=0; i<libNodes.length; i++)\n {\n if (libNodes[i].name == nameSpace) {\n ret = true;\n }\n }\n return ret;\n}", "function enterNamespace(namespace) {\n namespaceStack.unshift( namespace.getName() );\n return namespace;\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree[namespace] = {\n ...subtree[namespace],\n }\n return getNamespace(subtree[namespace], path)\n}", "static get localizeNamespaces() {}", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n}", "addParent(node, parent) {\n // implement by subclass\n }", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n }", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n }", "function Xml_GetNamedAncestor(objNode,strAncestorName,blnEexcludSelf)\r\n{\r\n // Validate recieved arguments.\r\n if(objNode && !Aux_IsNullOrEmpty(strAncestorName))\r\n {\r\n return Xml_SelectSingleNode(\"ancestor\"+(blnEexcludSelf?\"\":\"-or-self\")+\"::\"+strAncestorName+\"[1]\",objNode);\r\n }\r\n \r\n return null;\r\n}", "create_namespace(dotted_name, value) {\n let parent = this;\n let parts = dotted_name.split('.');\n parts.forEach((part, i) => {\n if (parent[part] === undefined) {\n if (i === parts.length - 1 && value !== undefined) {\n parent[part] = value;\n } else {\n parent[part] = {};\n }\n }\n parent = parent[part];\n });\n return parent;\n }", "function getNamespace (namespace) {\n let namespaces = namespace.split(\".\");\n let parent = chrome;\n for (let name of namespaces) {\n parent[name] = parent[name] || createObjectIn(unsafeWindow);\n parent = parent[name];\n }\n return parent;\n}", "function _resyncParent() {\n if (this.parentPath) {\n this.parent = this.parentPath.node;\n }\n}", "function n(t){if(!t)throw new TypeError(\"argument namespace is required\");function e(t){}return e._file=void 0,e._ignored=!0,e._namespace=t,e._traced=!1,e._warned=Object.create(null),e.function=i,e.property=o,e}", "function extend( ns, ns_string ) { \n var parts = ns_string.split('.'), \n parent = ns, \n pl, i; \n if (parts[0] == \"CALC\") { \n parts = parts.slice(1); \n } \n pl = parts.length; \n for (i = 0; i < pl; i++) { \n //create a property if it doesnt exist \n if (typeof parent[parts[i]] == 'undefined') { \n parent[parts[i]] = {}; \n } \n parent = parent[parts[i]]; \n } \n return parent; \n }", "function _getOuterContainerOrSelf(node) {\n\t var view = node.view;\n\t while (_isNgContainer(node.parent, view)) {\n\t node = node.parent;\n\t }\n\t return node;\n\t}", "function initNameSpace() {\r\n getTopStories();\r\n }", "getFirstChild() {}", "get parent () { return this._parent; }", "function hc_nodeparentnode() {\n var success;\n var doc;\n var elementList;\n var employeeNode;\n var parentNode;\n var parentName;\n doc = load(\"hc_staff\");\n elementList = doc.getElementsByTagName(\"p\");\n employeeNode = elementList.item(1);\n parentNode = employeeNode.parentNode;\n\n parentName = parentNode.nodeName;\n\n assertEqualsAutoCase(\"element\", \"parentNodeName\",\"body\",parentName);\n \n}", "setParent(prnt) {\nreturn this.parent = prnt;\n}", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "get ns() {\n return this._ns;\n }", "function SmalltalkRoot () {\n }", "function getNSLayer(inNode, inName) {\n\n\tvar node, i;\n\n\tnode = inNode[inName];\n\tfor (i = 0; !node && inNode.layers && i < inNode.layers.length; i++) {\n\t\tnode = getNSLayer(inNode.layers[i].document,inName);\n\t}\n\treturn node;\n}", "function namespace__(){this.namespace_=( joo.MemberDeclaration.NAMESPACE_INTERNAL);}", "get parentName () {\n\t\treturn Object.getPrototypeOf(this.constructor).name\n\t}", "function testGetNamespace() {\r\n\tvar testStencilSet = new ORYX.Core.StencilSet.StencilSet(\"TestStencilSet\")\r\n\tvar namespace = testStencilSet.namespace()\r\n\r\n\tassertEquals(\"Check namespace of testStencilSet\", namespace, \"http://b3mn.org/stencilset/testB#\")\r\n}", "function namespaceStart(base, test) {\n if (test.namespace === undefined) {\n return namespace_1.isNamespaceDefault(base) && base.path.startsWith(test.path) || !!base.namespace && base.namespace.startsWith(test.path);\n } else {\n return namespace_1.namesEqual(base, test) && base.path.startsWith(test.path);\n }\n}", "get namespace() {\n return this._namespace\n }", "function _resyncParent() {\n\t if (this.parentPath) {\n\t this.parent = this.parentPath.node;\n\t }\n\t}", "function _resyncParent() {\n\t if (this.parentPath) {\n\t this.parent = this.parentPath.node;\n\t }\n\t}", "getParent() {\nreturn this.parent;\n}", "function checkSubtree() {\n \n}", "GetComponentInParent() {}", "GetComponentInParent() {}", "GetComponentInParent() {}", "GetComponentInParent() {}", "function getFirstParentNative(tNode){var parent=tNode.parent;while(parent&&parent.type===5/* IcuContainer */){parent=parent.parent;}return parent;}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "constructor () {\n this._isRoot = true;\n }", "function it(e){e.parent=null,ae(e)}", "selectNamespace() {\n //alert(JSON.stringify(this.formData.namespaceParent, null, 4));\n var nameSpaceName = null;\n try {\n nameSpaceName = this.formData.namespaceParent['fqn'];\n this.getPointerAccount(nameSpaceName);\n } catch(err) {};\n \n if (nameSpaceName != null) {\n // clear json msg\n this.transMessage ='';\n // Get transactions\n this.getTransactions(false);\n\n } else { //clean if no namespace is selected\n this.formData.pointerAdd = '';\n this.formData.recipient = '';\n this.formData.recipientPublicKey = '';\n this.ip1 ='';\n this.organization = '';\n this.country = '';\n this.address = '';\n this.phone = '';\n this.email = '';\n this.other = '';\n this.charactersLeft = 1024;\n this.formData.message = '';\n this.transMessage ='';\n }\n }", "initializing() {\n this.getParentProject();\n }", "function parent() {\r\n // name is accessible here\r\n // likes is not accessible here\r\n function child() {\r\n // Innermost level of the scope chain\r\n // name is also accessible here\r\n var likes = 'Coding';\r\n }\r\n }", "function isHtmlNamespace(node) {\r\n var ns;\r\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\r\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "static getSymbolParent(symbol) {\n return symbol.parent;\n }" ]
[ "0.59294087", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.57438385", "0.56890935", "0.5673484", "0.56610936", "0.5640146", "0.5580239", "0.544239", "0.5442175", "0.5410278", "0.5397606", "0.53690296", "0.53592485", "0.5327534", "0.532705", "0.53229856", "0.53193605", "0.5313098", "0.5301471", "0.5295859", "0.5295859", "0.5295859", "0.5295859", "0.52877384", "0.52611893", "0.5261078", "0.52534926", "0.5248971", "0.52380115", "0.5237931", "0.52243704", "0.52243704", "0.52125657", "0.52120775", "0.5210552", "0.520527", "0.52020544", "0.5198533", "0.51924735", "0.51919633", "0.5177351", "0.5177351", "0.5165444", "0.5161359", "0.51606065", "0.5149667", "0.5135195", "0.51351124", "0.51234186", "0.51139593", "0.51106435", "0.51094973", "0.51002544", "0.50913143", "0.50814754", "0.50814754", "0.50765157", "0.50761247", "0.50760674", "0.506947", "0.5066843", "0.50630665", "0.5061734", "0.506166", "0.50544775", "0.50544775", "0.5048569", "0.5023388", "0.5022544", "0.5022544", "0.5022544", "0.5022544", "0.50127286", "0.4995106", "0.4995106", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4990565", "0.49904794", "0.4982848", "0.4979333", "0.4978937", "0.49788004", "0.4974179", "0.497409", "0.497409", "0.497409", "0.497409", "0.497409", "0.497409", "0.4973739" ]
0.0
-1
Hyphenates a camelcased CSS property name, for example: > hyphenateStyleName('backgroundColor') hyphenateStyleName('MozTransition') hyphenateStyleName('msTransition') < "mstransition" As Modernizr suggests ( an `ms` prefix is converted to `ms`.
function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}", "function hyphenateStyleName(name) {\n return name\n .replace(uppercasePattern, '-$1')\n .toLowerCase()\n .replace(msPattern, '-ms-');\n }" ]
[ "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.7950004", "0.79490614" ]
0.8186882
4
Operations for dealing with CSS properties. This creates a string that is expected to be equivalent to the style attribute generated by serverside rendering. It bypasses warnings and security checks so it's not safe to use this value for anything other than comparison. It is only used in DEV for SSR validation.
function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get styles () {\n return css`${unsafeCSS(style)}`\n }", "get cssText() {\n var properties = [];\n for (var i = 0, length = this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \");\n }", "get cssText(){\n var properties = [];\n for (var i=0, length=this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \")\n }", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "function evaluateStyle(styleProperties_)\n{\n\tlet s = \"\";\n\tfor(let i = 0; i < styleProperties_.length; ++i)\n\t{\n\t\tif (i != 0)\n\t\t\ts += \";\";\n\t\ts += evaluateStyleRule(styleProperties_[i]);\n\t}\n\treturn s;\n}", "function evaluateStyleRule(styleProperty_)\n{\n\treturn styleProperty_.name + \": \" + styleProperty_.value;\n}", "function getCSSStyle(key, value) {\n if(value && value.value) {\n return key + \": \" + value.value +\";\";\n }\n else\n return \"\";\n }", "function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val!=null){statements.push(name+':'+val);}});return statements.join(';');}", "getCSSVars(){\n var compStyle = getComputedStyle(this.DOM.scope, null)\n\n const getProp = name => compStyle.getPropertyValue('--'+name)\n\n function seprateUnitFromValue(a){\n if( !a ) return {}\n a = a.trim().split(' ')[0]\n var unit = a.split(/\\d+/g).filter(n=>n).pop().trim(),\n value = +a.split(unit).filter(n=>n)[0].trim()\n return {value, unit}\n }\n\n this.CSSVars = {\n tagHideTransition: (({value, unit}) => unit=='s' ? value * 1000 : value)(seprateUnitFromValue(getProp('tag-hide-transition')))\n }\n }", "function get_rendered_style(elm, css_rule_str){\n\tvar str_val = \"\";\n\tif(document.defaultView && document.defaultView.getComputedStyle){\n\t\tstr_val = document.defaultView.getComputedStyle(elm, \"\").getPropertyValue(css_rule_str);\n\t}\n\telse if(elm.currentStyle){\n // Catch errors for unsupported browsers (IE <= 5.0)\n try {\n css_rule_str = css_rule_str.replace(/\\-(\\w)/g,\n function (strMatch, p1) {\n return p1.toUpperCase();\n });\n str_val = elm.currentStyle[css_rule_str];\n }\n catch(e) { /* In this case, return \"\" */ }\n\t}\n\treturn str_val;\n}", "function createStyleProperty(el) {\n\tvar style = el.style;\n\tvar output = {};\n\tfor (var i = 0; i < style.length; ++i) {\n\t\tvar item = style.item(i);\n\t\toutput[item] = String(style[item]);\n\t\t// hack to workaround browser inconsistency with url()\n\t\tif (output[item].indexOf('url') > -1) {\n\t\t\toutput[item] = output[item].replace(/\\\"/g, '')\n\t\t}\n\t}\n\treturn { name: 'style', value: output };\n}", "function styleToString(key, value) {\n if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[key]) {\n return key + \":\" + value + \"px\";\n }\n return key + \":\" + value;\n}", "function styleToString(key, value) {\n if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[key]) {\n return key + \":\" + value + \"px\";\n }\n return key + \":\" + value;\n}", "function sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__url_sanitizer__[\"a\" /* sanitizeUrl */])(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__[\"isDevMode\"])()) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__dom_dom_adapter__[\"a\" /* getDOM */])().log(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function styleStringToString(name, value) {\n\t if (value == null) {\n\t return '';\n\t }\n\t if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[name]) {\n\t value += 'px';\n\t }\n\t return name + \":\" + String(value).replace(/([\\{\\}\\[\\]])/g, '\\\\$1');\n\t}", "function styleToString(key, value) {\n if (value && typeof value === \"number\" && !CSS_NUMBER[key]) {\n return `${key}:${value}px`;\n }\n return `${key}:${value}`;\n}", "function styleToString(key, value) {\n if (value && typeof value === \"number\" && !CSS_NUMBER[key]) {\n return `${key}:${value}px`;\n }\n return `${key}:${value}`;\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function GetStyleProperty(oElm, strCssProperty)\n{\n var strValue = \"\";\n if(document.defaultView && document.defaultView.getComputedStyle)\n {\n strValue = document.defaultView.getComputedStyle(oElm, \"\").getPropertyValue(strCssProperty);\n }\n else if(oElm.currentStyle)\n {\n strCssProperty = strCssProperty.replace(/\\-(\\w)/g, function (strMatch, p1){\n return p1.toUpperCase();\n });\n strValue = oElm.currentStyle[strCssProperty];\n }\n return strValue;\n}", "function get_computed_value(cs, property)\n{\n var info = gCSSProperties[property];\n if (info.type == CSS_TYPE_TRUE_SHORTHAND ||\n (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&\n (property == \"text-decoration\" || property == \"mask\"))) {\n var results = [];\n for (var idx in info.subproperties) {\n var subprop = info.subproperties[idx];\n results.push(get_computed_value(cs, subprop));\n }\n return results.join(\" ; \");\n }\n if (info.get_computed)\n return info.get_computed(cs, property);\n return cs.getPropertyValue(property);\n}", "function getStyleProps(injector) {\n return {\n id: STYLE_ELEMENT_ID,\n nonce: injector.nonce,\n textContent: injector.ruleTexts.join(\"\")\n };\n}", "function toStyleProp(prop) {\r\n\t\tif (prop == 'float') {\r\n\t\t\treturn glow.env.ie ? 'styleFloat' : 'cssFloat';\r\n\t\t}\r\n\t\treturn prop.replace(/-(\\w)/g, function(match, p1) {\r\n\t\t\treturn p1.toUpperCase();\r\n\t\t});\r\n\t}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function getCss(propertyInfo, value) {\n var rules = void 0;\n\n // Protect against unexpected values\n var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n if (valueType !== 'string' && valueType !== 'number') {\n if (true) {\n var name = propertyInfo.jsName;\n var encodedValue = JSON.stringify(value);\n console.error('\\uD83D\\uDCE6 ui-box: property \\u201C' + name + '\\u201D was passed invalid value \\u201C' + encodedValue + '\\u201D. Only numbers and strings are supported.');\n }\n return null;\n }\n\n var valueString = (0, _valueToString2.default)(value, propertyInfo.defaultUnit);\n\n var className = (0, _getClassName2.default)(propertyInfo, valueString);\n\n // Avoid running the prefixer when possible because it's slow\n if (propertyInfo.isPrefixed) {\n rules = (0, _prefixer2.default)(propertyInfo.jsName, valueString);\n } else {\n rules = [{ property: propertyInfo.cssName, value: valueString }];\n }\n\n var styles = void 0;\n if (false) { var rulesString; } else {\n var _rulesString = rules.map(function (rule) {\n return ' ' + rule.property + ': ' + rule.value + ';';\n }).join('\\n');\n styles = '\\n.' + className + ' {\\n' + _rulesString + '\\n}';\n }\n\n return { className: className, styles: styles };\n}", "function getCss(propertyInfo, value) {\n var rules = void 0;\n\n // Protect against unexpected values\n var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n if (valueType !== 'string' && valueType !== 'number') {\n if (true) {\n var name = propertyInfo.jsName;\n var encodedValue = JSON.stringify(value);\n console.error('\\uD83D\\uDCE6 ui-box: property \\u201C' + name + '\\u201D was passed invalid value \\u201C' + encodedValue + '\\u201D. Only numbers and strings are supported.');\n }\n return null;\n }\n\n var valueString = (0, _valueToString2.default)(value, propertyInfo.defaultUnit);\n\n var className = (0, _getClassName2.default)(propertyInfo, valueString);\n\n // Avoid running the prefixer when possible because it's slow\n if (propertyInfo.isPrefixed) {\n rules = (0, _prefixer2.default)(propertyInfo.jsName, valueString);\n } else {\n rules = [{ property: propertyInfo.cssName, value: valueString }];\n }\n\n var styles = void 0;\n if (false) { var rulesString; } else {\n var _rulesString = rules.map(function (rule) {\n return ' ' + rule.property + ': ' + rule.value + ';';\n }).join('\\n');\n styles = '\\n.' + className + ' {\\n' + _rulesString + '\\n}';\n }\n\n return { className: className, styles: styles };\n}", "renderCssStyle() {\n this.cssStyle = [\n // `width: ${parseFloat(this.width) != this.width ? this.width : this.width + 'px'};`\n ].join(' ');\n }", "get _style() {\n\n let direction = FlexBox._directions[this.state.direction];\n let justify = FlexBox._justifys[this.state.justify];\n let alignment = FlexBox._alignments[this.state.alignment];\n\n return `flex ${alignment} ${justify} ${direction}`.trim();\n }", "function css$get$0() {\n if ( !this.cssCached ) this.stringify();\n return this.cssCached;\n }", "function stringifyProperties(properties) {\n\t return properties.map(function (p) { return styleToString(p[0], p[1]); }).join(';');\n\t}", "toString(): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index = 0; index < this.style.length; index++) {\n str += toCss(this.selector, this.style[index])\n if (this.style[index + 1]) str += '\\n'\n }\n return str\n }\n\n return toCss(this.selector, this.style)\n }", "get hostStyle() {\n const styles = `\n\t\t\tdisplay: flex;\n\t\t\theight: 140px;\n\t\t\tmin-height: 140px;\n\t\t\tmin-width: 180px;\n\t\t\tmax-width: 180px;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tpadding: 0 20px;\n\t\t\tmargin: 10px;\n\t\t\tborder-radius: 5px;\n\t\t\tposition: relative;\n\t\t`;\n return this.sanitizer.bypassSecurityTrustStyle(styles);\n }", "function getStyle(target, prop) {\n\t try {\n\t if (window.getComputedStyle) {\n\t // gecko and webkit\n\t prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel\n\t return window.getComputedStyle(target, null).getPropertyValue(prop);\n\t }\n\t if (target.currentStyle) {\n\t // ie\n\t return target.currentStyle[prop];\n\t }\n\t return target.style[prop];\n\t } catch (e) {}\n\t return \"\";\n\t }", "getStyle() {\n\t\tvar style = {\n\t\t\t\"color\": this.color || this.default_color,\n\t\t\t\"font-weight\": \"bold\",\n\t\t\t\"cursor\": \"pointer\",\n \"-webkit-text-stroke\": \"0.45px grey\"\n\t\t};\n\n\n\t\treturn _.map(style, (value, key) => `${key}:${value}`).join(';');\n\t}", "function cssProperty(p, rp) {\n var b = document.body || document.documentElement,\n s = b.style;\n if (typeof s == 'undefined') { return false; }\n if (typeof s[p] == 'string') { return rp ? p : true; }\n var v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],\n p = p.charAt(0).toUpperCase() + p.substr(1);\n for (var i = 0; i < v.length; i++) {\n if (typeof s[v[i] + p] == 'string') { return rp ? (v[i] + p) : true; }\n }\n return false;\n }", "function cssToStr(cssProps) {\n var statements = [];\n\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n\n return statements.join(';');\n }", "function getStyle (target, prop) {\n try {\n if ( window.getComputedStyle ) { // gecko and webkit\n prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel\n return window.getComputedStyle(target, null).getPropertyValue(prop);\n }\n if ( target.currentStyle ) { // ie\n return target.currentStyle[prop];\n }\n return target.style[prop];\n }\n catch (e) {\n }\n return \"\";\n }", "function getStyle(rule, prop) {\n\t try {\n\t return rule.style.getPropertyValue(prop);\n\t } catch (err) {\n\t // IE may throw if property is unknown.\n\t return '';\n\t }\n\t}", "function _sanitizeStyle(value){value=String(value).trim();// Make sure it's actually a string.\nif(!value)return'';// Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n// reasoning behind this.\nvar urlMatch=value.match(URL_RE);if(urlMatch&&_sanitizeUrl(urlMatch[1])===urlMatch[1]||value.match(SAFE_STYLE_VALUE)&&hasBalancedQuotes(value)){return value;// Safe style values.\n}if(isDevMode()){console.warn(\"WARNING: sanitizing unsafe style value \"+value+\" (see http://g.co/ng/security#xss).\");}return'unsafe';}", "_renderStyle() {\n let render;\n switch (this.xstyle) {\n // no style\n case \"none\": render = \"\";\n break;\n // default styles defined by the DCC\n case \"in\" : if (this.hasAttribute(\"image\"))\n render = \"image-style\"\n else\n render = \"regular-style\"\n break;\n // styles defined by the theme\n case \"out-image\":\n case \"out\": render = this.elementTag() + \"-template\";\n break;\n // style defined directly in the attribute xstyle\n default: render = this.xstyle;\n }\n\n return render;\n }", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n key === 'text-decoration' && (\n value === 'underline'\n || value === 'line-through'\n )\n || \n key === 'font-weight' && (\n value === 'bold'\n )\n ||\n key === 'font-style' && (\n value === 'italic'\n )\n ||\n key === 'float' && (\n value === 'left'\n || value === 'right'\n || value === 'none'\n )\n ||\n key === 'vertical-align' && (\n value === 'baseline'\n || value === 'sub'\n || value === 'super'\n || value === 'test-top'\n || value === 'text-bottom'\n || value === 'middle'\n || value === 'top'\n || value === 'bottom'\n || value.match(/[0-9]*(px|em)/)\n || value.match(/[0-9]+?%/)\n )\n ||\n key === 'font-size' && (\n value === 'xx-small'\n || value === 'x-small'\n || value === 'small'\n || value === 'medium'\n || value === 'large'\n || value === 'x-large'\n || value === 'xx-large'\n || value === 'larger'\n || value === 'smaller'\n || value.match(/[0-9]*\\.?[0-9]*(px|em|rem|mm|q|cm|in|pt|pc|%)/)\n )\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t|| // Reference #520\n\t\t\t\t(key === 'direction' && value.match(/^ltr|rtl|initial|inherit$/))\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "function setBrowserSpecificProperty(prop) {\n var style = document.body.style; // No reason for this particular tag, just want the style\n var prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];\n var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1);\n var props = prefixes.map(function(prefix){return prefix + ucProp;}).concat(prop);\n\n for (var i in props) {\n if (style[props[i]] !== undefined) {\n return props[i];\n }\n }\n }", "function getStyle() {\n if (props.white) return styles.white;\n else if (props.red) return styles.red;\n else if (props.blue) return styles.blue;\n else if (props.green) return styles.green;\n else if (props.black) return styles.black;\n else {\n return styles.white;\n }\n }", "function computedStyle(el, prop, getComputedStyle, style) {\n getComputedStyle = window.getComputedStyle;\n style =\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle;\n if (style) {\n return style\n [\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n }\n}", "function getStyle(rule, prop) {\n try {\n return rule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n}", "function getStyle(rule, prop) {\n try {\n return rule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "getCssString() {\n const text = fs.readFileSync(\"./src/hero.css\", 'utf8');\n return (text.replace(/\\s+/g, ' '));\n }", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'float' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'none'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t|| // Reference #520\n\t\t\t\t(key === 'direction' && value.match(/^ltr|rtl|initial|inherit$/))\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n }", "function IntObject_UpdateCSSStyleProperty()\n{\n\t//has fixed property?\n\tif (this.StyleProperties && this.StyleProperties.FixedPosition)\n\t{\n\t\t//unregister this as a fixed object\n\t\t__SIMULATOR.Interpreter.NotifyFixedObject(this.DataObject.Id, this, false);\n\t}\n\t//by default: no object is CSS Enabled\n\tthis.StyleProperties = false;\n\t//retrieve out css property\n\tvar strCSS = Get_String(this.Properties[__NEMESIS_PROPERTY_STYLE], null);\n\t//valid?\n\tif (strCSS != null)\n\t{\n\t\t//could have properties, convert into an object\n\t\tthis.StyleProperties = { cssText: \"\", Original: {}, Zoom: null };\n\t\t//split it\n\t\tstrCSS = strCSS.split(\";\");\n\t\t//now loop through all of them\n\t\tfor (var iCSS = 0, cCSS = strCSS.length; iCSS < cCSS; iCSS++)\n\t\t{\n\t\t\t//split this into key value pair\n\t\t\tvar pair = strCSS[iCSS].split(\":\");\n\t\t\t//valid?\n\t\t\tif (pair.length == 2)\n\t\t\t{\n\t\t\t\t//we want to make sure we trim the key\n\t\t\t\tpair[0] = pair[0].Trim();\n\t\t\t\t//store it\n\t\t\t\tthis.StyleProperties.Original[pair[0]] = pair[1];\n\t\t\t\t//switch on it\n\t\t\t\tswitch (pair[0].toLowerCase())\n\t\t\t\t{\n\t\t\t\t\tcase \"pointer-events\":\n\t\t\t\t\t\t//only process this if we arent in designer or if the value is not \"none\"\n\t\t\t\t\t\tif (!__DESIGNER_CONTROLLER || !/none/i.test(pair[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"zoom\":\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\t//but we also need to mark this as a valid zoom object\n\t\t\t\t\t\tthis.StyleProperties.Zoom = Zoom_Register(this, pair[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"content\":\n\t\t\t\t\t\t//replace all url(' with url(' plus host\n\t\t\t\t\t\tpair[1] = pair[1].replace(/url\\('(?!data:)/gi, \"url('\" + __HOST_LESSON_RESOURCES);\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//has fixed?\n\t\tif (this.StyleProperties.Original[\"position\"] == \"fixed\")\n\t\t{\n\t\t\t//assume this is fixed\n\t\t\tvar bFixed = true;\n\t\t\t//loop through the parents\n\t\t\tfor (var parent = this.Parent; parent; parent = parent.Parent)\n\t\t\t{\n\t\t\t\t//this parent a real iframe?\n\t\t\t\tif (parent.IsRealIFrame)\n\t\t\t\t{\n\t\t\t\t\t//cannot be fixed\n\t\t\t\t\tbFixed = false;\n\t\t\t\t\t//end loop\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//still fixed?\n\t\t\tif (bFixed)\n\t\t\t{\n\t\t\t\t//create fixed position marker\n\t\t\t\tthis.StyleProperties.FixedPosition = true;\n\t\t\t\t//and register with the interpreter\n\t\t\t\t__SIMULATOR.Interpreter.NotifyFixedObject(this.DataObject.Id, this, true);\n\t\t\t}\n\t\t}\n\t\t//switch on its control type tag\n\t\tswitch (Get_String(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE], \"\").toLowerCase())\n\t\t{\n\t\t\tcase \"iframe\":\n\t\t\tcase \"frame\":\n\t\t\tcase \"frameset\":\n\t\t\t\t//not the new iFrame?\n\t\t\t\tif (!Get_Bool(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE_FORCED], false))\n\t\t\t\t{\n\t\t\t\t\t//no isolation?\n\t\t\t\t\tif (!this.StyleProperties.Original[\"isolation\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t//force it\n\t\t\t\t\t\tthis.StyleProperties.cssText += \"isolation:isolate;\";\n\t\t\t\t\t}\n\t\t\t\t\t//this ie browser (Edge and IE)\n\t\t\t\t\tif (__BROWSER_TYPE == __BROWSER_IE)\n\t\t\t\t\t{\n\t\t\t\t\t\t//no opacity?\n\t\t\t\t\t\tif (!this.StyleProperties.Original[\"opacity\"])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//force it\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += \"opacity:0.99;\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//indicate that this is a real iframe\n\t\t\t\t\tthis.IsRealIFrame = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"html\":\n\t\t\t\t//get its parent object and check its tag\n\t\t\t\tswitch (this.Parent ? Get_String(this.Parent.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE], \"\").toLowerCase() : \"\")\n\t\t\t\t{\n\t\t\t\t\tcase \"iframe\":\n\t\t\t\t\tcase \"frame\":\n\t\t\t\t\tcase \"frameset\":\n\t\t\t\t\t\t//not the new iFrame?\n\t\t\t\t\t\tif (!Get_Bool(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE_FORCED], false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//check if the parent has scrolling = no\n\t\t\t\t\t\t\tvar attributeScrollingNo = false;\n\t\t\t\t\t\t\t//obtain the parent's\n\t\t\t\t\t\t\tvar attributes = this.Parent.StyleProperties ? Get_String(this.Parent.Properties[__NEMESIS_PROPERTY_HTML_ATTRIBUTES], null) : null;\n\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\tif (attributes != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//parse attributes (lowercase it just in case);\n\t\t\t\t\t\t\t\tattributes = JSON.parse(attributes.toLowerCase());\n\t\t\t\t\t\t\t\t//check for scrolling\n\t\t\t\t\t\t\t\tattributeScrollingNo = !Get_Bool(attributes[\"scrolling\"], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//we need to copy some properties into our parent\n\t\t\t\t\t\t\tvar properties = [\"overflow\", \"overflow-y\", \"overflow-x\"];\n\t\t\t\t\t\t\t//loop through properties\n\t\t\t\t\t\t\tfor (var i = properties.length; i--;)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//get property\n\t\t\t\t\t\t\t\tvar property = properties[i];\n\t\t\t\t\t\t\t\t//get our value\n\t\t\t\t\t\t\t\tvar ourValue = attributeScrollingNo ? \"hidden\" : this.StyleProperties.Original[property];\n\t\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\t\tif (ourValue)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//force on parent\n\t\t\t\t\t\t\t\t\tthis.Parent.StyleProperties.Original[property] = ourValue;\n\t\t\t\t\t\t\t\t\tthis.Parent.StyleProperties.cssText += property + \":\" + ourValue + \";\";\n\t\t\t\t\t\t\t\t\t//parent already loaded?\n\t\t\t\t\t\t\t\t\tif (this.Parent.HTML)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//switch on property\n\t\t\t\t\t\t\t\t\t\tswitch (property)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflow = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow-x\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflowX = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow-y\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflowY = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//regardless of whatever we do to the parent, the HTML always have a forced overflow\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow-x\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow-y\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += \"overflow:visible;overflow-x:visible;overflow-y:visible;\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "static get styles() {\n return \"\";\n }", "useCSS(_cssText) {\n // Common, standard <style> tag generation in <head>\n const _style = document.createElement('style');\n _style.type = 'text/css';\n _style.media = 'all';\n if (BROWSER_TYPE.safari || BROWSER_TYPE.chrome || BROWSER_TYPE.firefox || BROWSER_TYPE.opera) {\n // This is how to do it in KHTML browsers\n _style.appendChild(document.createTextNode(_cssText));\n }\n else {\n // This works for many others (add more checks, if problems with new browsers)\n _style.textContent = _cssText;\n }\n const _head = document.getElementsByTagName('head')[0];\n _head.appendChild(_style);\n return _style;\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized +=\n delimiter +\n (isCustomProperty\n ? styleName\n : hyphenateStyleName(styleName)) +\n ':';\n serialized += dangerousStyleValue(\n styleName,\n styleValue,\n isCustomProperty,\n );\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "get styleStaticText() { return Object.assign({}, this.style.common); }", "function normalizeStyle(styleStr) {\n var serialized = (0,stylis__WEBPACK_IMPORTED_MODULE_8__.serialize)((0,stylis__WEBPACK_IMPORTED_MODULE_9__.compile)(styleStr), stylis__WEBPACK_IMPORTED_MODULE_8__.stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}", "function s(e){return getComputedStyle(e)}", "function styleString(styleInfo){var o=[];for(var name in styleInfo){var v=styleInfo[name];if(v||v===0){o.push(\"\".concat(camelToDashCase(name),\": \").concat(v));}}return o.join('; ');}", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'float' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'none'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "get styleMsg() { return Object.assign({}, this.style.msg); }", "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name in cssProps) {\n var val = cssProps[name];\n\n if (val != null && val !== '') {\n statements.push(name + ':' + val);\n }\n }\n\n return statements.join(';');\n }", "function cssToStr(cssProps) {\n var statements = [];\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n return statements.join(';');\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function CLC_FetchCSSRawString(styleSheetObj){\r\n var styleSheetRawString;\r\n if (styleSheetObj.ownerNode.tagName.toLowerCase() == \"style\"){\r\n styleSheetRawString = styleSheetObj.ownerNode.innerHTML;\r\n }\r\n return styleSheetRawString;\r\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }" ]
[ "0.6746066", "0.6613922", "0.6602744", "0.6524541", "0.6524541", "0.6438197", "0.6406999", "0.63668555", "0.62984747", "0.6197879", "0.6182385", "0.6169909", "0.61696804", "0.61696804", "0.61656594", "0.61147296", "0.60756344", "0.60756344", "0.60755336", "0.60755336", "0.60755336", "0.60755336", "0.6072733", "0.60725766", "0.6072488", "0.60634124", "0.6061033", "0.6061033", "0.6061033", "0.6061033", "0.60405844", "0.60405844", "0.6035424", "0.5980971", "0.59805703", "0.59749323", "0.5970161", "0.59677553", "0.5947411", "0.5938178", "0.59380126", "0.5920499", "0.59164137", "0.5912556", "0.5902871", "0.5901565", "0.5895141", "0.5893317", "0.58651316", "0.585937", "0.5848281", "0.5848281", "0.5845586", "0.5845586", "0.5845586", "0.5845586", "0.5845586", "0.5829469", "0.5827615", "0.5827615", "0.5827615", "0.5827615", "0.5827615", "0.5827615", "0.5827615", "0.5827615", "0.5823202", "0.5815866", "0.58112156", "0.580478", "0.5802561", "0.58005714", "0.57917386", "0.5787905", "0.5787248", "0.57808846", "0.57797396", "0.5736355", "0.57236403", "0.57202506", "0.5717578", "0.5715881", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714579", "0.5714222", "0.5714222" ]
0.5843909
62
Renderers that don't support persistence can reexport everything from this module.
function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n }", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n } // Persistence (when unsupported)", "onExport() {\n\t\t// you can do work before running the export using this method\n\t\t// (e.g. re-ordering paths for plotting)\n\t}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "export() {\n\t\treturn {}\n\t}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function ExportSave() {\n Gameboy.Core.exportSave();\n}", "function saveAndRender() {\n save();\n render();\n}", "function saveLocalAndRender() {\n localStorage.setItem(\"myLib\", JSON.stringify(myLibrary));\n render(myLibrary);\n}", "function render() {\n renderRegistry();\n renderDirectory();\n renderOverride();\n}", "getExportableObject() {\n return {\n \"Likely Diagnoses\": this.state.listA.map((row) => ({\n Name: row.snomed && row.snomed.display ? row.snomed.display : \"...\",\n \"SNOMED Code\": row.snomed && row.snomed.code ? row.snomed.code : \"...\",\n \"Note\": row.note ? row.note : \"...\"\n })),\n \"Critical Diagnoses\": this.state.listB.map((row) => ({\n Name: row.snomed && row.snomed.display ? row.snomed.display : \"...\",\n \"SNOMED Code\": row.snomed && row.snomed.code ? row.snomed.code : \"...\",\n \"Note\": row.note ? row.note : \"...\"\n })),\n Metadata: {\n // bump this every time you change the format of the export.\n // that way we can handle imports properly.\n \"Schema Version\": 1,\n },\n };\n }", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "function saveAfterLoad () {\n\t\tif (moduleData) {\n\t\t\tmodule.set(moduleData);\n\t\t\tmoduleData = null;\n\n\t\t\tmodule._remains_ = module.dependencies.length;\n\t\t\tmodule.status = LOADED;\n\t\t\tmodule.emit('loaded', this);\n\t\t\tmodule.loadDependencies();\n\t\t} \n\t}", "function ExportReportData() {\n BindOrReloadPurchaseTable('Export');\n}", "function Renderer() {}", "flush()\n {\n this.setObjectRenderer(this.emptyRenderer);\n }", "function saveNameToExportMap(index,def,exportsMap){if(exportsMap){if(def.exportAs)exportsMap[def.exportAs]=index;if(def.template)exportsMap['']=index;}}", "onExport(e) {\n e.preventDefault();\n\n if (!e.target.dataset.action) {\n return;\n }\n\n switch (e.target.dataset.action) {\n case 'copy':\n this.onCopyButtonClick();\n break;\n case 'open-viewer':\n this.sendJSONReport();\n break;\n case 'print':\n this.expandDetailsWhenPrinting();\n window.print();\n break;\n case 'save-json': {\n const jsonStr = JSON.stringify(this.json, null, 2);\n this._saveFile(new Blob([jsonStr], {type: 'application/json'}));\n break;\n }\n case 'save-html': {\n let htmlStr = '';\n\n // Since Viewer generates its page HTML dynamically from report JSON,\n // run the ReportGenerator. For everything else, the page's HTML is\n // already the final product.\n if (e.target.dataset.context !== 'viewer') {\n htmlStr = document.documentElement.outerHTML;\n } else {\n const reportGenerator = new ReportGenerator();\n htmlStr = reportGenerator.generateHTML(this.json, 'cli');\n }\n\n try {\n this._saveFile(new Blob([htmlStr], {type: 'text/html'}));\n } catch (err) {\n logger.error('Could not export as HTML. ' + err.message);\n }\n break;\n }\n }\n\n this.closeExportDropdown();\n document.removeEventListener('keydown', this.onKeyDown);\n }", "function saveStorage() {\n store.set(planner.list.modules, modules.toJSON());\n }", "function _Exporter(babylonScene, options) {\r\n /*\r\n * Specifies if root Babylon empty nodes that act as a coordinate space transform should be included in export\r\n */\r\n this._includeCoordinateSystemConversionNodes = false;\r\n this._extensions = {};\r\n this._glTF = {\r\n asset: { generator: \"BabylonJS\", version: \"2.0\" }\r\n };\r\n this._babylonScene = babylonScene;\r\n this._bufferViews = [];\r\n this._accessors = [];\r\n this._meshes = [];\r\n this._scenes = [];\r\n this._nodes = [];\r\n this._images = [];\r\n this._materials = [];\r\n this._materialMap = [];\r\n this._textures = [];\r\n this._samplers = [];\r\n this._animations = [];\r\n this._imageData = {};\r\n this._options = options || {};\r\n this._animationSampleRate = options && options.animationSampleRate ? options.animationSampleRate : 1 / 60;\r\n this._includeCoordinateSystemConversionNodes = options && options.includeCoordinateSystemConversionNodes ? true : false;\r\n this._glTFMaterialExporter = new _GLTFMaterialExporter(this);\r\n this._loadExtensions();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "afterRender() { }", "afterRender() { }", "function RendererType2(){}", "processPresenter() {\n this.exportDict = this.getExportDict()\n }", "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}" ]
[ "0.6056067", "0.6056067", "0.6056067", "0.6020133", "0.6020133", "0.6020133", "0.6020133", "0.58904916", "0.5828549", "0.5826907", "0.5709882", "0.5709882", "0.5657355", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.5584319", "0.54288846", "0.54288846", "0.54220927", "0.54220927", "0.5390982", "0.5349935", "0.53008", "0.5276268", "0.52738345", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5163965", "0.5135322", "0.5135322", "0.5135322", "0.5135322", "0.5135322", "0.5135322", "0.5135322", "0.5135322", "0.5132846", "0.512681", "0.512119", "0.51100695", "0.51062113", "0.5104607", "0.50995344", "0.50957406", "0.50900245", "0.50860196", "0.50860196", "0.5083", "0.5077835", "0.50763386", "0.50763386" ]
0.62715775
2
1 unit of expiration time represents 10ms.
function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork. return MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms) {\n // 加上偏移量以避免10ms以内的与NoWork冲突\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\n\treturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms) {\n\t // Always add an offset so that we don't clash with the magic number for NoWork.\n\t return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n\t}", "function getExpirationInSeconds () {\n const nowInSeconds = Math.floor(Date.now() / 1000)\n\n return {\n iat: nowInSeconds,\n exp: nowInSeconds + 30\n }\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function calculateExpire() {\n var expiresIn = Math.round((((messageObject.expiresOn-new Date(Date.now())) % 86400000) % 3600000) / 60000); // minutes\n console.log(expiresIn);\n return expiresIn\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}" ]
[ "0.69083685", "0.69083685", "0.69083685", "0.69083685", "0.6728504", "0.66832036", "0.66832036", "0.66832036", "0.6663674", "0.66431606", "0.66385615", "0.65983444", "0.65983444", "0.65983444", "0.6567885", "0.65556103", "0.65173113", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.64938873", "0.64938873", "0.64938873", "0.64938873", "0.6479297", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934" ]
0.68177795
4
The following attributes are only used by interaction tracing builds. They enable interactions to be associated with their async work, And expose interaction metadata to the React DevTools Profiler plugin. Note that these attributes are only defined when the enableSchedulerTracing flag is enabled. Exported FiberRoot type includes all properties, To avoid requiring potentially errorprone :any casts throughout the project. Profiling properties are only safe to access in profiling builds (when enableSchedulerTracing is true). The types are defined separately within this file to ensure they stay in sync. (We don't have to use an inline :any cast when enableSchedulerTracing is disabled.)
function createFiberRoot(containerInfo,isConcurrent,hydrate){// Cyclic construction. This cheats the type system right now because // stateNode is any. var uninitializedFiber=createHostRootFiber(isConcurrent);var root=void 0;if(enableSchedulerTracing){root={current:uninitializedFiber,containerInfo:containerInfo,pendingChildren:null,earliestPendingTime:NoWork,latestPendingTime:NoWork,earliestSuspendedTime:NoWork,latestSuspendedTime:NoWork,latestPingedTime:NoWork,pingCache:null,didError:false,pendingCommitExpirationTime:NoWork,finishedWork:null,timeoutHandle:noTimeout,context:null,pendingContext:null,hydrate:hydrate,nextExpirationTimeToWorkOn:NoWork,expirationTime:NoWork,firstBatch:null,nextScheduledRoot:null,interactionThreadID:tracing.unstable_getThreadID(),memoizedInteractions:new Set(),pendingInteractionMap:new Map()};}else{root={current:uninitializedFiber,containerInfo:containerInfo,pendingChildren:null,pingCache:null,earliestPendingTime:NoWork,latestPendingTime:NoWork,earliestSuspendedTime:NoWork,latestSuspendedTime:NoWork,latestPingedTime:NoWork,didError:false,pendingCommitExpirationTime:NoWork,finishedWork:null,timeoutHandle:noTimeout,context:null,pendingContext:null,hydrate:hydrate,nextExpirationTimeToWorkOn:NoWork,expirationTime:NoWork,firstBatch:null,nextScheduledRoot:null};}uninitializedFiber.stateNode=root;// The reason for the way the Flow types are structured in this file, // Is to avoid needing :any casts everywhere interaction tracing fields are used. // Unfortunately that requires an :any cast for non-interaction tracing capable builds. // $FlowFixMe Remove this :any cast and replace it with something better. return root;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFiberRoot(containerInfo,isConcurrent,hydrate){// Cyclic construction. This cheats the type system right now because\n// stateNode is any.\nvar uninitializedFiber=createHostRootFiber(isConcurrent);var root=void 0;{root={current:uninitializedFiber,containerInfo:containerInfo,pendingChildren:null,earliestPendingTime:NoWork,latestPendingTime:NoWork,earliestSuspendedTime:NoWork,latestSuspendedTime:NoWork,latestPingedTime:NoWork,pingCache:null,didError:false,pendingCommitExpirationTime:NoWork,finishedWork:null,timeoutHandle:noTimeout,context:null,pendingContext:null,hydrate:hydrate,nextExpirationTimeToWorkOn:NoWork,expirationTime:NoWork,firstBatch:null,nextScheduledRoot:null,interactionThreadID:tracing$1.unstable_getThreadID(),memoizedInteractions:new Set(),pendingInteractionMap:new Map()};}uninitializedFiber.stateNode=root;// The reason for the way the Flow types are structured in this file,\n// Is to avoid needing :any casts everywhere interaction tracing fields are used.\n// Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n// $FlowFixMe Remove this :any cast and replace it with something better.\nreturn root;}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracking) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracking.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracking fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracking capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracking) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracking.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracking fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracking capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isAsync, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isAsync);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.contextDependencies = source.contextDependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.firstContextDependency = source.firstContextDependency;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing$$1.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function $__jsx_profiler() {\n}", "_debugInfo() {\n var attributes = ['id'];\n var relationships = {};\n var expensiveProperties = [];\n\n this.eachAttribute((name, meta) => attributes.push(name));\n\n var groups = [{\n name: 'Attributes',\n properties: attributes,\n expand: true\n }];\n\n this.eachRelationship((name, relationship) => {\n var properties = relationships[relationship.kind];\n\n if (properties === undefined) {\n properties = relationships[relationship.kind] = [];\n groups.push({\n name: relationship.name,\n properties,\n expand: true\n });\n }\n properties.push(name);\n expensiveProperties.push(name);\n });\n\n groups.push({\n name: 'Flags',\n properties: ['isLoaded', 'hasDirtyAttributes', 'isSaving', 'isDeleted', 'isError', 'isNew', 'isValid']\n });\n\n return {\n propertyInfo: {\n // include all other mixins / properties (not just the grouped ones)\n includeOtherProperties: true,\n groups: groups,\n // don't pre-calculate unless cached\n expensiveProperties: expensiveProperties\n }\n };\n }", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n pingCache: null,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n pingCache: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n\n var root = void 0;\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n\n didError: false,\n\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root;\n\n // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n return root;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "static get properties() {\n return {\n eventMap: {},\n resourceMap: {},\n releasedElements: {},\n toDrawOnProjectRefresh: new Set()\n };\n }", "constructor() {\n this.startTime = Date.now();\n this.attributes = {\n \"version\": 0.5, \n \"lang\": \"node.js\",\n \"startTime\": this.startTime\n };\n\n this.inspectedCPU = false;\n this.inspectedMemory = false;\n this.inspectedContainer = false;\n this.inspectedPlatform = false;\n this.inspectedLinux = false;\n }", "inspectAll() {\n this.inspectContainer();\n this.inspectPlatform();\n this.inspectLinux();\n this.inspectMemory();\n this.inspectCPU();\n this.addTimeStamp('frameworkRuntime');\n }", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "static get properties() {\n return {\n eventMap: {},\n resourceMap: {},\n releasedElements: {}\n };\n }", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n if (enableProfilerTimer) {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseTime = source.selfBaseTime;\n target.treeBaseTime = source.treeBaseTime;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n }", "static get properties() {\n return {\n label: { type: String },\n value: { type: String },\n disabled: { type: Boolean, reflect: true },\n elevation: { type: Number },\n active: { type: Boolean, reflect: true },\n comingSoon: { type: Boolean, reflect: true, attribute: \"coming-soon\" },\n };\n }", "inspectAllDeltas() {\n\n // Add 'userRuntime' timestamp.\n if (\"frameworkRuntime\" in this.attributes) {\n this.addTimeStamp('userRuntime', this.startTime + this.attributes['frameworkRuntime']);\n }\n\n let deltaTime = Date.now();\n this.inspectCPUDelta();\n this.inspectMemoryDelta();\n this.addTimeStamp(\"frameworkRuntimeDeltas\", deltaTime);\n }", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n var root = void 0;\n\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n pingCache: null,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n pingCache: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root; // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n\n return root;\n }", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n var root = void 0;\n\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n pingCache: null,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n pingCache: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root; // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n\n return root;\n }", "function createFiberRoot(containerInfo, isConcurrent, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber(isConcurrent);\n var root = void 0;\n\n if (enableSchedulerTracing) {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n pingCache: null,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null,\n interactionThreadID: tracing.unstable_getThreadID(),\n memoizedInteractions: new Set(),\n pendingInteractionMap: new Map()\n };\n } else {\n root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n pingCache: null,\n earliestPendingTime: NoWork,\n latestPendingTime: NoWork,\n earliestSuspendedTime: NoWork,\n latestSuspendedTime: NoWork,\n latestPingedTime: NoWork,\n didError: false,\n pendingCommitExpirationTime: NoWork,\n finishedWork: null,\n timeoutHandle: noTimeout,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextExpirationTimeToWorkOn: NoWork,\n expirationTime: NoWork,\n firstBatch: null,\n nextScheduledRoot: null\n };\n }\n\n uninitializedFiber.stateNode = root; // The reason for the way the Flow types are structured in this file,\n // Is to avoid needing :any casts everywhere interaction tracing fields are used.\n // Unfortunately that requires an :any cast for non-interaction tracing capable builds.\n // $FlowFixMe Remove this :any cast and replace it with something better.\n\n return root;\n }", "function harness() {\n return (\n <div>\n <p>{'Each example below will trigger an event which can be verified by opening the dev tools and viewing the message logged to the console.'}</p>\n <h3>{'Icon Key'}</h3>\n <dl className=\"harness-dl\">\n <dt className=\"harness-dt\">\n <svg className=\"text-success\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" strokeLinecap=\"square\" strokeMiterlimit=\"10\" xmlns=\"http://www.w3.org/2000/svg\">\n <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref=\"#success\"/>\n </svg>\n </dt>\n <dd className=\"harness-dd\">\n {'Successfully triggered event with expected configuration.'}\n </dd>\n <dt className=\"harness-dt\">\n <svg className=\"text-danger\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" strokeLinecap=\"square\" strokeMiterlimit=\"10\" xmlns=\"http://www.w3.org/2000/svg\">\n <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref=\"#error\"/>\n </svg>\n </dt>\n <dd className=\"harness-dd\">\n {'Expected event did not trigger with the expected configuration.'}\n </dd>\n </dl>\n <h1>{'TrackingProvider and TrackingContext contextType'}</h1>\n <p>{'All these events have been setup to trigger on mount but can be manually triggered by clicking the related button.'}</p>\n <h2>{'Provider with no payload or options.'}</h2>\n <TrackingChecker expected={{\n event: 'generic.click',\n payload: {},\n options: {}}}\n >\n <EventButton label={'Generate generic.click'} />\n </TrackingChecker>\n\n <h2>{'Provider with payload and no options.'}</h2>\n <TrackingChecker payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness'\n }} expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'left',\n eventcategory: 'harness'\n },\n options: {}}}\n >\n <EventButton label={'Generate generic.click'} />\n </TrackingChecker>\n\n <h2>{'Nested Provider with payload and no options.'}</h2>\n <TrackingProvider payload={{'actionlocation': 'top'}}>\n <TrackingChecker\n payload={{'eventcategory': 'harness'}}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'top',\n eventcategory: 'harness'\n },\n options: {}}}\n >\n <EventButton label={'Generate generic.click'} />\n </TrackingChecker>\n </TrackingProvider>\n\n <h2>{'Nested Provider with field overrides and no options.'}</h2>\n <TrackingProvider payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'junk'}}\n >\n <TrackingChecker\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'harness'}}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'top',\n eventcategory: 'harness'\n },\n options: {}}}\n >\n <EventButton label={'Generate generic.click'}/>\n </TrackingChecker>\n </TrackingProvider>\n\n <h2>{'Provider with payload and eventPayload with no options.'}</h2>\n <TrackingChecker\n payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness'\n }} eventPayload={{\n 'generic.click': {\n 'eventlabel': 'custom'\n },\n 'ignore.event': {\n 'display': 'no it should not'\n }\n }}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'left',\n eventcategory: 'harness',\n eventlabel: 'custom'\n },\n options: {}}}\n >\n <EventButton label={'Generate generic.click'}/>\n </TrackingChecker>\n\n <h2>{'Nested Provider with payload and eventPayload with no options.'}</h2>\n <TrackingProvider\n payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness',\n 'eventvalue': 'a value'\n }} eventPayload={{\n 'generic.click': {\n 'eventlabel': 'skip',\n 'highfrequency': 'false'\n },\n 'ignore.event': {\n 'display': 'no it should not'\n }\n }}\n >\n <TrackingChecker\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n }}\n eventPayload={{\n 'generic.click': {\n 'eventlabel': 'custom'\n }\n }}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'top',\n eventcategory: 'test',\n eventvalue: 'a value',\n eventlabel: 'custom',\n highfrequency: 'false'\n },\n options: {}}}\n >\n <EventButton label={'Generate generic.click'}/>\n </TrackingChecker>\n </TrackingProvider>\n\n <h2>{'Nested Provider with payload, eventPayload, options and eventOptions.'}</h2>\n <TrackingProvider payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness',\n 'eventvalue': 'a value'\n }} eventPayload={{\n 'generic.click': {\n 'eventlabel': 'skip',\n 'highfrequency': 'false'\n },\n 'ignore.event': {\n 'display': 'no it should not'\n }\n }} eventOptions={{\n 'generic.click': {\n 'delayProcessing': '100'\n }\n }} options={{\n 'delayProcessing': '200'\n }}\n >\n <TrackingChecker\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n }}\n eventPayload={{\n 'generic.click': {\n 'eventlabel': 'custom'\n }\n }}\n eventOptions={{\n 'generic.click': {\n 'maxWaitTime': '300'\n }\n }}\n options={{\n 'maxWaitTime': '400'\n }}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'top',\n eventcategory: 'test',\n eventvalue: 'a value',\n eventlabel: 'custom',\n highfrequency: 'false'\n },\n options: {\n delayProcessing: '100',\n maxWaitTime: '300'\n }}}\n >\n <EventButton label={'Generate generic.click'}/>\n </TrackingChecker>\n </TrackingProvider>\n\n <h2>{'Provider with component consuming multiple contexts with one of them being contextType.'}</h2>\n <TrackingChecker\n payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness'\n }}\n expected={{\n event: 'generic.click',\n payload: {\n actionlocation: 'left',\n eventcategory: 'harness'\n },\n options: {}}}\n >\n <SecondContextChecker\n value={SECONDCONTEXT}\n expected={SECONDCONTEXT}\n >\n <EventButtonMultipleContext label={'Generate generic.click'}/>\n </SecondContextChecker>\n </TrackingChecker>\n\n <h1>{'TrackingTrigger'}</h1>\n\n <h2>{'Trigger with no payload or options.'}</h2>\n <TrackingChecker\n expected={{\n event: 'generic.click',\n payload: {},\n options: {}}}\n >\n <TrackingTrigger event={'generic.click'}/>\n <span>{'generic.click'}</span>\n </TrackingChecker>\n\n <h2>{'Trigger with payload and options for TrackingTrigger.'}</h2>\n <TrackingChecker\n expected={{\n event: 'generic.click',\n payload: {\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n },\n options: {\n 'delayProcessing': '200'\n }}}\n >\n <TrackingTrigger event={'generic.click'}\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n }}\n options={{\n 'delayProcessing': '200'\n }}\n />\n <span>{'generic.click'}</span>\n </TrackingChecker>\n\n <h2>{'Trigger with payload and options for TrackingTrigger and TrackingProvider with payload and options.'}</h2>\n <TrackingChecker\n payload={{\n 'actionlocation': 'left',\n 'eventcategory': 'harness',\n 'eventvalue': 'a value'\n }}\n eventPayload={{\n 'generic.click': {\n 'eventlabel': 'skip',\n 'highfrequency': 'false'\n },\n 'ignore.event': {\n 'display': 'no it should not'\n }\n }}\n eventOptions={{\n 'generic.click': {\n 'delayProcessing': '100',\n 'maxWaitTime': '500'\n }\n }}\n options={{\n 'delayProcessing': '200'\n }}\n expected={{\n event: 'generic.click',\n payload: {\n 'actionlocation': 'top',\n 'eventcategory': 'test',\n 'eventvalue': 'a value',\n 'eventlabel': 'skip',\n 'highfrequency': 'false'\n },\n options: {\n 'delayProcessing': '300',\n 'maxWaitTime': '500'\n }}}\n >\n <TrackingTrigger event={'generic.click'}\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n }}\n options={{\n 'delayProcessing': '300'\n }}\n />\n <span>{'generic.click'}</span>\n </TrackingChecker>\n\n <h2>{'Trigger with no provider should not cause hard failure.'}</h2>\n <TrackingTrigger event={'generic.click'}\n payload={{\n 'actionlocation': 'top',\n 'eventcategory': 'test'\n }}\n options={{\n 'delayProcessing': '200'\n }}\n />\n </div>\n );\n}", "function FluiContext() {\n var events = [];\n \n this._listeners = function (event) {\n if (events[event] === undefined) {\n events[event] = [];\n }\n\n return events[event];\n }\n }", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n }\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n }", "static get observedAttributes() {\n return ['data'];\n }", "static describe(): any {\n return merge(super.describe(), {\n NativeProps: {\n pointerEvents: 'string',\n hitSlop: 'number',\n cursorVisibilitySlop: 'number',\n billboarding: 'string',\n },\n });\n }", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}", "function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoContext);\n }\n\n // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n target.tag = source.tag;\n target.key = source.key;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target['return'] = source['return'];\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.alternate = source.alternate;\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n return target;\n}" ]
[ "0.5403074", "0.501894", "0.501894", "0.50066847", "0.50066847", "0.49931163", "0.49931163", "0.49931163", "0.49931163", "0.49931163", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49729648", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49675214", "0.49559176", "0.49559176", "0.49559176", "0.49559176", "0.49559176", "0.49559176", "0.49559176", "0.49508518", "0.49482167", "0.49371395", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.49185696", "0.48750645", "0.48750645", "0.48750645", "0.48750645", "0.48750645", "0.48750645", "0.48650116", "0.48650116", "0.48650116", "0.48650116", "0.48650116", "0.48480558", "0.4810092", "0.48003682", "0.47800502", "0.47800502", "0.47800502", "0.47800502", "0.4749086", "0.4716211", "0.46531025", "0.46376023", "0.4613569", "0.4613569", "0.4613569", "0.46115744", "0.46043262", "0.45999283", "0.45904955", "0.45780507", "0.45761696", "0.45761696", "0.45761696", "0.45761696", "0.45761696", "0.45761696" ]
0.57750165
0
TODO: Offscreen updates should never suspend. However, a promise that suspended inside an offscreen subtree should be able to ping at the priority of the outer render.
function markPendingPriorityLevel(root,expirationTime){// If there's a gap between completing a failed root and retrying it, // additional updates may be scheduled. Clear `didError`, in case the update // is sufficient to fix the error. root.didError=false;// Update the latest and earliest pending times var earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime===NoWork){// No other pending updates. root.earliestPendingTime=root.latestPendingTime=expirationTime;}else{if(earliestPendingTime<expirationTime){// This is the earliest pending update. root.earliestPendingTime=expirationTime;}else{var latestPendingTime=root.latestPendingTime;if(latestPendingTime>expirationTime){// This is the latest pending update root.latestPendingTime=expirationTime;}}}findNextExpirationTimeToWorkOn(expirationTime,root);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (\n workInProgressSuspendedReason === SuspendedOnData &&\n workInProgressRoot === root\n ) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n }", "async _enqueueUpdate(){// Mark state updating...\nthis._updateState=this._updateState|STATE_UPDATE_REQUESTED;let resolve,reject;const previousUpdatePromise=this._updatePromise;this._updatePromise=new Promise((res,rej)=>{resolve=res;reject=rej});try{// Ensure any previous update has resolved before updating.\n// This `await` also ensures that property changes are batched.\nawait previousUpdatePromise}catch(e){}// Ignore any previous errors. We only care that the previous cycle is\n// done. Any error should have been handled in the previous update.\n// Make sure the element has connected before updating.\nif(!this._hasConnected){await new Promise(res=>this._hasConnectedResolver=res)}try{const result=this.performUpdate();// If `performUpdate` returns a Promise, we await it. This is done to\n// enable coordinating updates with a scheduler. Note, the result is\n// checked to avoid delaying an additional microtask unless we need to.\nif(null!=result){await result}}catch(e){reject(e)}resolve(!this._hasRequestedUpdate)}", "async _enqueueUpdate(){this._updateState|=STATE_UPDATE_REQUESTED;let e,t;const n=this._updatePromise;this._updatePromise=new Promise((n,r)=>{e=n,t=r});try{// Ensure any previous update has resolved before updating.\n// This `await` also ensures that property changes are batched.\nawait n}catch(t){}// Ignore any previous errors. We only care that the previous cycle is\n// done. Any error should have been handled in the previous update.\n// Make sure the element has connected before updating.\nthis._hasConnected||(await new Promise(e=>this._hasConnectedResolver=e));try{const e=this.performUpdate();// If `performUpdate` returns a Promise, we await it. This is done to\n// enable coordinating updates with a scheduler. Note, the result is\n// checked to avoid delaying an additional microtask unless we need to.\nnull!=e&&(await e)}catch(n){t(n)}e(!this._hasRequestedUpdate)}", "forceUpdate() {\n if (this[_queuedUpdate]) {\n this[_dirty] = true;\n return;\n }\n\n this[_virtualRender]();\n this[_queuedUpdate] = true;\n\n TaskQueue.push(() => {\n if (this[_dirty] && !this.isDisposed) {\n this[_virtualRender]();\n this[_dirty] = false;\n }\n this[_queuedUpdate] = false;\n });\n }", "static whenDOMUpdated() {\n\t\tif (renderTaskPromise) {\n\t\t\treturn renderTaskPromise;\n\t\t}\n\n\t\trenderTaskPromise = new Promise(resolve => {\n\t\t\trenderTaskPromiseResolve = resolve;\n\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\tif (invalidatedWebComponents.getList().length === 0) {\n\t\t\t\t\trenderTaskPromise = undefined;\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn renderTaskPromise;\n\t}", "function waitForUpdate(inspector) {\n return inspector.once(\"layoutview-updated\");\n}", "if (rootWithPendingPassiveEffects !== null) {\n // Cache the root since rootWithPendingPassiveEffects is cleared in\n // flushPassiveEffectsImpl\n const root = rootWithPendingPassiveEffects;\n // Cache and clear the remaining lanes flag; it must be reset since this\n // method can be called from various places, not always from commitRoot\n // where the remaining lanes are known\n const remainingLanes = pendingPassiveEffectsRemainingLanes;\n pendingPassiveEffectsRemainingLanes = NoLanes;\n\n const renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n const priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n const prevTransition = ReactCurrentBatchConfig.transition;\n const previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n\n // Once passive effects have run for the tree - giving components a\n // chance to retain cache instances they use - release the pooled\n // cache at the root (if there is one)\n releaseRootPooledCache(root, remainingLanes);\n }\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "async _enqueueUpdate() {\n // Mark state updating...\n this._updateState = this._updateState | STATE_UPDATE_REQUESTED;\n let resolve;\n const previousUpdatePromise = this._updatePromise;\n this._updatePromise = new Promise((res) => resolve = res);\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await previousUpdatePromise;\n // Make sure the element has connected before updating.\n if (!this._hasConnected) {\n await new Promise((res) => this._hasConnectedResolver = res);\n }\n // Allow `performUpdate` to be asynchronous to enable scheduling of updates.\n const result = this.performUpdate();\n // Note, this is to avoid delaying an additional microtask unless we need\n // to.\n if (result != null &&\n typeof result.then === 'function') {\n await result;\n }\n resolve(!this._hasRequestedUpdate);\n }", "mainLoop() {\n return new Promise((resolve, reject) => {\n renderLoop(() => {\n // switch to another scene\n if (G.scene !== this) {\n G.lock.sceneSwitch = true;\n resolve();\n return false;\n }\n this.calcRepaintItems();\n this.update();\n });\n });\n }", "function updatePromo() { }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function _innerUpdate() {\n if (playback.state.value == Playback$STATE_NORMAL) {\n checkForSafeBufferLevel();\n }\n }", "async performUpdate() {\n await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n super.performUpdate();\n }", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber[\"return\"];var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node[\"return\"]===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node[\"return\"];}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "componentDidUpdate(){\n this.pageScrollTo();\n\n //automated pre render\n if( this.state.isLoaded && window.c && window.c.length > 2 ){\n console.log( \"Pre-rendering...\" );\n\n //Prerender.writeHTMLPrerender();\n this.shouldPreRender({mainPageRendered: true});\n }\n }", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber.return;var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node.return===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node.return;}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber.return;var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node.return===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node.return;}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "discoverWork_() {\n // TODO(dvoytenko): vsync separation may be needed for different phases\n\n const now = this.win.Date.now();\n\n // Ensure all resources layout phase complete; when relayoutAll is requested\n // force re-layout.\n const {\n elementsThatScrolled_: elementsThatScrolled,\n relayoutAll_: relayoutAll,\n relayoutTop_: relayoutTop,\n } = this;\n this.relayoutAll_ = false;\n this.relayoutTop_ = -1;\n\n // Phase 1: Build and relayout as needed. All mutations happen here.\n let relayoutCount = 0;\n let remeasureCount = 0;\n for (let i = 0; i < this.resources_.length; i++) {\n const r = this.resources_[i];\n if (\n r.getState() == ResourceState_Enum.NOT_BUILT &&\n !r.isBuilding() &&\n !r.element.R1()\n ) {\n this.buildOrScheduleBuildForResource_(r, /* checkForDupes */ true);\n }\n\n if (\n relayoutAll ||\n !r.hasBeenMeasured() ||\n // NOT_LAID_OUT is the state after build() but before measure().\n r.getState() == ResourceState_Enum.NOT_LAID_OUT\n ) {\n relayoutCount++;\n }\n if (r.isMeasureRequested()) {\n remeasureCount++;\n }\n }\n\n // Phase 2: Remeasure if there were any relayouts. Unfortunately, currently\n // there's no way to optimize this. All reads happen here.\n let toUnload;\n if (\n relayoutCount > 0 ||\n remeasureCount > 0 ||\n relayoutAll ||\n relayoutTop != -1 ||\n elementsThatScrolled.length > 0\n ) {\n for (let i = 0; i < this.resources_.length; i++) {\n const r = this.resources_[i];\n if ((r.hasOwner() && !r.isMeasureRequested()) || r.element.R1()) {\n // If element has owner, and measure is not requested, do nothing.\n continue;\n }\n let needsMeasure =\n relayoutAll ||\n r.getState() == ResourceState_Enum.NOT_LAID_OUT ||\n !r.hasBeenMeasured() ||\n r.isMeasureRequested() ||\n (relayoutTop != -1 && r.getLayoutBox().bottom >= relayoutTop);\n\n if (!needsMeasure) {\n for (let i = 0; i < elementsThatScrolled.length; i++) {\n // TODO(jridgewell): Need to figure out how ShadowRoots and FIEs\n // should behave in this model. If the ShadowRoot's host scrolls,\n // do we need to invalidate inside the shadow or light tree? Or if\n // the FIE's iframe parent scrolls, do we?\n if (elementsThatScrolled[i].contains(r.element)) {\n needsMeasure = true;\n break;\n }\n }\n }\n\n if (needsMeasure) {\n const isDisplayed = this.measureResource_(r);\n if (!isDisplayed) {\n if (!toUnload) {\n toUnload = [];\n }\n toUnload.push(r);\n }\n }\n }\n }\n elementsThatScrolled.length = 0;\n\n // Unload all in one cycle.\n if (toUnload) {\n this.unloadResources_(toUnload);\n }\n\n const viewportRect = this.viewport_.getRect();\n // Load viewport = viewport + 3x up/down when document is visible.\n let loadRect;\n if (this.visible_) {\n loadRect = expandLayoutRect(viewportRect, 0.25, 2);\n } else {\n loadRect = viewportRect;\n }\n\n const visibleRect = this.visible_\n ? // When the doc is visible, consider the viewport to be 25% larger,\n // to minimize effect from small scrolling and notify things that\n // they are in viewport just before they are actually visible.\n expandLayoutRect(viewportRect, 0.25, 0.25)\n : viewportRect;\n\n // Phase 3: Set inViewport status for resources.\n for (let i = 0; i < this.resources_.length; i++) {\n const r = this.resources_[i];\n if (\n r.getState() == ResourceState_Enum.NOT_BUILT ||\n r.hasOwner() ||\n r.element.R1()\n ) {\n continue;\n }\n // Note that when the document is not visible, neither are any of its\n // elements to reduce CPU cycles.\n // TODO(dvoytenko, #3434): Reimplement the use of `isFixed` with\n // layers. This is currently a short-term fix to the problem that\n // the fixed elements get incorrect top coord.\n const shouldBeInViewport =\n this.visible_ && r.isDisplayed() && r.overlaps(visibleRect);\n r.setInViewport(shouldBeInViewport);\n }\n\n // Phase 4: Schedule elements for layout within a reasonable distance from\n // current viewport.\n if (loadRect) {\n for (let i = 0; i < this.resources_.length; i++) {\n const r = this.resources_[i];\n // TODO(dvoytenko): This extra build has to be merged with the\n // scheduleLayoutOrPreload method below.\n // Build all resources visible, measured, and in the viewport.\n if (\n !r.isBuilt() &&\n !r.isBuilding() &&\n !r.hasOwner() &&\n !r.element.R1() &&\n r.hasBeenMeasured() &&\n r.isDisplayed() &&\n r.overlaps(loadRect)\n ) {\n this.buildOrScheduleBuildForResource_(\n r,\n /* checkForDupes */ true,\n /* ignoreQuota */ true\n );\n }\n if (\n r.getState() != ResourceState_Enum.READY_FOR_LAYOUT ||\n r.hasOwner()\n ) {\n continue;\n }\n // TODO(dvoytenko, #3434): Reimplement the use of `isFixed` with\n // layers. This is currently a short-term fix to the problem that\n // the fixed elements get incorrect top coord.\n if (r.isDisplayed() && r.overlaps(loadRect)) {\n this.scheduleLayoutOrPreload(r, /* layout */ true);\n }\n }\n }\n\n if (this.visible_ && this.isIdle_(now)) {\n // Phase 5: Idle Render Outside Viewport layout: layout up to 4 items\n // with idleRenderOutsideViewport true\n let idleScheduledCount = 0;\n for (\n let i = 0;\n i < this.resources_.length && idleScheduledCount < 4;\n i++\n ) {\n const r = this.resources_[i];\n if (\n r.getState() == ResourceState_Enum.READY_FOR_LAYOUT &&\n !r.hasOwner() &&\n !r.element.R1() &&\n r.isDisplayed() &&\n r.idleRenderOutsideViewport()\n ) {\n dev().fine(TAG_, 'idleRenderOutsideViewport layout:', r.debugid);\n this.scheduleLayoutOrPreload(r, /* layout */ false);\n idleScheduledCount++;\n }\n }\n // Phase 6: Idle layout: layout more if we are otherwise not doing much.\n // TODO(dvoytenko): document/estimate IDLE timeouts and other constants\n for (\n let i = 0;\n i < this.resources_.length && idleScheduledCount < 4;\n i++\n ) {\n const r = this.resources_[i];\n if (\n r.getState() == ResourceState_Enum.READY_FOR_LAYOUT &&\n !r.hasOwner() &&\n !r.element.R1() &&\n r.isDisplayed()\n ) {\n dev().fine(TAG_, 'idle layout:', r.debugid);\n this.scheduleLayoutOrPreload(r, /* layout */ false);\n idleScheduledCount++;\n }\n }\n }\n }", "doUpdate () {\n\t\tif (! this.isDisplayConditionActive) {\n\t\t\tthis.setPaused (false);\n\t\t\tthis.clearStage ();\n\t\t\treturn;\n\t\t}\n\t\tconst monitorstatus = App.systemAgent.agentControl.getLocalAgent ().lastStatus.monitorServerStatus;\n\t\tif ((typeof monitorstatus != \"object\") || (monitorstatus == null)) {\n\t\t\tthis.setPaused (false);\n\t\t\tthis.clearStage ();\n\t\t\treturn;\n\t\t}\n\t\tthis.monitorStatus = monitorstatus;\n\t\tif (this.stage == \"\") {\n\t\t\tthis.setStage (Initializing);\n\t\t}\n\t}", "update() {\n this.poll();\n }", "async _enqueueUpdate() {\n // Mark state updating...\n this._updateState = this._updateState | STATE_UPDATE_REQUESTED;\n let resolve;\n let reject;\n const previousUpdatePromise = this._updatePromise;\n this._updatePromise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await previousUpdatePromise;\n }\n catch (e) {\n // Ignore any previous errors. We only care that the previous cycle is\n // done. Any error should have been handled in the previous update.\n }\n // Make sure the element has connected before updating.\n if (!this._hasConnected) {\n await new Promise((res) => this._hasConnectedResolver = res);\n }\n try {\n const result = this.performUpdate();\n // If `performUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n }\n catch (e) {\n reject(e);\n }\n resolve(!this._hasRequestedUpdate);\n }", "if (\n rootWithPendingPassiveEffects !== null &&\n rootWithPendingPassiveEffects.tag === LegacyRoot &&\n (executionContext & (RenderContext | CommitContext)) === NoContext\n ) {\n flushPassiveEffects();\n }", "async _enqueueUpdate(){this._updateState=this._updateState|STATE_UPDATE_REQUESTED;try{// Ensure any previous update has resolved before updating.\n// This `await` also ensures that property changes are batched.\nawait this._updatePromise;}catch(e){// Ignore any previous errors. We only care that the previous cycle is\n// done. Any error should have been handled in the previous update.\n}const result=this.performUpdate();// If `performUpdate` returns a Promise, we await it. This is done to\n// enable coordinating updates with a scheduler. Note, the result is\n// checked to avoid delaying an additional microtask unless we need to.\nif(result!=null){await result;}return !this._hasRequestedUpdate;}", "componentDidUpdate(prevProps) {\n // const { checkExtensionLockStatus } = this.props;\n // checkExtensionLockStatus().then(() => {\n this.fetchData(prevProps);\n // });\n }", "whenRemoteResponsive () {\n return new Promise(function (resolve) {\n setTimeout(resolve, 100);\n })\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function processQueue(){if(updateQueue.length){ReactComponentEnvironment.processChildrenUpdates(updateQueue,markupQueue);clearQueue();}}", "function processQueue(){if(updateQueue.length){ReactComponentEnvironment.processChildrenUpdates(updateQueue,markupQueue);clearQueue();}}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n await this.__updatePromise;\n } catch (e) {\n Promise.reject(e);\n }\n const result2 = this.scheduleUpdate();\n if (result2 != null) {\n await result2;\n }\n return !this.isUpdatePending;\n }", "_onScreen() {\n return this.arena;\n }", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderLanes);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.flags|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.flags&DidCapture)!==NoFlags;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderLanes);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// In legacy mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderLanes);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.flags|=DidCapture;}else {var didSuspendBefore=current!==null&&(current.flags&DidCapture)!==NoFlags;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderLanes);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// In legacy mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else {switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else {// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "_ensurePowerOnState() {\n\t\treturn new Promise(resolve => {\n\t\t\tif (noble.state === 'poweredOn') {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlogDebug('waiting for adapter state change');\n\t\t\tnoble.on('stateChange', state => {\n\t\t\t\tif (state === 'poweredOn') {\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "async function lockPromise() {\n await document.documentElement.requestFullscreen();\n const value = await screen.orientation.lock(\"any\");\n console.log(`${value} should be undefined`);\n}", "function main () {\n var now = Date.now()\n var delta = now - then\n\n update(delta / 1000)\n render()\n\n then = now\n\n // Request to do this again ASAP\n window.requestAnimationFrame(main)\n}", "async function afterNextPaint() {\n\t// Usually, we just advise raf + setTimeout(0) here...\n\t// But I'm using yield() for highest odds to get scheduled.\n\t// The first \"real\" requestPostAnimationFrame() polyfill? :)\n\treturn new Promise(resolve => requestAnimationFrame(async () => {\n\t\tawait scheduler.yield();\n\t\tresolve();\n\t}));\n}", "nextUpdate() {\n return new Promise(updateQueue.enqueue);\n }", "function updateAutoAttach(newState) {\r\n currentState = currentState.then(async ({ context, state: oldState }) => {\r\n if (newState === oldState) {\r\n return { context, state: oldState };\r\n }\r\n if (oldState !== null) {\r\n updateStatusBar(context, oldState, true);\r\n }\r\n await transitions[newState](context);\r\n isTemporarilyDisabled = false;\r\n updateStatusBar(context, newState, false);\r\n return { context, state: newState };\r\n });\r\n}", "_FBPReady() {\n super._FBPReady();\n // this._FBPTraceWires()\n\n this.updateComplete.then(() => {\n if (window.ResizeObserver) {\n const ro = new ResizeObserver(entries => {\n window.requestAnimationFrame(() => {\n for (const entry of entries) {\n this._checkSize(entry.contentRect.width);\n }\n });\n });\n ro.observe(this);\n } else {\n // fallback, just listen to the resize event\n setTimeout(() => {\n const cr = this.getBoundingClientRect();\n this._checkSize(cr.width);\n }, 1);\n\n window.addEventListener('resize', () => {\n const cr = this.getBoundingClientRect();\n this._checkSize(cr.width);\n });\n }\n });\n }", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "componentDidUpdate() {\n this.updateOverflow();\n }", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "poll () {\n console.log('Polling'.cyan);\n\n Promise\n .all([\n PS.get(),\n PS.getCPUTime()\n ])\n .then(\n results => {\n try {\n // free mem\n this.sockets.forEach(socket => socket.emit('free mem', os.freemem()));\n\n let [ processes, cpu ] = results;\n\n this.processes = processes;\n console.log(`Got ${processes.length} processes`.green);\n this.broadcast('ps', processes);\n\n let time = cpu.totalTime - this.cpu.totalTime;\n let idle = cpu.idleTime - this.cpu.idleTime;\n\n let load = ( ( time - idle ) / time );\n\n console.log('comparing', cpu, this.cpu, { load });\n\n this.cpu = cpu;\n\n this.cpu.load = load;\n\n console.log('load average', (os.loadavg()[0] / 8 * 100) + load);\n\n this.broadcast('cpu load', (os.loadavg()[0] / 8 * 100) + load);\n\n setTimeout(this.poll.bind(this), 2500);\n }\n catch ( error ) {\n this.emit('error', error);\n }\n },\n error => this.emit('error', error)\n );\n }", "_updateZOrder() {}", "function processNextUpdateRequest() {\n if(vis_queue.length > 0) {\n let temp = vis_queue.pop();\n update(temp.svg, temp.pack, temp.path, temp.id, temp.cb_keyword);\n } else {\n hook_busy = false;\n }\n}", "forceRender() {\n window.requestAnimationFrame(() => {\n this.$forceUpdate();\n });\n }", "beginUpdate(){\n if (this.nativeElement.isRendered) {\n this.nativeElement.beginUpdate();\n }\n else\n {\n this.nativeElement.whenRendered(() => {\n this.nativeElement.beginUpdate();\n });\n }\n }", "function _innerUpdate() {\n if (playback.state.value == Playback$STATE_NORMAL) {\n checkForSafeBufferLevel();\n _currentDownloaderState.update();\n }\n }", "suspend() {\n if (this.state_ === WindowState.LAUNCHING) {\n console.error('Call suspend() while window is still launching.');\n return;\n }\n this.state_ = WindowState.SUSPENDING;\n this.foregroundOps_.suspend();\n }", "function pollForCPUInfo() {\n chrome.system.cpu.getInfo(function(info) {\n CPU_info = info;\n setTimeout(pollForCPUInfo, POLL_TIME_DELAY);\n });\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n\n var suspenseContext = suspenseStackCursor.current;\n\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail = void 0;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while (row !== null) {\n var currentRow = row.alternate;\n // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n }\n // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n\n var suspenseContext = suspenseStackCursor.current;\n\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail = void 0;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while (row !== null) {\n var currentRow = row.alternate;\n // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n }\n // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n return workInProgress.child;\n}", "static tickFullUpdate() {\n let updateParcel = {\n text: \"\",\n color: \"#d352ad\",\n tooltip: \"\"\n };\n\n this.refreshState()\n .then((timerState) => {\n console.debug('[Net]', '(API status result)', timerState);\n\n this.handleTimerState(timerState, updateParcel);\n this.networkOk = true;\n })\n .catch((err) => {\n console.warn('[Net]', '(API status fetch failed)', err);\n\n updateParcel.text = \"!\";\n updateParcel.color = \"#e74c3c\";\n updateParcel.tooltip = \"Communication error\";\n\n this.networkOk = false;\n })\n .then(() => {\n this.applyBadgeConfig(updateParcel);\n });\n }", "forceUpdate() {\n if (!RenderDebounce.has(this)) {\n RenderDebounce.set(this, new Promise(resolve => setTimeout(() => {\n RenderDebounce.delete(this);\n\n this.componentWillReceiveProps(this.props, this.state);\n\n resolve(this[$$render]());\n })));\n }\n\n return RenderDebounce.get(this);\n }", "function safeRefreshNotifyState(state)\n {\n // Only update mainpage if there is no owner or we are the owner.\n if(mainpage.dataset.owner === PANEOWNER.NONE || mainpage.dataset.owner === PANEOWNER.ATHENS) {\n if (state === 0) {\n mainpage.dataset.state = \"none\";\n }\n else {\n if (!mainpage.dataset.state || mainpage.dataset.state === \"none\") {\n mainpage.dataset.state = \"notify\";\n }\n } \n requestParentSizeChange();\n }\n }", "renderInsidePatch() {\n\t\tif (this.component_.wasRendered && !this.shouldUpdate(this.changes_)) {\n\t\t\tthis.skipRerender_();\n\t\t\treturn;\n\t\t}\n\t\tthis.renderInsidePatchDontSkip_();\n\t}", "doLoadingScreen(loadingMs){\n var promise1 = new Promise(resolve => setTimeout(resolve, loadingMs));\n\n return promise1;\n }", "function touchLastRequested(){\n\tlastRequestedMs = new Date().getTime();\n\n\t// if it was not running, we run it\n\tif (!on){\n\t\ton = true;\n\t\tconsole.log(\"os-usage.js - starting top.fetch every \" + (delay/1000) + \"s\");\n\t\ttopFetch();\n\t}\n\n}", "_suspendPresentationLayerUpdates() {\n this._suspendCATransaction = true;\n }", "function updateElements() { //Main loop logic here.\r\n updateResourceDisplay();\r\n updateCoreDisplay();\r\n}", "async update_() {\n if (this.lockingUpdate_) {\n if (this.pendingUpdate_) {\n return;\n }\n this.pendingUpdate_ = (async () => {\n while (this.lockingUpdate_) {\n try {\n await this.lockingUpdate_;\n } catch (e) {\n // Ignore exception from waiting for existing update.\n }\n }\n this.lockingUpdate_ = this.pendingUpdate_;\n this.pendingUpdate_ = null;\n await this.doUpdate_();\n this.lockingUpdate_ = null;\n })();\n } else {\n this.lockingUpdate_ = (async () => {\n await this.doUpdate_();\n this.lockingUpdate_ = null;\n })();\n }\n }", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "async handle_update() {\n\t\tthis.new_worker = await navigator.serviceWorker.getRegistration();\n\t\tif (this.new_worker.waiting) {\n\t\t\tthis.promote_app_update();\n\t\t}\n\t}", "function prerender() {\n if (tileEngine.layers) {\n tileEngine.layers.forEach(layer => {\n layerMap[layer.name] = layer;\n\n if (layer.visible !== false) {\n tileEngine._r(layer, offscreenContext);\n }\n });\n }\n }", "function poll(el) {\n observedElements.push(el);\n if (observedElements.length === 1)\n rafID = requestAnimationFrame(checkStyles);\n}", "if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n }", "renderui(){\n this.events.emit('updateresources', {\n currenthp: this.player.currenthp,\n maxhp: this.player.maxhp,\n currentend: this.player.currentend,\n maxend: this.player.maxend,\n currentmana: this.player.currentmana,\n maxmana: this.player.maxmana,\n target: this.player.target ? this.player.target : null\n })\n this.events.emit('updateabilities',{\n gcd: this.GCD.timer ? Math.floor(this.GCD.timer.getProgress() * 1000) : 1000, //it starts in sub 1 levels \n value: this.GCD.value\n })\n }", "_updateAttachedFlag() {\n // Calculate active flag.\n let newAttached = this.isAttached();\n if (this._attached !== newAttached) {\n this._attached = newAttached;\n\n let children = this._children.get();\n if (children) {\n let m = children.length;\n if (m > 0) {\n for (let i = 0; i < m; i++) {\n children[i]._updateAttachedFlag();\n }\n }\n }\n\n if (newAttached) {\n this.emit('attach');\n } else {\n this.emit('detach');\n }\n }\n }", "function enqueueUpdate(component){ensureInjected(); // Various parts of our code (such as ReactCompositeComponent's\n// _renderValidatedComponent) assume that calls to render aren't nested;\n// verify that that's the case. (This is called by each top-level update\n// function, like setProps, setState, forceUpdate, etc.; creation and\n// destruction of top-level components is guarded in ReactMount.)\n\"production\"!==process.env.NODE_ENV?warning(ReactCurrentOwner.current==null,'enqueueUpdate(): Render methods should be a pure function of props '+'and state; triggering nested component updates from render is not '+'allowed. If necessary, trigger nested updates in '+'componentDidUpdate.'):null;if(!batchingStrategy.isBatchingUpdates){batchingStrategy.batchedUpdates(enqueueUpdate,component);return;}dirtyComponents.push(component);}", "async function queueUpdate(p) {\n queued.push(p);\n if (!pending) {\n pending = true;\n await Promise.resolve();\n pending = false;\n const loading = [...queued];\n queued = [];\n (await Promise.all(loading)).forEach((fn) => fn && fn());\n }\n}", "measure() {\n // Check if the element is ready to be measured.\n // Placeholders are special. They are technically \"owned\" by parent AMP\n // elements, sized by parents, but laid out independently. This means\n // that placeholders need to at least wait until the parent element\n // has been stubbed. We can tell whether the parent has been stubbed\n // by whether a resource has been attached to it.\n if (\n this.isPlaceholder_ &&\n this.element.parentElement &&\n // Use prefix to recognize AMP element. This is necessary because stub\n // may not be attached yet.\n this.element.parentElement.tagName.startsWith('AMP-') &&\n !(RESOURCE_PROP_ in this.element.parentElement)\n ) {\n return;\n }\n if (\n !this.element.ownerDocument ||\n !this.element.ownerDocument.defaultView\n ) {\n // Most likely this is an element who's window has just been destroyed.\n // This is an issue with FIE embeds destruction. Such elements will be\n // considered \"not displayable\" until they are GC'ed.\n this.state_ = ResourceState_Enum.NOT_LAID_OUT;\n return;\n }\n\n this.isMeasureRequested_ = false;\n\n const oldBox = this.layoutBox_;\n this.computeMeasurements_();\n const newBox = this.layoutBox_;\n\n // Note that \"left\" doesn't affect readiness for the layout.\n const sizeChanges = !layoutRectSizeEquals(oldBox, newBox);\n if (\n this.state_ == ResourceState_Enum.NOT_LAID_OUT ||\n oldBox.top != newBox.top ||\n sizeChanges\n ) {\n if (this.element.isUpgraded()) {\n if (this.state_ == ResourceState_Enum.NOT_LAID_OUT) {\n // If the element isn't laid out yet, then we're now ready for layout.\n this.state_ = ResourceState_Enum.READY_FOR_LAYOUT;\n } else if (\n (this.state_ == ResourceState_Enum.LAYOUT_COMPLETE ||\n this.state_ == ResourceState_Enum.LAYOUT_FAILED) &&\n this.element.isRelayoutNeeded()\n ) {\n // If the element was already laid out and we need to relayout, then\n // go back to ready for layout.\n this.state_ = ResourceState_Enum.READY_FOR_LAYOUT;\n }\n }\n }\n\n if (!this.hasBeenMeasured()) {\n this.initialLayoutBox_ = newBox;\n }\n\n this.element.updateLayoutBox(newBox, sizeChanges);\n }", "async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }", "function requestWork(root,expirationTime){if(nestedUpdateCount>NESTED_UPDATE_LIMIT){invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}// Add the root to the schedule.\n// Check if this root is already part of the schedule.\nif(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.\nroot.remainingExpirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.\nvar remainingExpirationTime=root.remainingExpirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.\nroot.remainingExpirationTime=expirationTime;}}if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performWork(Sync,null);}else{scheduleCallbackWithExpiration(expirationTime);}}", "function requestWork(root,expirationTime){if(nestedUpdateCount>NESTED_UPDATE_LIMIT){invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}// Add the root to the schedule.\n// Check if this root is already part of the schedule.\nif(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.\nroot.remainingExpirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.\nvar remainingExpirationTime=root.remainingExpirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.\nroot.remainingExpirationTime=expirationTime;}}if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performWork(Sync,null);}else{scheduleCallbackWithExpiration(expirationTime);}}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}" ]
[ "0.6279164", "0.5831592", "0.5645547", "0.5618422", "0.5553275", "0.5536617", "0.5518966", "0.54060096", "0.5393215", "0.53856635", "0.5385072", "0.53362244", "0.53362244", "0.5301369", "0.52907246", "0.5246852", "0.5243641", "0.52426386", "0.52426386", "0.5228701", "0.5228701", "0.5212066", "0.5208014", "0.5202", "0.5181804", "0.51752317", "0.51610494", "0.51582134", "0.513112", "0.5079978", "0.5066546", "0.5066546", "0.5066546", "0.505017", "0.505017", "0.50471187", "0.50471187", "0.50471187", "0.50471187", "0.50471187", "0.50378776", "0.5034661", "0.50321984", "0.50321984", "0.50321984", "0.5025778", "0.5008299", "0.50001943", "0.49863476", "0.49800754", "0.4969751", "0.49557573", "0.4949225", "0.4948172", "0.4942327", "0.4942327", "0.4942327", "0.49417248", "0.49398932", "0.49398932", "0.49398932", "0.49336916", "0.49316722", "0.4917704", "0.49112192", "0.49099982", "0.49090612", "0.49079677", "0.49050513", "0.48993877", "0.48993877", "0.48975766", "0.48923603", "0.48796865", "0.48762953", "0.48761165", "0.48736286", "0.48713553", "0.48645148", "0.4863577", "0.48628563", "0.4857083", "0.48419675", "0.48381442", "0.48378807", "0.48341948", "0.4831561", "0.482558", "0.48223293", "0.48174143", "0.48158416", "0.48155522", "0.48155522", "0.4808226", "0.4808226", "0.4808226", "0.4808226", "0.4808226" ]
0.48313922
89
to be able to optimize each path individually by branching early. This needs a compiler or we can do it manually. Helpers that don't need this branching live outside of this function.
function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop. return;}// Deletions are added in reversed order so we add it to the front. // At this point, the return fiber's effect list is empty except for // deletions, so we can just append the deletion to the list. The remaining // effects aren't added until the complete phase. Once we implement // resuming, this may not be true. var last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop. return null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by // assuming that after the first child we've already added everything. var childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by // keys quickly. Implicit (null) keys get added to this set with their index var existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy // to forget to do before returning it. E.g. for the single child case. var clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop. return lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move. newFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place. return oldIndex;}}else{// This is an insertion. newFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a // placement for inserting new children. if(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update var existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index var existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert var created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update var existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert var created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update var existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. var created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null. var key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. if(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor // new node for the key. If both are text nodes, they match. var matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/** * Warns if there is a duplicate or missing key */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we // don't have backpointers on fibers. I'm trying to see how far we can get // with that model. If it ends up not being worth the tradeoffs, we can // add it later. // Even with a two ended optimization, we'd want to optimize for the case // where there are few changes and brute force the comparison instead of // going for the Map. It'd like to explore hitting that path first in // forward-only mode and only go for the Map once we notice that we need // lots of look ahead. This doesn't handle reversal as well as two ended // search but that's unusual. Besides, for the two ended optimization to // work on Iterables, we'd need to copy the whole set. // In this first iteration, we'll just live with hitting the bad case // (adding everything to a Map) in for every insert/move. // If you change this code, also update reconcileChildrenIterator() which // uses the same algorithm. {// First, validate keys. var knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run. resultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run. resultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups. var existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves. for(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation. // See https://github.com/facebook/react/issues/12995 if(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag newChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children if(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys. // We'll get a different iterator later for the main pass. var _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run. resultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run. resultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups. var existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves. for(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a // way to define them. if(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete // the rest. deleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one // and delete the existing ones. deleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation // itself. They will be added to the side-effect list as we pass through the // children and the parent. function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happens at the normal flow. // Handle top level unkeyed fragments as if they were arrays. // This leads to an ambiguity between <>{[...]}</> and <>...</>. // We treat the ambiguous cases above the same. var isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types var isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite // component, throw an error. If Fiber return types are disabled, // we already threw above. switch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null. break;}}}// Intentionally fall through to the next case, which handles both // functions and classes // eslint-disable-next-lined no-fallthrough case FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty. return deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "optimiseSetOperation(path, nextValue) {\n // console.log('optimiseSetOperation', path, nextValue)\n // If target value is not a plain value, unable to optimise\n if (typeof nextValue === 'object') {\n // console.log(\"Not optimisable because next value is object\")\n return false;\n } // Check the source values, if there is more than one value being assigned,\n // we won't optimise\n\n\n var matches = (0, _extractWithPath.default)(path, this.PRESTAGE); // If we are not overwriting exactly one key, this cannot be optimised, so we bail\n\n if (matches.length !== 1) {\n // console.log('Not optimisable because match count is != 1', JSON.stringify(matches))\n return false;\n } // Okay, we are assigning exactly one value to exactly one existing slot, so we might optimise\n\n\n var match = matches[0]; // If the value of the match is an array or object, we cannot safely optimise this since the meaning\n // of pre-existing operations might change (in theory, at least), so we bail\n\n if (typeof match.value === 'object') {\n // console.log(\"Not optimisable because old value is object\")\n return false;\n } // If the new and old value are the equal, we optimise this operation by discarding it\n // Now, let's build the operation\n\n\n var op;\n\n if (match.value === nextValue) {\n // If new and old values are equal, we optimise this by deleting the operation\n // console.log(\"Omitting operation\")\n op = null;\n } else if (typeof match.value === 'string' && typeof nextValue === 'string') {\n // console.log(\"Rewriting to dmp\")\n // We are updating a string to another string, so we are making a diffMatchPatch\n var patch = this.dmp.patch_make(match.value, nextValue).map(patch => patch.toString()).join('');\n op = {\n patch: {\n id: this.PRESTAGE._id,\n diffMatchPatch: {\n [path]: patch\n }\n }\n };\n } else {\n // console.log(\"Not able to rewrite to dmp, making normal set\")\n // We are changing the type of the value, so must make a normal set-operation\n op = {\n patch: {\n id: this.PRESTAGE._id,\n set: {\n [path]: nextValue\n }\n }\n };\n } // Let's make a plain, concrete path from the array-path. We use this to keep only the latest set\n // operation touching this path in the buffer.\n\n\n var canonicalPath = (0, _arrayToJSONMatchPath.default)(match.path); // Store this operation, overwriting any previous operations touching this same path\n\n if (op) {\n this.setOperations[canonicalPath] = op;\n } else {\n delete this.setOperations[canonicalPath];\n } // Signal that we succeeded in optimizing this patch\n\n\n return true;\n }", "function buildPaths(path) {\n\n for (var name in path) {\n var current = path[name];\n\n if (traverse(path, current, name)) {\n buildPaths(addProperties(current, path, name));\n }\n\n }\n }", "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being that we just join them anyways\n var o840 = name ? o591.resolve(o591.o592(o502, name)) : o502;\n\n function o841(o842) {\n function o843(o842) {\n try {\nif (!o838) {\n try {\no474.o800(o502, name, o842, o781, o782, o549);\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o837) try {\no837();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n }\n var o844 = false;\n try {\nModule['preloadPlugins'].forEach(function (o845) {\n try {\nif (o844) try {\nreturn;\n}catch(e){}\n}catch(e){}\n try {\nif (o845['canHandle'](o840)) {\n try {\no845['handle'](o842, o840, o843, function () {\n try {\nif (o585) try {\no585();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n });\n}catch(e){}\n try {\no844 = true;\n}catch(e){}\n }\n}catch(e){}\n });\n}catch(e){}\n try {\nif (!o844) try {\no843(o842);\n}catch(e){}\n}catch(e){}\n }\n try {\no332('cp ' + o840);\n}catch(e){}\n try {\nif (typeof o38 == 'string') {\n try {\no839.o846(o38, function (o842) {\n try {\no841(o842);\n}catch(e){}\n }, o585);\n}catch(e){}\n } else {\n try {\no841(o38);\n}catch(e){}\n }\n}catch(e){}\n })\n {\n try {\nif (o1[o3] == undefined)\n {\n try {\nif (o2 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -1)\n {\n try {\no4.o5(o2 + \"-\" + (o3-1) + \" = undefined\");\n}catch(e){}\n try {\no2 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "findPath(unit) {\n /**\n * The open list (Nodes yet to check),\n * this list is always sorted according to the\n * score of its nodes:\n */\n let openList = [];\n\n /**\n * The closed list (Nodes already checked):\n */\n this.closedList = [];\n\n this.nodeScoring.posFinishX = unit.route.finish.posX;\n this.nodeScoring.posFinishY = unit.route.finish.posY;\n\n let done = false;\n let cumCostPath = -1;\n let iteCnt = 0;\n let tmpCost = 0;\n let tmp = null;\n\n //\tThe node which is currently being processed:\n let curNode = unit.route.start;\n\n let i, j;\n\n /**\n * MAIN LOOP:\n */\n while (!done) {\n /** If we've reached the destination: */\n if (curNode.equals(unit.route.finish)) {\n done = true;\n cumCostPath = curNode.cost;\n\n unit.route.Steps.push(curNode);\n tmp = curNode;\n while (tmp.parent != null) {\n unit.route.Steps.push(tmp.parent);\n tmp = tmp.parent;\n }\n unit.route.Steps.reverse();\n unit.route.routeActive = true;\n }\n /** If not yet: */\n else {\n /** EXPAND THE CURRENT NODE: */\n for (i = -1; i < 2; i++) {\n for (j = -1; j < 2; j++) {\n /** Current node is already expanded: */\n if (i == 0 && j == 0) {\n continue;\n }\n /** If we're out of bounds: */\n if (curNode.posX + i < 0 || curNode.posX + i >= this.map.width || curNode.posY + j < 0 || curNode.posY + j >= this.map.height) {\n continue;\n }\n /** If it's an obstacle: */\n //if (this.map.getTileType(curNode.posY + j, curNode.posX + i) == this.INDEX_FOR_OBSTACLE) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY + j) == this.INDEX_FOR_OBSTACLE) {\n continue;\n }\n /** Is this neighbor already done with ?: */\n if (this.closedList != null) {\n tmp = this.closedList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n if (tmp != null) {\n tmp = null;\n continue;\n }\n }\n\n /** Skip diagonally adjacent nodes IF NO_DIAG_MOV == true: */\n if (i != 0 && j != 0 && this.NO_DIAG_MOV) {\n continue;\n }\n /** THIS IS FOR PSEUDO-NO_DIAG_MOV\n YOU SHALL NOT MOVE DIAGONALLY IF\n AN OBSTACLE IS ADJACENT TO current_node\n AND THIS NODE:\n */\n if (i != 0 && j != 0 && this.HALF_DIAG_MOV) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY) == this.INDEX_FOR_OBSTACLE)\n continue;\n if (this.map.getTileType(curNode.posX, curNode.posY + j) == this.INDEX_FOR_OBSTACLE)\n continue;\n }\n /** Check whether this neighbor is already on the open list,\n * if yes - update its costs accordingly:\n */\n if (openList != null) {\n tmp = openList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n }\n\n if (openList != null && tmp != null) {\n /** checking for diagonal vs (horizontal / vertical step): */\n if (i != 0 && j != 0) {\n /** Is curNode the better predecessor\n * than what we have atm ?:\n */\n if (tmp.cost > curNode.cost + 14) {\n tmp.cost = curNode.cost + 14;\n tmp.parent = curNode;\n }\n }\n else {\n if (tmp.cost > curNode.cost + 10) {\n tmp.cost = curNode.cost + 10;\n tmp.parent = curNode;\n }\n }\n\n }\n /** tmp is neither on the openList nor on the closedList\n * so we gotta add it to the open list:\n */\n else {\n if (i != 0 && j != 0) {\n tmpCost = curNode.cost + 14;\n }\n else {\n tmpCost = curNode.cost + 10;\n }\n tmp = new Node(curNode.posX + i, curNode.posY + j);\n tmp.cost = tmpCost;\n tmp.parent = curNode;\n if (openList == null) {\n openList = [];\n }\n openList.push(tmp);\n //openList.sort(this.nodeScoring.compareManhattan);\n //openList.sort(function() { this.nodeScoring.compareManhattan(); });\n // TODO: find out why this works and what exactly it does D:\n // TODO: compareManhattan() does not get a and b (= undefined) !!!\n /** PATH SCORING: */\n openList.sort((a, b) => {\n this.nodeScoring.compareManhattan(a, b);\n });\n }\n }\n }\n\n /** ADD curNode TO THE closedList: */\n if (this.closedList == null) {\n this.closedList = [];\n }\n this.closedList.push(curNode);\n /** REMOVE curNode FROM THE openList: */\n let index = openList.indexOf(curNode);\n if (index > -1) {\n openList.splice(index, 1);\n }\n\n /** if openList is empty, there are no open nodes left, even though destination is not reached yet: */\n if (openList.length == 0) {\n unit.route.Steps = null;\n unit.route.finish = null;\n unit.route.routeActive = false;\n done = true;\n console.log(\"NO PATH FOUND!\");\n }\n else {\n curNode = openList[0];\n }\n iteCnt++;\n }\n }\n }", "function findPaths(c, paths) {\n if (c.length > 1){\n let path1 = paths.slice()\n let path2 = paths.slice()\n\n path1 = (c[1] !== 1)\n ? [...path1, 1]\n : 0\n\n path2 = (c[2] !== 2)\n ? [...path2, 2]\n : 0\n\n if (path1 === 0 && path2 === 0){\n paths = 0\n } else if (path1 !== 0 && path2 === 0){\n return findPaths(c.slice(1), path1)\n } else if (path1 === 0 && path2 !== 0){\n return findPaths(c.slice(2), path2)\n } else if (path1 !== 0 && path2 !== 0){\n path1 = findPaths(c.slice(1), path1)\n path2 = findPaths(c.slice(2), path2)\n return (path1.length < path2.length)\n ? path1\n : path2\n }\n }\n return paths\n}", "genAllPaths() {\n const startTime = moment.now()\n let iterations = 0\n \n const edges = this.get('edges')\n const root = this.get('root')\n const startNode = root.source\n const endNode = root.target\n\n let open = []\n let paths = []\n let pathObjects = []\n let curr = [startNode] //Not sure if needed\n\n while(curr != null){\n for(let j = 0; j < edges.length; j++){\n if(edges[j].source == curr[curr.length-1] && edges[j].target != startNode && !curr.includes(edges[j].target)){\n let newPath = curr.concat(edges[j].target)\n if(edges[j].target == endNode && edges[j].target != startNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }else if(edges[j].target == curr[curr.length-1] && edges[j].source != startNode && !curr.includes(edges[j].source)){\n let newPath = curr.concat(edges[j].source)\n if(edges[j].source == endNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }\n iterations++\n }\n if(open.length > 0){\n curr = open.pop()\n }else{\n curr = null\n }\n }\n\n this.setStats({'time': (moment.now() - startTime) /1000, 'iterations': iterations})\n this.set('allPaths', pathObjects.sort(function(a, b) { return a.degredationVariance - b.degredationVariance}))\n }", "function AssignPathValue() {\n\tfor(iI = 0; iI < 20; iI ++) { // scan the grid repeatedly to fill in all the spots\n\t\tfor(iPV = 0; iPV < 100; iPV ++) {\n\t\t\tif(gridArr[iPV].pathValue > 0 && // has an assigned path value\n\t\t\tgridArr[iPV].explored > 0 && // only apply to explored places\n\t\t\tgridArr[iPV].open > 0) { // is an open space\n\t\t\t\tiNorth = iPV - 10;\n\t\t\t\tif(iNorth >= 0 && // is on map\n\t\t\t\tgridArr[iNorth].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iNorth].room != \"SC\" && // is not a secret chamber\n\t\t\t\tgridArr[iNorth].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iNorth].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iNorth].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iNorth].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiEast = iPV + 1;\n\t\t\t\tif(iEast < 100 && // is on map\n\t\t\t\tgridArr[iEast].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iEast].room != \"SC\" && // is not a secret chamber\n\t\t\t\tMath.floor(iEast / 10) == Math.floor(iPV / 10) && // is on same Y axis as iPV\n\t\t\t\tgridArr[iEast].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iEast].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iEast].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iEast].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiSouth = iPV + 10;\n\t\t\t\tif(iSouth < 100 && // is on map\n\t\t\t\tgridArr[iSouth].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iSouth].room != \"SC\" && // is not a secret chamber\n\t\t\t\tgridArr[iSouth].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iSouth].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iSouth].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iSouth].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiWest = iPV - 1;\n\t\t\t\tif(iWest >= 0 && // is on map\n\t\t\t\tgridArr[iWest].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iWest].room != \"SC\" && // is not a secret chamber\n\t\t\t\tMath.floor(iWest / 10) == Math.floor(iPV / 10) && // is on same Y axis as iPV\n\t\t\t\tgridArr[iWest].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iWest].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iWest].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iWest].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tUpdateTileMap();\n}", "function shortenPaths(graph) {\n var foundNonTrivialPaths = true,\n startNode = null,\n startNodeName = null,\n minWeight = 0;\n\n while(foundNonTrivialPaths) {\n foundNonTrivialPaths = false;\n for(startNodeName in graph) {\n startNode = graph[startNodeName];\n depthFirstSearch(\n startNodeName, \n graph, \n followingNonTrivialPath(\n [],\n [\n correctMinimumWeight,\n modifyStep\n ],\n [\n resetMinimumWeight\n ]\n )\n );\n }\n }\n\n function followingNonTrivialPath (startFns, stepFns, endFns) {\n return function inner (path, pathIndex) {\n if(path.length > 1) {\n foundNonTrivialPaths = true;\n startFns.forEach(function eachStartFn (startFn) {\n startFn.call(this, path, pathIndex);\n });\n stepFns.forEach(function eachStepFn (fn) {\n path.forEach(stepFns);\n });\n endFns.forEach(function eachEndFn (endFn) {\n endFn.call(this, path, pathIndex);\n });\n }\n }\n }\n\n function modifyStep (step, stepIndex, path) { \n if(step.edge.weight === minWeight) {\n delete step.node.edges[step.nextNodeName];\n }\n else {\n // reduce weight of edge by lowest weight along non-trivial path\n step.edge.weight -= minWeight;\n }\n\n if(stepIndex === path.length - 1) {\n // get/create edge between start and end of current path\n ensureAttr(startNode.edges, step.nextNodeName, { weight: 0});\n startNode.edges[step.nextNodeName].weight += minWeight; \n } \n }\n\n function correctMinimumWeight (step) {\n if(step.edge != null && step.edge.weight > 0 && minWeight === 0 || minWeight > 0 && step.edge.weight < minWeight) {\n minWeight = step.edge.weight;\n }\n }\n \n function resetMinimumWeight () {\n minWeight = 0;\n }\n }", "function branchingProcess() {\n var implicantsPowerSet = powerSet(remainingImplicants);\n validSolutions = filterPowerSet(implicantsPowerSet); //array contains valid cominations\n var currentValidSolutions = validSolutions.slice();\n minimalSolutions = filterPossibleSolutions(currentValidSolutions); //array contains valid combainations with least cost\n}", "isReachable(vertID1, vertID2, curr=null, path=[]) {\n if(curr == vertID1) {\n return [];\n }\n if(curr == vertID2) {\n path.push(curr);\n return path;\n }\n let result = [];\n curr = curr || vertID1;\n for(let edge of this.edgeList) {\n if(edge[0] == curr) {\n path.push(edge[0]);\n result.push(this.isReachable(vertID1, vertID2, edge[1], path));\n }\n }\n return result;\n }", "async function traversePaths(canvas) {\n log(\"Traversing all paths...\");\n\n if (DEBUG_PATH) {\n drawing.canvasClear(tilesOverlay);\n drawing.canvasDrawLine(tilesOverlay, 0, 0, tilesOverlay.width, 0, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, 0, tilesOverlay.width, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, tilesOverlay.height, 0, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, 0, tilesOverlay.height, 0, 0, [0xff, 0, 0, 0xff], 3);\n }\n\n // top paths\n for (let i = 0; i < metaInfo.topPaths.length; i++) {\n const path = metaInfo.topPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.topEdge;\n await traversePath(canvas, path, DIR.BOTTOM);\n }\n // right paths\n for (let i = 0; i < metaInfo.rightPaths.length; i++) {\n const path = metaInfo.rightPaths[i];\n path.x0 = metaInfo.rigthEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.LEFT);\n }\n // bottom paths\n for (let i = 0; i < metaInfo.bottomPaths.length; i++) {\n const path = metaInfo.bottomPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.bottomEdge;\n await traversePath(canvas, path, DIR.TOP);\n }\n // left paths\n for (let i = 0; i < metaInfo.leftPaths.length; i++) {\n const path = metaInfo.leftPaths[i];\n path.x0 = metaInfo.leftEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.RIGHT);\n }\n}", "function build_full_paths(FI, FP, Paths) {\n var i = 0,\n L = 0,\n R = 0,\n C = 0,\n j = 0,\n pl = Paths.length;\n var dad = [],\n q = [];\n\n for (; i < pl; ++i) {\n dad[i] = q[i] = i;\n FP[i] = Paths[i];\n }\n\n for (; j < q.length; ++j) {\n i = q[j];\n L = FI[i].L;\n R = FI[i].R;\n C = FI[i].C;\n\n if (dad[i] === i) {\n if (L !== -1\n /*NOSTREAM*/\n && dad[L] !== L) dad[i] = dad[L];\n if (R !== -1 && dad[R] !== R) dad[i] = dad[R];\n }\n\n if (C !== -1\n /*NOSTREAM*/\n ) dad[C] = i;\n\n if (L !== -1 && i != dad[i]) {\n dad[L] = dad[i];\n if (q.lastIndexOf(L) < j) q.push(L);\n }\n\n if (R !== -1 && i != dad[i]) {\n dad[R] = dad[i];\n if (q.lastIndexOf(R) < j) q.push(R);\n }\n }\n\n for (i = 1; i < pl; ++i) if (dad[i] === i) {\n if (R !== -1\n /*NOSTREAM*/\n && dad[R] !== R) dad[i] = dad[R];else if (L !== -1 && dad[L] !== L) dad[i] = dad[L];\n }\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type === 0\n /* unknown */\n ) continue;\n j = i;\n if (j != dad[j]) do {\n j = dad[j];\n FP[i] = FP[j] + \"/\" + FP[i];\n } while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n dad[i] = -1;\n }\n\n FP[0] += \"/\";\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type !== 2\n /* stream */\n ) FP[i] += \"/\";\n }\n }", "function recurse(tree,path) \n{\n for (var key in tree) \n {\n\tif (key == 'model') \n\t{\n\t compile(tree[key], path);\n\t continue;\n\t}\n\n\trecurse(tree[key], path == '' ? key : path + '.' + key)\n }\n}", "function workPath(dest) {\r\n let element = dest;\r\n while (element !== undefined) {\r\n pathArray.push(element);\r\n element = element.parent;\r\n }\r\n aStarUnfinished = false;\r\n}", "recurseThroughPath(path, breakingConditionCallback) {\n const indexOfSeparator = path.indexOf('/');\n\n // breaking condition\n if (indexOfSeparator === -1) {\n return breakingConditionCallback(path);\n }\n\n const leftHalf = path.substring(0, indexOfSeparator);\n const rightHalf = path.substring(indexOfSeparator + 1, path.length);\n\n return {\n [leftHalf]: this.recurseThroughPath(rightHalf, breakingConditionCallback),\n };\n }", "computeDrawPathBuffers() {\n const buffer = this._pathBuffer;\n let preview,current,next;\n const cList = $objs.cases_s;\n for (let i=0, l=buffer.length; i<l; i++) {\n const preview = buffer[i-1];\n const current = buffer[i ];\n const next = buffer[i+1];\n const preview_id = preview && cList.indexOf(preview);\n const current_id = current && cList.indexOf(current);\n const next_id = next && cList.indexOf(next);\n //TODO: FIXME: compute distance via global position for Math.hypot\n if(preview){\n current.pathConnexion[String(preview_id)] = Math.hypot(preview.x-current.x, preview.y-current.y);\n };\n if(next){\n current.pathConnexion[String(next_id)] = Math.hypot(next.x-current.x, next.y-current.y);\n };\n };\n console.log0('PathsBuffers: ', buffer);\n this._pathBuffer = [];\n this.refreshPath();\n }", "_calculatePath() {\n\t\tlet startNode = { x: this.gridX, y: this.gridY };\n\t\tlet goalNode = { x: window.uncover.player.gridX, y: window.uncover.player.gridY };\n\t\tstartNode.g = 0;\n\t\tstartNode.f = Math.pow(startNode.x - goalNode.x, 2) + Math.pow(startNode.y - goalNode.y, 2);\n\n\t\tlet openList = [startNode];\n\t\tlet closedList = [];\n\n\t\tconst neighborPositions = [{ dx: 0, dy: -1}, { dx: 1, dy: 0}, { dx: 0, dy: 1}, { dx: -1, dy: 0}];\n\n\t\tlet iterations = 0;\n\t\twhile (openList.length > 0) {\n\t\t\titerations++;\n\t\t\tif (iterations >= this._maxIterations) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Find node with minimum f\n\t\t\tlet currentNodeIndex = 0;\n\t\t\tfor (let i = 1; i < openList.length; i++) {\n\t\t\t\tif (openList[i].f < openList[currentNodeIndex].f) {\n\t\t\t\t\tcurrentNodeIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet currentNode = openList[currentNodeIndex];\n\t\t\topenList.splice(currentNodeIndex, 1);\n\t\t\tclosedList.push(currentNode);\n\n\t\t\t// Found the goal node, create path\n\t\t\tif (currentNode.x === goalNode.x && currentNode.y === goalNode.y) {\n\t\t\t\treturn this._constructPath(currentNode);\n\t\t\t}\n\n\t\t\t// Create adjacent neighbors\n\t\t\tconst neighbors = []; \n\t\t\tfor (let neighborPosition of neighborPositions) {\n\t\t\t\tconst xPosition = currentNode.x + neighborPosition.dx;\n\t\t\t\tconst yPosition = currentNode.y + neighborPosition.dy;\n\t\t\t\tif (xPosition < 0 || xPosition >= window.uncover.gameGrid.gridSize || yPosition < 0 || yPosition >= window.uncover.gameGrid.gridSize) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isNeighborInClosedList = closedList.some((node) => node.x === xPosition && node.y === yPosition);\n\t\t\t\tif (isNeighborInClosedList) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (window.uncover.gameGrid.grid[xPosition][yPosition] != GridType.FILLED) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\n\t\t\t\tneighbors.push({ x: xPosition, y: yPosition, parent: currentNode });\n\t\t\t}\n\n\t\t\tfor (let neighbor of neighbors) {\n\t\t\t\tneighbor.g = currentNode.g + 1;\n\t\t\t\tneighbor.h = Math.pow(neighbor.x - goalNode.x, 2) + Math.pow(neighbor.y - goalNode.y, 2);\n\t\t\t\tneighbor.f = neighbor.g + neighbor.h;\n\n\t\t\t\tconst neighborInOpenListIndex = openList.findIndex((node) => node.x === neighbor.x && node.y === neighbor.y);\n\t\t\t\tconst isNeighborInOpenList = neighborInOpenListIndex >= 0;\n\t\t\t\tif (isNeighborInOpenList) {\n\t\t\t\t\tif (neighbor.g > openList[neighborInOpenListIndex].g) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\topenList.push(neighbor);\n\t\t\t}\n\t\t}\n\n\t\treturn [];\n\t}", "function applyPath(){\n\t\tvar cap = [];\n\t\tdelta = 0;\n\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\tstate.edgePrevCost[edge.id] = edge.resources[1];\n\t\t});\n\t\tfor (var i =0; i<state.edgesOfSP.length; i++){\n\t\t\t\n\t\t\tcap[i] = state.edgesOfSP[i].resources[0]-state.edgesOfSP[i].state.flow;\n\t\t\t\n\t\t}\n var minCap = d3.min(cap);\n\t\t\n\t\tvar excessDemandMin = Math.min(Graph.instance.nodes.get(state.sourceId).b , -Graph.instance.nodes.get(state.targetId).b);\n\t\tdelta = Math.min(minCap, excessDemandMin);\n\t\t\n\t\n\t\tfor (var i = 0; i < state.edgesOfSP.length; i++){\n \n var edge = state.edgesOfSP[i];\n\n edge.state.flow += edge.start.state.predecessor[\"direction\"] * delta;\n\t\t\tminCost += delta * edge.edges[\"cost\"];\n }\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tbs[node.id] = node.b;\n\t\t\tif(node.id == state.sourceId){\n\t\t\t\tnode.b = node.b-delta;\n\t\t\t\tbOfS = node.b;\n\t\t\t}else if(node.id == state.targetId){\n\t\t\t\tnode.b = node.b + delta;\n\t\t\t\tbOfT = node.b;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tnode.b = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tGraph.instance.edges.forEach(function(key, edge) {\n\t\t\tedge.inSP = false;\n\t\t\tif(edge.state.flow == edge.resources[0]){\n\t\t\t\tedge.state.usedUp = true;\t\n\t\t\t}else{\n\t\t\t\tedge.state.usedUp = false;\t\n\n\t\t\t}\n });\n logger.log(\"Applied augmenting path with flow \"+state.augmentation);\n\t\tdel = 0;\n\t\tstate.distancesOfNodes = [];\n state.show_residual_graph = false;\n\t\tstate.shortestPath = [];\n state.current_step = STEP_MAINLOOP;\n\t\t\n\t}", "function _helper(node) {\n if (!node) {\n return;\n }\n\n path.push(node.val);\n // console.log('p:', path.join(', '));\n let sum = 0;\n for (let i = path.length - 1; i >= 0; i--) {\n sum += path[i];\n if (sum === k) {\n console.log('path:', path.slice(i));\n }\n }\n\n _helper(node.left);\n _helper(node.right);\n path.pop();\n }", "function walkPathAndBuildOutput(root, node, jsonArg, path,\n depth, seed, results, requestedPath,\n optimizedPath, optimizedLength,\n fromReferenceArg, referenceContainer,\n modelRoot, expired, expireImmediate,\n branchSelector, boxValues, materialized,\n hasDataSource, treatErrorsAsValues,\n allowFromWhenceYouCame) {\n\n var json = jsonArg, type, refTarget;\n var fromReference = fromReferenceArg;\n\n // ============ Check for base cases ================\n\n // If there's nowhere to go, we've reached a terminal node, or hit\n // the end of the path, stop now. Either build missing paths or report the value.\n if (undefined === node ||\n undefined !== (type = node.$type) ||\n undefined === path) {\n arr[1] = node === undefined;\n arr[0] = onValueType(node, type, json,\n path, depth, seed, results,\n requestedPath, depth,\n optimizedPath, optimizedLength,\n fromReference, modelRoot, expired, expireImmediate,\n branchSelector, boxValues, materialized, hasDataSource,\n treatErrorsAsValues, onValue, onMissing, onMaterialize);\n return arr;\n }\n\n var f_meta, f_old_keys, f_new_keys, f_code = '';\n\n var next, nextKey,\n keyset, keyIsRange,\n keys = path['$keys'],\n nodeAbsPath, jsonAbsPath,\n nextDepth = depth + 1, rangeEnd,\n nextJSON, nextReferenceContainer,\n nextOptimizedLength, nextOptimizedPath,\n optimizedLengthNext = optimizedLength + 1,\n refContainerAbsPath, refContainerRefPath;\n\n if (allowFromWhenceYouCame && referenceContainer) {\n refContainerRefPath = referenceContainer.value;\n refContainerAbsPath = referenceContainer[f_abs_path];\n }\n\n if (!json || 'object' !== typeof json) {\n json = undefined;\n } else if (f_meta = json[f_meta_data]) {\n\n nodeAbsPath = node[f_abs_path];\n jsonAbsPath = f_meta[f_meta_abs_path];\n\n if (!branchSelector && !(json instanceof FalcorJSON)) {\n json.__proto__ = {};\n json.__proto__[f_meta_data] = f_meta;\n json.__proto__.__proto__ = FalcorJSON.prototype;\n }\n\n if (!arrayEqual(nodeAbsPath, jsonAbsPath)) {\n f_meta['$code'] = '';\n f_meta[f_meta_status] = hasDataSource && 'pending' || 'incomplete';\n f_meta[f_meta_abs_path] = nodeAbsPath;\n f_meta[f_meta_version] = node[f_version];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n if (f_old_keys = f_meta[f_meta_keys]) {\n f_meta[f_meta_keys] = Object.create(null);\n for (nextKey in f_old_keys) {\n if (f_old_keys[nextKey]) {\n delete json[nextKey];\n }\n }\n }\n arr[0] = json;\n arr[1] = true;\n return arr;\n } else if (!(\n f_meta[f_meta_version] !== node[f_version] ||\n f_meta['$code'] !== path['$code'])) {\n results.hasValue = true;\n arr[0] = json;\n arr[1] = false;\n return arr;\n }\n\n f_old_keys = f_meta[f_meta_keys];\n f_meta[f_meta_abs_path] = nodeAbsPath;\n f_meta[f_meta_version] = node[f_version];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n }\n\n f_new_keys = Object.create(null);\n\n var keysIndex = -1;\n var keysLength = keys.length;\n var nextPath, nextPathKey,\n hasMissingPath = false;\n\n iteratingKeyset:\n while (++keysIndex < keysLength) {\n\n keyset = keys[keysIndex];\n nextPath = path[keysIndex];\n\n // If `null` appears before the end of the path, throw an error.\n // If `null` is at the end of the path, but the reference doesn't\n // point to a sentinel value, throw an error.\n //\n // Inserting `null` at the end of the path indicates the target of a ref\n // should be returned, rather than the ref itself. When `null` is the last\n // key, the path is lengthened by one, ensuring that if a ref is encountered\n // just before the `null` key, the reference is followed before terminating.\n if (null === keyset) {\n if (nextPath !== undefined) {\n throw new NullInPathError();\n }\n f_code = '' + getHashCode('' + f_code + 'null');\n continue;\n }\n // If the keyset is a primitive value, we've found our `nextKey`.\n else if ('object' !== typeof keyset) {\n nextKey = keyset;\n rangeEnd = undefined;\n keyIsRange = false;\n nextPathKey = nextKey;\n }\n // If the Keyset isn't null or primitive, then it must be a Range.\n else {\n rangeEnd = keyset.to;\n nextKey = keyset.from || 0;\n if ('number' !== typeof rangeEnd) {\n rangeEnd = nextKey + (keyset.length || 0) - 1;\n }\n if ((rangeEnd - nextKey) < 0) {\n break iteratingKeyset;\n }\n keyIsRange = true;\n nextPathKey = '[' + nextKey + '..' + rangeEnd + ']';\n }\n\n // Now that we have the next key, step down one level in the cache.\n do {\n fromReference = false;\n nextJSON = json && json[nextKey];\n nextOptimizedPath = optimizedPath;\n nextOptimizedLength = optimizedLengthNext;\n nextReferenceContainer = referenceContainer;\n\n next = node[nextKey];\n requestedPath[depth] = nextKey;\n optimizedPath[optimizedLength] = nextKey;\n\n if (nextPath === undefined) {\n\n walkPathAndBuildOutput(\n root, next, nextJSON, nextPath, nextDepth, seed,\n results, requestedPath, nextOptimizedPath,\n nextOptimizedLength, fromReference, nextReferenceContainer,\n modelRoot, expired, expireImmediate, branchSelector, boxValues,\n materialized, hasDataSource, treatErrorsAsValues, allowFromWhenceYouCame\n );\n\n if (arr[1] === true) {\n hasMissingPath = true;\n }\n\n if ((nextJSON = arr[0]) === undefined && !materialized) {\n if (json && json.hasOwnProperty(nextKey)) {\n delete json[nextKey];\n }\n continue;\n }\n }\n else {\n // If we encounter a ref, inline the reference target and continue\n // evaluating the path.\n if (next &&\n // If the reference is expired, it will be invalidated and\n // reported as missing in the next call to walkPath below.\n next.$type === $ref && !isExpired(next, expireImmediate)) {\n\n // Retrieve the reference target and next referenceContainer (if\n // this reference points to other references) and continue\n // following the path. If the reference resolves to a missing\n // path or leaf node, it will be handled in the next call to\n // walkPath.\n refTarget = getReferenceTarget(root, next, modelRoot, expireImmediate);\n\n next = refTarget[0];\n fromReference = true;\n nextOptimizedPath = refTarget[1];\n nextReferenceContainer = refTarget[2];\n nextOptimizedLength = nextOptimizedPath.length;\n refTarget[0] = refTarget[1] = refTarget[2] = undefined;\n }\n\n // Continue following the path\n\n // Inspect the return value from the step and determine whether to\n // create or write into the JSON branch at this level.\n //\n // 1. If the next node was a leaf value, nextJSON is the value.\n // 2. If the next node was a missing path, nextJSON is undefined.\n // 3. If the next node was a branch, then nextJSON will either be an\n // Object or undefined. If nextJSON is undefined, all paths under\n // this step resolved to missing paths. If it's an Object, then\n // at least one path resolved to a successful leaf value.\n //\n // This check defers creating branches until we see at least one\n // cache hit. Otherwise, don't waste the cycles creating a branch\n // if everything underneath is a cache miss.\n\n walkPathAndBuildOutput(\n root, next, nextJSON, nextPath, nextDepth, seed,\n results, requestedPath, nextOptimizedPath,\n nextOptimizedLength, fromReference, nextReferenceContainer,\n modelRoot, expired, expireImmediate, branchSelector, boxValues,\n materialized, hasDataSource, treatErrorsAsValues, allowFromWhenceYouCame\n );\n\n if (arr[1] === true) {\n hasMissingPath = true;\n }\n\n if ((nextJSON = arr[0]) === undefined) {\n if (json && json.hasOwnProperty(nextKey)) {\n delete json[nextKey];\n }\n continue;\n }\n }\n\n // The json value will initially be undefined. If we're here,\n // then at least one leaf value was encountered, so create a\n // branch to contain it.\n if (f_meta === undefined) {\n f_meta = {};\n f_meta[f_meta_version] = node[f_version];\n f_meta[f_meta_abs_path] = node[f_abs_path];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n json = {};\n json[f_meta_data] = f_meta;\n json.__proto__ = FalcorJSON.prototype;\n // Empower developers to instrument branch node creation by\n // providing a custom function. If they do, delegate branch\n // node creation to them.\n if (branchSelector) {\n json = branchSelector(json);\n } else {\n var tmp = json;\n json = {};\n json.__proto__ = tmp;\n tmp = undefined;\n }\n }\n\n f_new_keys[nextKey] = true;\n if (f_old_keys && (nextKey in f_old_keys)) {\n f_old_keys[nextKey] = false;\n }\n\n // Set the reported branch or leaf into this branch.\n json[nextKey] = nextJSON;\n }\n // Re-enter the inner loop and continue iterating the Range, or exit\n // here if we encountered a Key.\n while (keyIsRange && ++nextKey <= rangeEnd);\n\n f_code = '' + getHashCode('' + f_code +\n ( !hasMissingPath ? nextPathKey : '') +\n ( nextPath ? nextPath['$code'] : ''));\n }\n\n if (f_meta) {\n f_meta['$code'] = f_code;\n f_meta[f_meta_keys] = f_new_keys;\n if (!hasMissingPath) {\n f_meta[f_meta_status] = 'resolved';\n } else if (hasDataSource) {\n f_meta[f_meta_status] = 'pending';\n } else if (!materialized) {\n f_meta[f_meta_status] = 'incomplete';\n } else {\n f_meta[f_meta_status] = 'resolved';\n }\n\n if (f_old_keys) {\n for (nextKey in f_old_keys) {\n if (f_old_keys[nextKey]) {\n delete json[nextKey];\n }\n }\n }\n }\n\n // `json` will be a branch if any cache hits, or undefined if all cache misses\n\n arr[0] = json;\n arr[1] = hasMissingPath;\n\n return arr;\n}", "function findPath (start, stop, mapToUse) {\n var checked = [];\n var queue = [];\n var villages = [];\n\n queue.push([start]);\n checked.push(start);\n\n while(queue.length !== 0){\n var path = queue.shift(); // Get shortest path\n var t = path[path.length - 1]; // Take last element without removing it\n var tx = t[0];\n var ty = t[1];\n\n // If the last element is the one we are looking for\n // return the path\n if((mapToUse[tx][ty]).position.equals(stop)){\n return path;\n }\n\n var newPath = [];\n // Add all adjacent nodes to paths and push them to the \"prio\" queue\n // Paths cannot go through moutains\n if(customIndexOf(checked, [(tx+1),ty]) == -1 &&\n !isOutOfBounds(tx+1, ty, mapToUse) &&\n isPassable(tx+1, ty, mapToUse)){\n newPath = path.slice();\n checked.push([(tx+1),ty]); // Push node to checked so we dont use it again\n newPath.push([(tx+1),ty]);\n queue.push(newPath.slice()); // Push old path plus new node to prio queue\n }\n\n if (customIndexOf(checked, [(tx-1),ty]) == -1 &&\n !isOutOfBounds(tx-1, ty, mapToUse) &&\n isPassable(tx-1, ty, mapToUse)) {\n newPath = path.slice();\n checked.push([(tx-1),ty]);\n newPath.push([(tx-1),ty]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty+1)]) == -1 &&\n !isOutOfBounds(tx, ty+1, mapToUse) &&\n isPassable(tx, ty+1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty+1)]);\n newPath.push([tx,(ty+1)]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty-1)]) == -1 &&\n !isOutOfBounds(tx, ty-1, mapToUse) &&\n isPassable(tx, ty-1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty-1)]);\n newPath.push([tx,(ty-1)]);\n queue.push(newPath.slice());\n }\n\n queue.sort(function(a, b){return a.length - b.length;}); // This is needed as I'm too lazy to create/use a prio queue\n }\n\n return null;\n}", "function compress(path) {\n return __WEBPACK_IMPORTED_MODULE_0_tslib__[\"a\" /* __awaiter */](this, void 0, void 0, function () {\n var compressor, before;\n return __WEBPACK_IMPORTED_MODULE_0_tslib__[\"b\" /* __generator */](this, function (_a) {\n switch (_a.label) {\n case 0:\n if (path.length <= 1) {\n return [2 /*return*/, path]; //can't compress single one\n }\n return [4 /*yield*/, createCompressor(path)];\n case 1:\n compressor = _a.sent();\n do {\n before = path.length;\n path = compressor(path);\n } while (before > path.length);\n //console.log('after', path.map((path) => path.toString()));\n return [2 /*return*/, path];\n }\n });\n });\n}", "genComputedPaths() {\n const allPaths = this.get('allPaths')\n const objectMap = this.get('objectMap')\n let computedPaths = []\n\n for(const path of allPaths){\n let computedPath = []\n let firstPath = objectMap.get(path[0] + '-' + path[1]) || objectMap.get(path[1] + '-' + path[0])\n let sum = 0\n for(let i = 0; i< firstPath.length; i++){\n sum += firstPath.data\n }\n computedPath.push({\n 'label': path[0], \n 'data': firstPath.data,\n 'sum': sum\n })\n\n for(let i = 1; i < path.length; i++){\n let nextPath = objectMap.get(path[i-1] + '-' + path[i]) || objectMap.get(path[i] + '-' + path[i-1])\n \n computedPath.push({\n 'label': path[i], \n 'data': nextPath\n })\n }\n \n computedPaths.push(computedPath)\n \n }\n this.set('computedPaths', computedPaths) \n }", "function traverse(cur_pos, tc, b, visited, optPaths) {\n if(tc<0) return -2;\n\n if(cur_pos==b){\n optPaths[b][\"spt\"] = tc;\n optPaths[b][\"path\"] = [];\n optPaths[b][\"path\"].push(b);\n optPaths[b][\"res\"] = graph_vertices[b];\n console.log(\"base case\");\n return optPaths[b][\"res\"];\n }\n\n // let copiedOptPaths = JSON.parse(JSON.stringify(optPaths));\n let maxRes = -1, rec_ans, maxST = -1;\n visited[cur_pos] = 1;\n let temp_path = [];\n\n for(let i=0; i<graph_edges[cur_pos].length; i++){\n let toVis = graph_edges[cur_pos][i][0];\n let nbr_wt = graph_edges[cur_pos][i][1];\n console.log(toVis, nbr_wt);\n \n if(visited[toVis]==0){\n visited[toVis]=1;\n rec_ans = traverse(toVis, tc-nbr_wt, b, visited, optPaths);\n visited[toVis]=0;\n\n // if(rec_ans>maxRes || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n if(parseInt(rec_ans)>parseInt(maxRes) || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n maxRes = rec_ans;\n maxST = optPaths[b][\"spt\"];\n\n temp_path = optPaths[toVis][\"path\"];\n // optPaths[cur_pos] = optPaths[toVis];\n console.log(\"max res update:\", maxRes, optPaths[cur_pos][\"path\"]);\n }\n }\n\n }\n\n if(maxRes != -1){\n optPaths[cur_pos][\"res\"] = maxRes + graph_vertices[cur_pos];\n temp_path.unshift(cur_pos);\n }\n \n optPaths[cur_pos][\"path\"] = temp_path;\n optPaths[cur_pos][\"spt\"] = maxST;\n // optPaths[cur_pos][\"res\"] += graph_vertices[cur_pos];\n\n visited[cur_pos] = 0; // backtracking\n if(maxRes==-1) return -2;\n\n console.log(\"return value:\", optPaths[cur_pos][\"res\"]);\n return optPaths[cur_pos][\"res\"];\n}", "function solvePath() {\n let r = 19\n let c = 19\n shortestPath.push(board[r][c])\n while (true) {\n let parent = board[r][c].parentNode\n shortestPath.unshift(parent);\n r = parent.r\n c = parent.c\n if (r == 0 && c == 0) {\n return\n }\n }\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function solvePath(){\n var grid = cGrid;\n stepCount = 0; //resetStep\n startRow = 0;\n exitRow = grid.length-1;\n var point = {\n row: 0,\n col: 0\n };\n\n //1. Loop start row , find the start col and mark\n let startCol = point.col;\n for ( ;startCol < grid[startRow].length; startCol++){\n noEntry = true;\n if (grid[startRow][startCol] == colValues.OPEN){\n point.row = startRow;\n point.col = startCol;\n noEntry = false;\n break;\n }\n }\n if(noEntry){\n writeResults();\n return;\n }\n \n //2. loop and find open path and mark as walked\n do {\n let step = {};\n for( var direct in directions){\n step = movable(point, grid, direct);\n if(step.canMove && step.colValue == colValues.OPEN){\n //mark current step as walked , move and add step count\n grid[point.row][point.col] = colValues.PATH;\n document.getElementById(`${point.row}:${point.col}`).setAttribute(\"blockValue\", \"step\");\n point = getNextPoint(point, direct);\n stepCount ++;\n break;\n }\n }\n //3. Test exit condition\n if ( point.row == exitRow){\n exitReached = true;\n grid[point.row][point.col] = colValues.PATH;\n document.getElementById(`${point.row}:${point.col}`).setAttribute(\"blockValue\", \"step\");\n break;\n }\n } while(true);\n\n writeResults();\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function augmentingPaths (graph, start, end) {\n \n// Keep track of vertices with that have been visited with \"processedList\" to avoid cycles\n// If a cycle existed and \"end\" could not be found the code would execute forever\n// Also, using \"processedList\" may be faster in graphs with a large edges/vertices ratio\nprocessedList = [];\nprocessedList.push(start)\n \n// \"Queue\" keeps track of the growth of the paths as the breadth first search proceeds\nqueue = [];\nqueue.push([start]);\n \nwhile (queue.length > 0) {\n path = [];\n path = queue[0];\n queue.splice(0, 1);\n\n vert = path[path.length - 1];\n \n \n if (vert == end) {\n return path;\n }\n\n adjacentVerts = [];\n\n for (var j = 0; j < graph.length; j++) {\n if (graph[vert][j] != 0) {\n adjacentVerts.push(j);\n }\n }\n\n for (var i = 0; i < adjacentVerts.length; i++) {\n\n currVert = adjacentVerts[i];\n\n if (!(processedList.includes(currVert))) {\n processedList.push(currVert);\n newPath = path.slice();\n newPath.push(currVert);\n queue.push(newPath);\n }\n }\n}\nreturn (\"Failure\")\n}", "getDepthByFilename() {\nlet projectPath = this._projectPath;\nlet includesByFilename = {};\nlet includeByFilename = {}; // To check for circular includes...\nlet depthByFilename = {};\nconst makeNodeByFilename = (node) => {\nif (node.includes) {\nincludesByFilename[node.filename] = node.includes;\nnode.includes.forEach((node) => {\nmakeNodeByFilename(node);\n});\n}\n};\nconst makeIncludes = (node) => {\nif (this._error) {\nreturn;\n}\nif (node.includes) {\nnode.includes.forEach((includeNode) => {\nlet filename1 = path.removePath(projectPath, node.filename);\nlet filename2 = includeNode.filename;\nlet index1 = filename1 + '!' + filename2;\nlet index2 = filename2 + '!' + filename1;\nif ((index1 in includeByFilename) || (index2 in includeByFilename)) {\nif (!this._error) {\nif (this._onError) {\nthis._onError({\ntype: 'Error',\nmessage: 'Circular include in ' +\n'<i class=\"error\">\"' + filename1 + '\"</i> and ' +\n'<i class=\"error\">' + filename2 + '\"</i>.'\n});\n}\nthis._error = true;\n}\nreturn;\n}\nincludeByFilename[index1] = true;\nmakeIncludes(includeNode);\n});\n} else if (node.filename in includesByFilename) {\nnode.includes = includesByFilename[node.filename];\n}\n};\nconst makeIncludeOrder = (node, depth) => {\nif (node.filename in depthByFilename) {\ndepthByFilename[node.filename] = Math.max(depthByFilename[node.filename], depth);\n} else {\ndepthByFilename[node.filename] = depth;\n}\nif (node.includes) {\nnode.includes.forEach((node) => {\nmakeIncludeOrder(node, depth + 1);\n});\n}\n};\nmakeNodeByFilename(this._includeRoot);\nmakeIncludes(this._includeRoot);\nif (!this._error) {\nmakeIncludeOrder(this._includeRoot, 0);\n}\nreturn this._error ? null : depthByFilename;\n}", "function setPath(body) {\n if (body.grid1 != null) {\n setPath1(path1 => [...path1, start]);\n \n for (let data of body.grid1){ \n let pos = {lat: data.lat, lng: data.long};\n // console.log(pos);\n setPath1(path1 => [...path1, pos]);\n // setGrid(grid => [...grid, pos]);\n \n } \n setPath1(path1 => [...path1, end]);\n setPath1Length(body.grid1Length);\n setPath1NetElev(body.grid1ElevNet);\n setPath1Shortest(body.grid1Shortest);\n }\n if (body.grid2 != null) { \n setPath2(path2 => [...path2, start]);\n for (let data of body.grid2){ \n let pos = {lat: data.lat, lng: data.long};\n setPath2(path2 => [...path2, pos]);\n }\n \n setPath2(path2 => [...path2, end]);\n setPath2Length(body.grid2Length);\n setPath2NetElev(body.grid2ElevNet);\n setPath2Shortest(body.grid2Shortest);\n }\n if (body.grid3 != null) { \n setPath3(path3=> [...path3, start]);\n for (let data of body.grid3){ \n let pos = {lat: data.lat, lng: data.long};\n setPath3(path3 => [...path3, pos]);\n }\n \n setPath3(path3 => [...path3, end]);\n\n }\n \n }", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function findPaths_nX(from, to, n, lineBanList, costBound) {\n //console.log(\"nX finder (\" + n + \") from \" + from.getName() + \" to \" + to.getName())\n // Basically:\n // f(0) => f(0)\n // f(1) => f(1)\n // f(n) = f(0) + f(n-1) for n >= 2\n var results = new Array();\n if (n <= 0) {\n var tempResult = findPaths_0X(from, to);\n // Need to exclude possibility of some results overapping with the lineStack.\n for (var i = 0; i < tempResult.length; i++) {\n if (lineBanList.indexOf(tempResult[i].connections[0].getLine()) == -1) {\n // Line unused previously. Add it.\n results.push(tempResult[i]);\n }\n }\n return results;\n }\n if (n == 1) {\n var tempResult = findPaths_1X(from, to, costBound);\n // Need to exclude possibility of some results overapping with the lineStack.\n for (var i = 0; i < tempResult.length; i++) {\n var currentPath = tempResult[i];\n var notInvolvedInLinestack = true;\n for (var j = 0; j < 2; j++) {\n if (lineBanList.indexOf(currentPath.connections[j].getLine()) != -1) {\n notInvolvedInLinestack = false;\n }\n }\n if (notInvolvedInLinestack) {\n results.push(currentPath);\n }\n }\n return results;\n }\n for (var i = 0; i < HK18_ALL_LINES.length; i++) {\n var L1 = HK18_ALL_LINES[i];\n if (lineBanList.indexOf(L1) != -1) {\n // It is already being considered. Move on.\n continue;\n }\n var L1_beginCheckIndex = L1.getIndexOfWaypoint(from);\n if (L1_beginCheckIndex == -1) {\n // Line does not call at FROM, user will never be able to leave using Line\n continue;\n }\n // Here, user definitely can depart from FROM.\n // But will he ever reach the destination with paths satisfying the above parameters?\n // There's no easy way to find out except brute-force checking everyone.\n // For each waypoint of L1:\n var L1_stops = L1.getStops();\n var degree = n - 1;\n var newBanList = lineBanList.concat(L1);\n for (var j = L1_beginCheckIndex + 1; j < L1_stops.length; j++) {\n // Conduct search\n var checkingStop = L1_stops[j];\n if (checkingStop.isInternal()) {\n // Interchanging at internal stations is banned. Next ine.\n continue;\n }\n // Find the possible results\n var probableResults = findPaths_nX(checkingStop, to, degree, newBanList, costBound);\n if (probableResults.length == 0) {\n // No results. Next.\n continue;\n }\n // Have results. Prepend/unshift the paths to include this line, then filter by cost bound.\n var thisConnection = new Connection(L1, L1_beginCheckIndex, j);\n for (var k = 0; k < probableResults.length; k++) {\n var currentResult = probableResults[k];\n currentResult.connections.unshift(thisConnection);\n // Add to result if the final cost is lower than costBound.\n if (currentResult.getTotalAdjustedCost() < costBound) {\n console.log(\"Adding path result:\");\n console.log(currentResult);\n results.push(currentResult);\n }\n }\n }\n /*\n let stops = L1.getStops();\n let degree = n - 1;\n let tempLineStack = lineBanList.concat(L1);\n //console.log(\"LineStack = \" + tempLineStack)\n let fromIndex = -1;\n // Check from index = 1 (exclude the 1st) so that the line is effective.\n for (let j = L1_fromIndex + 1; j < stops.length; j++)\n {\n // First check that L1 is contains FROM.\n if (stops[j] == from || stops[j].isNeighborOf(from))\n {\n fromIndex = j;\n break;\n }\n }\n if (fromIndex == -1)\n {\n // User can never depart from FROM using L1. Next line.\n continue;\n }\n \n // We know the user may depart at some index -> FROM.\n // But at which waypoint should the user interchange?\n // Check every waypoint down the line.\n for (let j = fromIndex + 1; j < stops.length; j++)\n {\n \n }\n */\n }\n // Again, having to interchange is a very significant cost already, so we aim to minimize the travel cost.\n var minCost = Infinity;\n for (var i = 0; i < results.length; i++) {\n var calcCost = results[i].getTotalAdjustedCost();\n if (calcCost < minCost) {\n minCost = calcCost;\n }\n }\n for (var i = results.length - 1; i >= 0; i--) {\n if (results[i].getTotalAdjustedCost() > minCost) {\n results.splice(i, 1);\n }\n }\n // Here, we need additional work.\n // Sometimes, you may obtain results where several lines travel along the same path towards the destination.\n // The algorithm may wrongly identify several interchange points and suggests interchanges,\n // but as we humans observe the results, we find that those suggestions are quite similar.\n // We need to eliminate results that are similar.\n var tempResults = results;\n results = [];\n // Transfer tempResults back to results\n for (var i = 0; i < tempResults.length; i++) {\n var shouldAdd = true;\n for (var j = 0; j < results.length; j++) {\n if (!tempResults[i].isDistinctComparedToOther(results[j])) {\n shouldAdd = false;\n break;\n }\n }\n if (shouldAdd) {\n results.push(tempResults[i]);\n }\n }\n // Supposedly, all is done. Return the results.\n return results;\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function alternatingPath(amountOfSurroundingTiles) {\n if (amountOfSurroundingTiles === 0) {\n for (var i = visitedTiles.length - 1; i >= 0 ; i--) {\n var backStepY = parseInt(visitedTiles[i].visibleTile.dataset['yco']);\n var backStepX = parseInt(visitedTiles[i].visibleTile.dataset['xco']);\n\n tiles[backStepX + '|' + backStepY].closed = false;\n\n newStart = checkNeighbours(newStart, backStepX, backStepY);\n /*uppon finding an opportunity to walk by it jumps out the function*/\n if (newStart.length > 0) {\n return newStart;\n };\n\n tiles[backStepX + '|' + backStepY].closed = true;\n };\n } else {\n return;\n };\n}", "function buildRoutes(path) {\n\n for (var name in path) {\n var current = path[name];\n\n if (traverse(path, current, name)) {\n buildRoutes(addRoutes(current, path, name));\n }\n\n }\n }", "function calculateNextVelInPaths(){\n pathStats.size += pathStats.calculateSpeed;\n for (let i = 0; i < pathStats.calculateSpeed; i++){\n for (const p of allPlanets){\n p.calculateNextVelInPath();\n }\n }\n}", "function bestPathFinder(bPath , path){\n if (path < bPath){\n return path;\n }\n return bPath\n}", "function path() {\n if (finds(loc + 61) && tmp - 1 == result[loc + 61]) //bottom node to destinations node\n value = loc + 61;\n else if (finds(loc - 61) && tmp - 1 == result[loc - 61]) //top node to destinations node\n {\n value = loc - 61;\n } else if (\n (loc - 1) % 61 < loc % 61 &&\n finds(loc - 1) &&\n tmp - 1 == result[loc - 1]\n )\n //left side node to destination node\n value = loc - 1;\n else if (\n (loc + 1) % 61 > loc % 61 &&\n finds(loc + 1) &&\n tmp - 1 == result[loc + 1]\n )\n //right side node to destination node\n value = loc + 1;\n else if (\n finds(loc - 62) &&\n (loc - 62) % 61 < loc % 61 &&\n tmp - 1 == result[loc - 62]\n )//top right side node to destination node\n value = loc - 62;\n else if (\n finds(loc - 60) &&\n (loc - 60) % 61 > loc % 61 &&\n tmp - 1 == result[loc - 60]\n )//top left side node to destination node\n value = loc - 60;\n else if (\n finds(loc + 60) &&\n (loc + 60) % 61 < loc % 61 &&\n tmp - 1 == result[loc + 60]\n )//bottom right side node to destination node\n value = loc + 60;\n else if (\n finds(loc + 62) &&\n (loc + 62) % 61 > loc % 61 &&\n tmp - 1 == result[loc + 62]\n )//bottom right side node to destination node\n value = loc + 62;\n\n tmp = result[value];\n loc = value;\n if (loc != source)\n //this gives moving effect to bot\n {\n d[loc].style.backgroundColor = destinationColor;\n \n }\n}", "function Findpath(xStart, yStart, xGoal, yGoal)\n{\n\n \n\n // reset the paths of the tiles from the previous pathfinding tile\n ResetPaths();\n\n var attempts = 0;\n\n var StartingTile = Tiles[xStart][yStart];\n\n if (StartingTile == null)\n {\n console.log(\"uh oh\");\n }\n\n // this array keeps track of all tiles that we need to check (aka the neighboring tiles of already explored tiles)\n var TileQueue = [];\n\n TileQueue.push(StartingTile);\n\n // this array keeps track of all the tiles we've already checked\n //let alreadyVisitedTiles = [StartingTile];\n var alreadyVisitedTiles = [];\n\n // we are returning the final path of the tiles, from beginning to end\n var FinalPath = [];\n\n let EndTileFound = false;\n\n // loop through every tile in the tile queue\n while(TileQueue.length > 0 && EndTileFound == false)\n {\n attempts++;\n var CurrentTile = TileQueue.pop();\n alreadyVisitedTiles.push(CurrentTile);\n // is this the end tile?\n if (CurrentTile.x == xGoal && CurrentTile.y == yGoal)\n {\n\n\n // return the path to get to this tile\n FinalPath = CurrentTile.Path;\n\n // add the finalTile to the path\n FinalPath.push(CurrentTile);\n\n EndTileFound = true;\n\n // we don't need to check the rest of the TileQueue\n break;\n }\n\n if (attempts == 1)\n {\n console.log(\"test\");\n }\n\n // add each of the neighboring tiles to the TileQueue, if we haven't visited them before\n CurrentTile.Neighbours.forEach(function (item, index){\n\n \n // get the path that the pathfinding algorithm took up to this point\n let CurrentPath = CurrentTile.Path;\n\n if((TileQueue.indexOf(item) == -1 ) &&\n alreadyVisitedTiles.indexOf(item) == -1)\n {\n // Javascript copies by reference by default, so we need to create a new object and assign it to the temporary variable...\n let TemporaryPath = []; \n Object.assign(TemporaryPath, CurrentPath); \n TemporaryPath.push(CurrentTile);\n \n\n // add the tile we are visiting the neighboring tile from (the current tile)\n item.Path = TemporaryPath;\n\n // add the neighboring tile to the TileQueue\n TileQueue.unshift(item);\n }\n\n });\n }\n\n if (FinalPath.length == 0)\n {\n console.log(FinalPath.length + Tiles[xStart][yStart].TileType + \" \" + Tiles[xGoal][yGoal].TileType + \" Attempts = \" + attempts);\n console.log(xStart + \",\" + yStart + \"|\");\n console.log(xGoal + \",\" + yGoal);\n\n console.log(alreadyVisitedTiles);\n }\n \n // return the finalPath\n return FinalPath;\n}", "function simplifyPaths(arcs, opts) {\n var simplifyPath = getSimplifyFunction(opts);\n arcs.setThresholds(new Float64Array(arcs.getPointCount())); // Create array to hold simplification data\n if (opts.spherical) {\n simplifyPaths3D(arcs, simplifyPath);\n protectWorldEdges(arcs);\n } else {\n simplifyPaths2D(arcs, simplifyPath);\n }\n if (opts.lock_box) {\n protectContentEdges(arcs);\n }\n }", "function calculatePath (startIndex, endIndex, onlyMeasure = false) {\n // startIndex ist der Index im TileArray von dem der Pfad startet\n // endIndex ist der Index im TileArray zu dem der Pfad geht\n // onlyMeasure = true begrenzt den Pfad nicht auf die maximale Bewegungsweite während einem Kampf\n \n let mappedList = [];\n let frontierList = [];\n let frontierListValues = [];\n let activeNode;\n let pathFound = false;\n let pathToTravel = [];\n let distance = 0;\n \n //Fange Ausnahmen ab startIndex = endIndex\n if (startIndex == endIndex || endIndex == undefined) {\n return {\n first: pathToTravel,\n second: distance\n }\n }\n \n // finde A und füge ihn der frontierList hinzu {name, wayPointUsefulness}\n tileArray[startIndex].entryPoint = \"Start\";\n tileArray[startIndex].distanceTravelled = 0;\n tileArray[startIndex].wayPointUsefulness = tileArray[startIndex].distanceTravelled + tileArray[startIndex].estimatedWayToB(endIndex);\n tileArray[startIndex].difDegree = Phaser.Math.Angle.BetweenPoints(tileArray[startIndex], tileArray[endIndex]);\n frontierList.push(tileArray[startIndex]);\n \n // gehe folgende Schleife solange durch bis es einen Weg gibt\n while (pathFound == false) {\n \n // Wenn kein Weg möglich ist brich diese Schleife ab\n if (frontierList.length == 0) {\n pathToTravel = [];\n break;\n }\n \n // gehe frontierList durch nach niedrigster wayPointUsefulness + Tiebreaker (geringster Winkelunterschied zur Luftlinie)\n frontierListValues.length = 0;\n for (let i = 0; i < frontierList.length; i++) {\n let difDegree = Math.abs(Phaser.Math.Angle.ShortestBetween(tileArray[startIndex].difDegree, frontierList[i].difDegree))/1000;\n frontierListValues.push(frontierList[i].wayPointUsefulness + difDegree);\n }\n activeNode = frontierListValues.indexOf(Math.min(...frontierListValues));\n \n // Wenn Knoten mit Niedrigster wayPointUsefulness schon das Ziel ist, ist A* fertig\n if (frontierList[activeNode].name == endIndex) {\n pathFound = true; // unterbricht diese Schleife und damit das Pfadsuchen\n let backtraceIndex = endIndex; // Sucht den Index des Zielfeldes\n pathToTravel.unshift(backtraceIndex); // Fügt das Zielfeld dem Pfad hinzu\n \n while (tileArray[tileArray[backtraceIndex].entryPoint].name != startIndex) {\n pathToTravel.unshift(tileArray[backtraceIndex].entryPoint);\n backtraceIndex = tileArray[backtraceIndex].entryPoint;\n }\n \n break;\n }\n \n // berechne für diesen alle neighbors\n frontierList[activeNode].checkForNeighbors();\n \n // Füge Neighbors des aktuellen Knotens der Frontierlist hinzu\n for (let i = 0; i < frontierList[activeNode].neighbors.length; i++) {\n \n let distanceTravelled = frontierList[activeNode].distanceTravelled + frontierList[activeNode].neighborsDistance[i];\n if (containsObject(frontierList[activeNode].neighbors[i], frontierList)) {\n if (distanceTravelled < frontierList[activeNode].neighbors[i].distanceTravelled) {\n frontierList[activeNode].neighbors[i].distanceTravelled = distanceTravelled;\n frontierList[activeNode].neighbors[i].wayPointUsefulness = frontierList[activeNode].neighbors[i].distanceTravelled + frontierList[activeNode].neighbors[i].estimatedWayToB(endIndex);\n frontierList[activeNode].neighbors[i].entryPoint = frontierList[activeNode].name;\n }\n } else if (containsObject(frontierList[activeNode].neighbors[i], mappedList)) {\n continue;\n } else {\n frontierList[activeNode].neighbors[i].distanceTravelled = frontierList[activeNode].distanceTravelled + frontierList[activeNode].neighborsDistance[i];\n frontierList[activeNode].neighbors[i].wayPointUsefulness = frontierList[activeNode].neighbors[i].distanceTravelled + frontierList[activeNode].neighbors[i].estimatedWayToB(endIndex);\n frontierList[activeNode].neighbors[i].entryPoint = frontierList[activeNode].name;\n frontierList[activeNode].neighbors[i].difDegree = Phaser.Math.Angle.BetweenPoints(frontierList[activeNode].neighbors[i], tileArray[endIndex])\n frontierList.push(frontierList[activeNode].neighbors[i]);\n }\n }\n \n // Füge den aktiven Knoten der mappedList hinzu und Lösche den aktven Knoten aus der frontierList\n mappedList.push(frontierList[activeNode]);\n frontierList.splice(activeNode,1);\n }\n \n // wenn gerade ein Kampf ist soll die Bewegung begrenzt sein auf die Maximale Bewegungsweite des aktiven Charakters\n if (fightmode == true && onlyMeasure == false) {\n movementStopper: for (let l = 0; l < pathToTravel.length; l++) {\n if (tileArray[pathToTravel[l]].distanceTravelled > activeChar.movementCounter) {\n pathToTravel.length = l;\n break movementStopper;\n }\n }\n }\n \n // wenn das Ziefeld der Bewegung besetzt ist, wird die Bewegung gekürzt\n checkEnd: while (pathToTravel.length > 0) {\n if (checkFor (tileArray[pathToTravel[pathToTravel.length-1]].occupiedBy, Figure) || checkFor (tileArray[pathToTravel[pathToTravel.length-1]].occupiedBy, Enemy)) {\n pathToTravel.length = pathToTravel.length-1;\n } else {\n break checkEnd;\n }\n }\n \n // speichert die Entfernung bis zum Ende des Pfades\n if (pathToTravel.length > 0) {\n distance += tileArray[pathToTravel[pathToTravel.length-1]].distanceTravelled;\n }\n \n // räumt alle Tiles wieder auf\n clearNodes();\n return {\n first: pathToTravel,\n second: distance\n }\n}", "composedPath() {\n const composedPath = [];\n\n const { currentTarget, _path: path } = this;\n\n if (path.length === 0) {\n return composedPath;\n }\n\n composedPath.push(currentTarget);\n\n let currentTargetIndex = 0;\n let currentTargetHiddenSubtreeLevel = 0;\n\n for (let index = path.length - 1; index >= 0; index--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (rootOfClosedTree) {\n currentTargetHiddenSubtreeLevel++;\n }\n\n if (item === idlUtils.implForWrapper(currentTarget)) {\n currentTargetIndex = index;\n break;\n }\n\n if (slotInClosedTree) {\n currentTargetHiddenSubtreeLevel--;\n }\n }\n\n let currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n let maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let i = currentTargetIndex - 1; i >= 0; i--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[i];\n\n if (rootOfClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.unshift(idlUtils.wrapperForImpl(item));\n }\n\n if (slotInClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let index = currentTargetIndex + 1; index < path.length; index++) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (slotInClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.push(idlUtils.wrapperForImpl(item));\n }\n\n if (rootOfClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n return composedPath;\n }", "path(start, end)\n {\n // Check if the end is reachable\n let endInfo = this.positionInfo(end);\n if (endInfo.passable === false)\n return undefined;\n\n // For node n, parent[n] is the node immediately preceding it on the cheapest path from start to n currently known\n let parent = new Map();\n\n // For node n, gScore[n] is the cost of the cheapest path from start to n currently known\n let gScore = new Map([[start.toString(), 0]]);\n\n // For node n, fScore[n] = gScore[n] + h(n)\n let fScore = new Map([[start.toString(), 0]]);\n\n // The heap of discovered nodes that need to be (re-)expanded\n let openHeap = new BinaryHeap(node => fScore.get(node.toString()) || 0);\n openHeap.push(start);\n\n // The set of closed nodes\n let closedSet = new Set();\n\n // Iterate while the heap is not empty\n while (openHeap.size > 0)\n {\n // Grab the lowest f(x) to process next\n let node = openHeap.pop();\n\n // End case -- result has been found, return the traced path\n if (node.x === end.x && node.y === end.y)\n {\n let path = [node];\n while (parent.has(node.toString()))\n {\n node = parent.get(node.toString());\n path.unshift(node);\n }\n return path.map(position => this.positionInfo(position));\n }\n\n // Normal case -- move node from open to closed, process each of its neighbors\n closedSet.add(node.toString());\n\n // Find all neighbors for the current node\n for (let neighbor of this.getNeighbors(node))\n {\n let neighborInfo = this.positionInfo(neighbor);\n\n // If the neighbor is already closed or is not passable, then continue\n if (closedSet.has(neighbor.toString()) || neighborInfo.passable === false)\n continue;\n\n // The g score is the shortest distance from start to current node\n // We need to check if the path we have arrived at this neighbor is the shortest one we have seen yet\n let gScoreTentative = gScore.get(node.toString()) + neighborInfo.cost;\n if (!gScore.has(neighbor.toString()) || gScoreTentative < gScore.get(neighbor.toString()))\n {\n parent.set(neighbor.toString(), node);\n gScore.set(neighbor.toString(), gScoreTentative);\n fScore.set(neighbor.toString(), gScoreTentative + Vector.manhattanDistance(neighbor, end));\n\n if (!openHeap.has(neighbor))\n openHeap.push(neighbor);\n else\n openHeap.rescoreElement(neighbor);\n }\n }\n }\n\n // No path found, so return undefined\n return undefined;\n }", "function pathGatherer(){\n var indicator = Grid[EndPoint[0]][EndPoint[1]].VisitedAt\n var currentPoint = [EndPoint[0],EndPoint[1]]\n var path = []\n\n while( indicator != 0){\n console.log(indicator)\n console.log(\"Current: \" + currentPoint[0] + \"-\" + currentPoint[1])\n if(currentPoint[0]!=EndPoint[0] | currentPoint[1]!=EndPoint[1]){\n console.log(currentPoint,\"not equal to\",EndPoint)\n document.getElementById(Grid[currentPoint[0]][currentPoint[1]].id).innerHTML=\"<div id='path\"+currentPoint[0]+\"x\"+currentPoint[1]+\"' class='path'></div>\";\n document.getElementById(\"path\"+currentPoint[0]+\"x\"+currentPoint[1]).style.animationDelay=indicator/15+\"s\"\n }\n \n Grid[currentPoint[0]][currentPoint[1]].State = \"Path\"\n //update, find the \n indicator -= 1\n //-x NORTH\n if(currentPoint[0] > 0){\n if(Grid[currentPoint[0]-1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"NORTH\"])\n currentPoint[0] -= 1\n continue\n }\n \n }\n //+x SOUTH\n if(currentPoint[0] < GRID_ROW_SIZE-1){\n if(Grid[currentPoint[0]+1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"SOUTH\"])\n currentPoint[0] += 1\n continue\n }\n \n }\n //-y WEST\n if(currentPoint[1] > 0){\n if(Grid[currentPoint[0]][currentPoint[1]-1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"WEST\"])\n currentPoint[1] -= 1\n continue\n }\n \n }\n //+y EAST\n if(currentPoint[1] < GRID_COL_SIZE-1){\n if(Grid[currentPoint[0]][currentPoint[1]+1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"EAST\"])\n currentPoint[1] += 1\n continue\n }\n \n }\n\n }\n //!! the path is the REVERSE PATH from the END to the START \n Grid[EndPoint[0]][EndPoint[1]].State = \"End\"\n console.log(path)\n consoleGridPrinter()\n}", "getPaths(regex, point = new Coordinate(0,0)){\n // Paths will be a multi-dimension array that basically \n // substitutes the parenthesis in the regex\n // We can traverse down any path this way\n let paths = [[0]];\n let i = 0;\n let j = 0;\n let char = -1;\n\n // Keeps track of where we are\n let location = new Coordinate(point.x, point.y);\n this.visited[location] = true;\n\n // Navigate through the regex\n while(++char < regex.length){\n // New path\n if(regex[char] == '|'){\n paths[++i] = [0];\n j = 0;\n location = new Coordinate(point.x, point.y);\n }\n // Another layer found, recurse down\n else if(regex[char] == '('){\n let inner = this.getPaths(regex.substring(char + 1), location);\n // Offset what character we are looking at to avoid infinite recursion\n char += inner.end;\n // Group the inner paths with the outer path\n paths[i][++j] = inner.paths;\n // True if the path doesn't need to traverse down into deeper layers\n // Example: EESS(WNSE|)SSS\n if(regex[char + 1] && regex[char + 1] != '|' && regex[char + 1] != ')'){ \n paths[i][++j] = 0;\n }\n }\n // Layer ends\n else if(regex[char] == ')'){\n break;\n }\n // Add to the path\n else{\n // Move our location\n switch(regex[char]){\n case 'N': location.north(); break;\n case 'S': location.south(); break;\n case 'E': location.east(); break;\n case 'W': location.west(); break;\n }\n // We have not been here before, count it\n if(!this.visited[location]){\n this.visited[location] = true;\n paths[i][j]++;\n }\n }\n }\n // Return where we ended and the paths created\n return {\n end: char + 1,\n paths: paths\n }\n }", "function gen_intermediate_code_internal(/* CPUARMState * */ env,\n /* TranslationBlock * */ tb,\n /* int */ search_pc)\n{\n var /* DisasContext */ dc1, dc=dc1;/* *dc = &dc1;*/\n var /* uint16_t * */ gen_opc_end;\n var j, lj;\n var /* target_ulong */ pc_start;\n var /* uint32_t */ next_page_start;\n dc1 = new DisasContext();\n dc=dc1;\n /* generate intermediate code */\n pc_start = tb.pc;\n\n dc.tb = tb;\n\n //gen_opc_ptr = gen_opc_buf;\n //gen_opc_end = gen_opc_buf + (512 - 32);\n //gen_opparam_ptr = gen_opparam_buf;\n\n dc.is_jmp = 0;\n dc.pc = pc_start;\n dc.singlestep_enabled = env.singlestep_enabled;\n dc.condjmp = 0;\n dc.thumb = env.thumb;\n dc.condexec_mask = (env.condexec_bits & 0xf) << 1;\n dc.condexec_cond = env.condexec_bits >> 4;\n dc.is_mem = 0;\n\n if (arm_feature(env, ARM_FEATURE_M)) {\n dc.user = ((env.v7m.exception == 0) && (env.v7m.control & 1));\n } else {\n dc.user = (env.uncached_cpsr & 0x1f) == ARM_CPU_MODE_USR;\n }\n\n next_page_start = (pc_start & ~((1 << 10) - 1)) + (1 << 10);\n //nb_gen_labels = 0;\n lj = -1;\n /* Reset the conditional execution bits immediately. This avoids\n complications trying to do it at the end of the block. */\n if (env.condexec_bits)\n gen_op_set_condexec(0);\n do {\n\n if (dc.pc >= 0xfffffff0 && arm_feature(env, ARM_FEATURE_M)) {\n /* We always get here via a jump, so know we are not in a\n conditional execution block. */\n gen_op_exception_exit();\n }\n\n /*\n if (env.nb_breakpoints > 0) {\n for(j = 0; j < env.nb_breakpoints; j++) {\n if (cpu_single_env.breakpoints[j] == dc.pc) {\n gen_set_condexec(dc);\n gen_op_movl_T0_im((long)dc.pc);\n gen_op_movl_reg_TN[0][15]();\n gen_op_debug();\n dc.is_jmp = 1;\n // Advance PC so that clearing the breakpoint will\n // invalidate this TB. \n dc.pc += 2;\n goto done_generating;\n break;\n }\n }\n }\n */\n /*\n if (search_pc) {\n j = gen_opc_ptr - gen_opc_buf;\n if (lj < j) {\n lj++;\n while (lj < j)\n gen_opc_instr_start[lj++] = 0;\n }\n gen_opc_pc[lj] = dc.pc;\n gen_opc_instr_start[lj] = 1;\n }\n */\n if (env.thumb) {\n disas_thumb_insn(env, dc);\n if (dc.condexec_mask) {\n dc.condexec_cond = (dc.condexec_cond & 0xe)\n | ((dc.condexec_mask >> 4) & 1);\n dc.condexec_mask = (dc.condexec_mask << 1) & 0x1f;\n if (dc.condexec_mask == 0) {\n dc.condexec_cond = 0;\n }\n }\n } else {\n disas_arm_insn(env, dc);\n }\n if (dc.condjmp && !dc.is_jmp) {\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n dc.condjmp = 0;\n }\n /* Terminate the TB on memory ops if watchpoints are present. */\n /* FIXME: This should be replacd by the deterministic execution\n * IRQ raising bits. */\n //if (dc.is_mem && env.nb_watchpoints)\n // break;\n\n /* Translation stops when a conditional branch is enoutered.\n * Otherwise the subsequent code could get translated several times.\n * Also stop translation when a page boundary is reached. This\n * ensures prefech aborts occur at the right place. */\n } while (!dc.is_jmp && /* gen_opc_ptr < gen_opc_end &&\n !env.singlestep_enabled && */ dc.pc < next_page_start);\n\n /* At this stage dc.condjmp will only be set when the skipped\n instruction was a conditional branch or trap, and the PC has\n already been written. */\n if (env.singlestep_enabled == 0) {\n /* Make sure the pc is updated, and raise a debug exception. */\n if (dc.condjmp) {\n gen_set_condexec(dc);\n if (dc.is_jmp == 5) {\n gen_op_swi();\n } else {\n gen_op_debug();\n }\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n }\n if (dc.condjmp || !dc.is_jmp) {\n gen_op_movl_T0_im(dc.pc);\n gen_op_movl_reg_TN[0][15]();\n dc.condjmp = 0;\n }\n gen_set_condexec(dc);\n if (dc.is_jmp == 5 && !dc.condjmp) {\n gen_op_swi();\n } else {\n /* FIXME: Single stepping a WFI insn will not halt\n the CPU. */\n gen_op_debug();\n }\n } else {\n /* While branches must always occur at the end of an IT block,\n there are a few other things that can cause us to terminate\n the TB in the middel of an IT block:\n - Exception generating instructions (bkpt, swi, undefined).\n - Page boundaries.\n - Hardware watchpoints.\n Hardware breakpoints have already been handled and skip this code.\n */\n gen_set_condexec(dc);\n switch(dc.is_jmp) {\n case 0:\n gen_goto_tb(dc, 1, dc.pc);\n break;\n default:\n case 1:\n case 2:\n /* indicate that the hash table must be used to find the next TB */\n gen_op_movl_T0_0();\n gen_op_exit_tb();\n break;\n case 3:\n /* nothing more to generate */\n break;\n case 4:\n gen_op_wfi();\n break;\n case 5:\n gen_op_swi();\n break;\n }\n if (dc.condjmp) {\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n gen_set_condexec(dc);\n gen_goto_tb(dc, 1, dc.pc);\n dc.condjmp = 0;\n }\n }\n /* XXX: FIX ME GOTO\ndone_generating:\n gen_opc_ptr.push({func:op_end);\n*/\n /*\n if (loglevel & (1 << 1)) {\n fprintf(logfile, \"----------------\\n\");\n fprintf(logfile, \"IN: %s\\n\", lookup_symbol(pc_start));\n target_disas(logfile, pc_start, dc.pc - pc_start, env.thumb);\n fprintf(logfile, \"\\n\");\n if (loglevel & ((1 << 2))) {\n fprintf(logfile, \"OP:\\n\");\n dump_ops(gen_opc_buf, gen_opparam_buf);\n fprintf(logfile, \"\\n\");\n }\n }\n */\n /*\n if (search_pc) {\n j = gen_opc_ptr - gen_opc_buf;\n lj++;\n while (lj <= j)\n gen_opc_instr_start[lj++] = 0;\n } else {\n */\n gen_opc_ptr.push({func:op_end});\n tb.size = dc.pc - pc_start;\n //}\n return 0;\n}", "dedupePathParts(path) {\n let startPathIdxs = [];\n let curPathIdx = -1;\n let startPartPos = 0;\n let intersections = [];\n let pathParts = [];\n for (let i = 1; i < path.length; i++) {\n let lastKey = path[i - 1].x + \"__\" + path[i - 1].y;\n let key = path[i].x + \"__\" + path[i].y;\n if (this.pathsMatrix[lastKey] && this.pathsMatrix[key] && !this.pathsMatrix[key][curPathIdx]) {\n let commonIdxs = _.intersection(_.keys(this.pathsMatrix[lastKey]), _.keys(this.pathsMatrix[key]));\n if (commonIdxs.length > 0) {\n if (curPathIdx === -1 && i !== 1) {\n pathParts.push({\n path: path.slice(startPartPos, i),\n startPathIdxs: startPathIdxs,\n endPathIdxs: getPathIdxs(this.pathsMatrix, lastKey),\n intersections: intersections\n });\n }\n curPathIdx = commonIdxs[0];\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n curPathIdx = -1;\n }\n }\n else if (this.pathsMatrix[lastKey] && !this.pathsMatrix[key]) {\n if (curPathIdx === -1) {\n intersections.push(..._.map(_.keys(this.pathsMatrix[lastKey]), (idx) => {\n return {\n idx: idx,\n from: i - startPartPos,\n pos: this.pathsMatrix[lastKey][idx]\n };\n }));\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n }\n curPathIdx = -1;\n }\n }\n if (curPathIdx === -1) {\n pathParts.push({\n path: path.slice(startPartPos),\n startPathIdxs: startPathIdxs,\n endPathIdxs: [],\n intersections: intersections\n });\n }\n // console.log(\"---\");\n // pathParts.forEach((pathPart) => {\n // console.log(pathPart);\n // });\n return pathParts;\n }", "function GetPath2() : int {\n\t\tnumberOfHops = 0; \n\t\tnumberOfHops1 = 0; \n\t\tvar ToMovePos : int; \n\t\tvar ToMovePos2 : int; \n\n\t\tvar i : int = 0;\n\t\tfor(var a : int = 0; a < ClosedNodes.Length; a++){ \n\t\t\tif (ClosedNodes[a] != 0){ \n\t\t\t\ti++; \n\t\t\t\t//Debug.Log(parent_Closed[a]+\" \"+ClosedNodes[a]);\n\t\t\t\t} }\n\n\t\tvar match_name = targetLeaf;\n\t\tfor(var b : int = (i-1); b >= 0 ; b--){\n\t\t\tif (ClosedNodes[b] == match_name){\n\t\t\t\tnumberOfHops++;\n\t\t\t\tmatch_name = parent_Closed[b];\n\t\t\t\tif (match_name == frogLeaf ){\n\t\t\t\t\tToMovePos = ClosedNodes[b];\n\t\t\t\t\tb = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\tvar match_name2 = targetLeaf2;\n\t\t\tfor(var c : int = (i-1); c >= 0 ; c--){\n\t\t\tif (ClosedNodes[c] == match_name2){\n\t\t\t\tnumberOfHops1++;\n\t\t\t\t//Debug.Log(parent_Closed[b]);\n\t\t\t\tmatch_name2 = parent_Closed[c];\n\t\t\t\tif (match_name2 == frogLeaf ){\n\t\t\t\t\tToMovePos2 = ClosedNodes[c];\n\t\t\t\t\tc = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n\t\tif (numberOfHops1 !=0){\n\t\t\tif (numberOfHops1 < numberOfHops){\n\t\t\t\t//Debug.Log(\"ToMovePos2 \"+ToMovePos2);\n\t\t\t\treturn ToMovePos2;\n\t\t\t\t}\n\t\t\telse if(numberOfHops !=0){\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\t\t\treturn ToMovePos;\n\t\t\t\t\t}\n\t\t\t\t else{\n\t\t\t\t \t//Debug.Log(\"ToMovePos2 \"+ToMovePos2); \n\t\t\t\t \treturn ToMovePos2;\n\t\t\t\t \t}\n\t\t\t}\n\t\telse {\n\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\treturn ToMovePos;\n\t\t\t}\n\t}", "animateShortestPath(nodesInShortestPathOrder) {\n for (let i = 1; i < nodesInShortestPathOrder.length-1; i++) {\n setTimeout(() => {\n const node = nodesInShortestPathOrder[i];\n document.getElementById(`node-${node.row}-${node.col}`).className =\n 'node node-shortest-path';\n }, 50 * i);\n }\n if(nodesInShortestPathOrder.length<=1){\n setTimeout(() => {\n alert(\"Path Not Found!!\");\n },1000);\n }\n }", "findShortestPaths(source) {\n source.setDistance(0)\n let unsettledNodes = []\n let settledNodes = []\n\n unsettledNodes.push(source)\n let a = 0\n while (unsettledNodes.length != 0) {\n a++\n let currentNode = this.getLowestDistanceNode(unsettledNodes)\n unsettledNodes.splice(unsettledNodes.indexOf(currentNode), 1)\n\n for (let i = 0; i < currentNode.adjacentNodes.length; i++) {\n let adjacentNode = currentNode.adjacentNodes[i][0]\n let edgeWeight = currentNode.adjacentNodes[i][1]\n if (!settledNodes.includes(adjacentNode) && !unsettledNodes.includes(adjacentNode)) {\n this.calculateMinimumDistance(adjacentNode, edgeWeight, currentNode)\n unsettledNodes.push(adjacentNode)\n }\n }\n settledNodes.push(currentNode)\n }\n //console.log(a + \" iterations\")\n }", "fillMazeProcedural(mazeTemplateCompressed) {\n const template = this.Utilities.uncompressTemplate(mazeTemplateCompressed);\n // tslint:disable-next-line:prefer-const\n let path = template.MazePath.split(\"\");\n this.StartLocation = template.StartLocation;\n this.EndLocation = template.EndLocation;\n this.BestPath = template.BestPath;\n this.MazeDifficulty = template.MazeDifficulty;\n this.GridWidth = template.GridWidth;\n this.GridHeight = template.GridHeight;\n this.GridLayers = template.GridLayers;\n this.MazeGrid = this.generateGrid();\n // MazePath: myMaze.MazePath,\n // Start: JSON.stringify(myMaze.StartLocation),\n // End: JSON.stringify(myMaze.EndLocation),\n // BestPath: myMaze.BestPath,\n // Difficulty: myMaze.MazeDifficulty,\n // tslint:disable-next-line:prefer-const\n let cellsList = [new Cell(0, 0, 0)];\n let next;\n let mazePath = \"\";\n let index = -1;\n while (cellsList.length > 0) {\n // index is the newest\n index = cellsList.length - 1;\n const currentCell = cellsList[index];\n next = path.shift();\n if (next === \"\" || next === undefined) {\n break;\n }\n else if (next === this.Utilities.Back) {\n cellsList.splice(index, 1);\n }\n else {\n const nextCell = this.directionModifier(cellsList[index], next);\n // const result2: any = \n this.carvePathBetweenCells(currentCell, nextCell, next);\n this.MazeGrid[currentCell.Z][currentCell.Y][currentCell.X] = currentCell;\n this.MazeGrid[nextCell.Z][nextCell.Y][nextCell.X] = nextCell;\n cellsList.push(nextCell);\n index = -1;\n }\n if (index !== -1) {\n cellsList.splice(index, 1);\n }\n mazePath += next;\n }\n return mazePath;\n }", "findPaths(){\n gridArray.forEach(function(yValue, yCoord){\n yValue.forEach(function(xValue, xCoord){\n BadBoggle.searchPath([[yCoord, xCoord]], yCoord, xCoord);\n });\n });\n }", "function crawl(path) {\n\t if (path.is(\"_templateLiteralProduced\")) {\n\t crawl(path.get(\"left\"));\n\t crawl(path.get(\"right\"));\n\t } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n\t path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n\t }\n\t}", "function crawl(path) {\n\t if (path.is(\"_templateLiteralProduced\")) {\n\t crawl(path.get(\"left\"));\n\t crawl(path.get(\"right\"));\n\t } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n\t path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n\t }\n\t}", "function findPath(startPos, goalPos, pathNumber, ignoreTowerSpawns, ignoreTowers) {\n //copy mapGrid array to a temp array\n var grid = copyArray(gameLoop.returnMapOfPath(pathNumber));\n\n //Set Goal\n grid[goalPos.indexX][goalPos.indexY] = 'GOAL';\n\n // Each \"location\" will store its coordinates\n // and the shortest path required to arrive there\n var location = {\n distX: startPos.indexX,\n distY: startPos.indexY,\n path: [],\n block: 'START'\n };\n\n // Initialize the queue with the start location already inside\n var queue = [location];\n\n // Loop through the grid searching for the goal\n while (queue.length > 0) {\n // Take the first location off the queue\n var currentLocation = queue.shift();\n\n // Explore North\n var newLocation = exploreInDirection(currentLocation, 0, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore East\n var newLocation = exploreInDirection(currentLocation, 1, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore South\n var newLocation = exploreInDirection(currentLocation, 2, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore West\n var newLocation = exploreInDirection(currentLocation, 3, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n }\n\n // No valid path found\n return false;\n\n}", "function optimize(ast) {\n }", "function optimize(ast) {\n }", "function optimizeBootModules () {\n\t\t\tgrunt.log.writeln('OK'.green);\n\t\t\tif (!options.dirs || !options.dirs.length) {\n\t\t\t\tfinalize();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgrunt.util.async.forEachSeries(options.dirs, function(dir, next) {\n\t\t\t\tif (typeof dir === 'string') {\n\t\t\t\t\tdir = {\n\t\t\t\t\t\tcombine: false,\n\t\t\t\t\t\tname: dir\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptimizeDir(dir, next);\n\t\t\t}, function () {\n\t\t\t\tfinalize();\n\t\t\t});\n\t\t}", "function checkPathOfIndivue(individue)\n{\n var path = [];\n var position = Object.assign({},init_position);\n var steps = individue.data\n steps.forEach(function(doubleNible){\n var firstSetOfMovements = posible_directions[doubleNible & filter[1] >>> 4];\n var secondSetOfMovements = posible_directions[doubleNible & filter[0]];\n\n firstSetOfMovements.forEach(function(step){\n switch(step)\n {\n case lft:\n if(position.y-1>=0)\n {\n var temp_element=map[position.x][position.y-1];\n if(!Object.is(temp_element,wall_character)){ position.y--; path.push(step);}\n }\n break;\n case rgt:\n if(position.y+1<map.length)\n {\n var temp_element=map[position.x][position.y+1];\n if(!Object.is(temp_element,wall_character)){ position.y++; path.push(step); }\n }\n break;\n case up_:\n if(position.x-1>=0)\n {\n var temp_element=map[position.x-1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x--; path.push(step); }\n }\n break;\n case dwn:\n if(position.x+1<map[0].length)\n {\n var temp_element=map[position.x+1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x++; path.push(step); }\n }\n break;\n }\n })\n secondSetOfMovements.forEach(function(step){\n switch(step)\n {\n case lft:\n if(position.y-1>=0)\n {\n var temp_element=map[position.x][position.y-1];\n if(!Object.is(temp_element,wall_character)){ position.y--; path.push(step);}\n }\n break;\n case rgt:\n if(position.y+1<map.length)\n {\n var temp_element=map[position.x][position.y+1];\n if(!Object.is(temp_element,wall_character)){ position.y++; path.push(step); }\n }\n break;\n case up_:\n if(position.x-1>=0)\n {\n var temp_element=map[position.x-1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x--; path.push(step); }\n }\n break;\n case dwn:\n if(position.x+1<map[0].length)\n {\n var temp_element=map[position.x+1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x++; path.push(step); }\n }\n break;\n }\n })\n })\n return path;\n}", "function possiblePaths(n,paths){\nif(n==1){\n paths=1;\n return paths;\n}\nif(n==2){\n paths=2;\n return paths;\n}\nif(n==3){\n paths=4;\n return paths;\n}\npaths=possiblePaths(n-1)+possiblePaths(n-2)+possiblePaths(n-3);\nreturn paths;\n}", "function calculatePath() {\n // create Nodes from the Start and End x,y coordinates\n let mypathStart = Node(null, { x: pathStart[0], y: pathStart[1] });\n let mypathEnd = Node(null, { x: pathEnd[0], y: pathEnd[1] });\n // create an array that will contain all world cells\n let AStar = new Array(worldSize);\n // list of currently open Nodes\n let Open = [mypathStart];\n // list of the final output array\n let result = [];\n // reference to a Node (that is nearby)\n let myNeighbours;\n // reference to a Node (that we are considering now)\n let myNode;\n // reference to a Node (that starts a path in question)\n let myPath;\n // temp integer variables used in the calculations\n let length, max, min, i, j;\n // iterate through the open list until none are left\n do {\n max = worldSize;\n min = -1;\n for (i = 0; i < length; i++) {\n if (Open[i].f < max) {\n max = Open[i].f;\n min = i;\n }\n }\n // grab the next node and remove it from Open array\n myNode = Open.splice(min, 1)[0];\n // is it the destination node?\n if (myNode.value === mypathEnd.value) {\n // we found a path!\n do {\n result.unshift([myNode.x, myNode.y]);\n\n myNode = myNode.Parent;\n }\n while (myNode !== null);\n\n // clear the working arrays\n AStar = Open = [];\n\n return result;\n }\n\n // find which nearby nodes are walkable\n myNeighbours = neighbours(myNode.x, myNode.y);\n for (i = 0, j = myNeighbours.length; i < j; i++) {\n // test each one that hasn't been tried already\n myPath = Node(myNode, myNeighbours[i]);\n if (!AStar[myPath.value]) {\n // estimated cost of this particular route so far\n myPath.g = myNode.g + distanceFunction(myNeighbours[i], myNode);\n // estimated cost of entire guessed route to the destination\n myPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n // remember this new path for testing above\n Open.push(myPath);\n // mark this node in the world graph as visited\n AStar[myPath.value] = true;\n }\n }\n\n length = Open.length;\n } while (0 < length);\n\n return result;\n }", "function calculatePath() {\n\t // create Nodes from the Start and End x,y coordinates\n\t var mypathStart = Node(null, { x: pathStart[0], y: pathStart[1] });\n\t var mypathEnd = Node(null, { x: pathEnd[0], y: pathEnd[1] });\n\t // create an array that will contain all world cells\n\t var AStar = new Array(worldSize);\n\t // list of currently open Nodes\n\t var Open = [mypathStart];\n\t // list of closed Nodes\n\t var Closed = [];\n\t // list of the final output array\n\t var result = [];\n\t // reference to a Node (that is nearby)\n\t var myNeighbours;\n\t // reference to a Node (that we are considering now)\n\t var myNode;\n\t // reference to a Node (that starts a path in question)\n\t var myPath;\n\t // temp integer variables used in the calculations\n\t var length, max, min, i, j;\n\t // iterate through the open list until none are left\n\t while (length = Open.length) {\n\t max = worldSize * 999999;\n\t min = -1;\n\t for (i = 0; i < length; i++) {\n\t if (Open[i].f < max) {\n\t max = Open[i].f;\n\t min = i;\n\t }\n\t }\n\t // grab the next node and remove it from Open array\n\t myNode = Open.splice(min, 1)[0];\n\t // is it the destination node?\n\t if (myNode.value === mypathEnd.value) {\n\t myPath = Closed[Closed.push(myNode) - 1];\n\t do {\n\t result.push([myPath.x, myPath.y]);\n\t } while (myPath = myPath.Parent);\n\t // clear the working arrays\n\t AStar = Closed = Open = [];\n\t // we want to return start to finish\n\t result.reverse();\n\t } else // not the destination\n\t {\n\t // find which nearby nodes are walkable\n\t myNeighbours = Neighbours(myNode.x, myNode.y);\n\t // test each one that hasn't been tried already\n\t for (i = 0, j = myNeighbours.length; i < j; i++) {\n\t myPath = Node(myNode, myNeighbours[i], world[myNeighbours[i].x][myNeighbours[i].y]);\n\t if (!AStar[myPath.value]) {\n\t // estimated cost of this particular route so far\n\t myPath.g += myNode.g + distanceFunction(myNeighbours[i], myNode);\n\t // estimated cost of entire guessed route to the destination\n\t myPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n\t // remember this new path for testing above\n\t Open.push(myPath);\n\t // mark this node in the world graph as visited\n\t AStar[myPath.value] = true;\n\t }\n\t }\n\t // remember this route as having no more untested options\n\t Closed.push(myNode);\n\t }\n\t } // keep iterating until the Open list is empty\n\t return result;\n\t }", "solveDFS() {\n for (let maxDepth = 0; maxDepth <= 10; maxDepth++) {\n let path = this.dfs(maxDepth);\n if (path) {\n this.drawSolvedPath(path);\n return path;\n }\n }\n return null;\n }", "computePathToComplete(){\n if (Object.keys(this.state.legs_dict).length !== 0 &&Object.keys(this.state.stops_dict).length !== 0 && this.state.driver_location !== null) {\n\n // Time required to complete all legs\n var time_complete_all_legs = 0\n // Time required to complete driver's remaining path\n var time_complete = 0\n \n // Append legs dictionary with start and stop locations and compute time required to drive from start to stop.\n // Also, compute times to complete driver's path and all legs\n var new_legs_dict = {}\n var is_passed_driver_leg = false\n\n for (var key in this.state.legs_dict) {\n var dict_specs = this.state.legs_dict[key]\n dict_specs[\"startStop_x\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"x\"]\n dict_specs[\"startStop_y\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"y\"]\n dict_specs[\"endStop_x\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"x\"]\n dict_specs[\"endStop_y\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"y\"]\n \n // Distance between subsequent stops\n var dist = Math.sqrt(Math.pow(dict_specs[\"endStop_x\"] - dict_specs[\"startStop_x\"], 2) + \n Math.pow(dict_specs[\"endStop_y\"] - dict_specs[\"startStop_y\"], 2))\n // Time required to drive from the start to the stop point\n dict_specs[\"time\"] = dist / dict_specs[\"speedLimit\"]\n\n // Update leg info\n new_legs_dict[key] = dict_specs\n\n // Update time to complete the entire path and the remaining path\n time_complete_all_legs += new_legs_dict[key][\"time\"]\n if (is_passed_driver_leg) time_complete += new_legs_dict[key][\"time\"]\n if (key === this.state.driver_location[\"activeLegID\"]) is_passed_driver_leg = true\n }\n\n // Update time to complete the remaining path with the time to complete the current leg\n time_complete += new_legs_dict[this.state.driver_location[\"activeLegID\"]][\"time\"] * (100 - parseInt(this.state.driver_location[\"legProgress\"])) / 100\n \n this.setState({legs_dict: new_legs_dict,\n bonus2_time_complete_all_legs: time_complete_all_legs,\n bonus2_time_complete: time_complete\n })\n } else {\n this.setState({alert_info: {status: true,\n type: \"warning\",\n reason: \"computePath\",\n message: \"Legs, stops and driver location are reqired for this feature to work\"}})\n }\n }", "function paths(data, ctx) {\n\t ctx.clearRect(-1, -1, w() + 2, h() + 2);\n\t ctx.beginPath();\n\t data.forEach(function (d) {\n\t if (__.bundleDimension !== null && __.bundlingStrength > 0 || __.smoothness > 0) {\n\t single_curve(d, ctx);\n\t } else {\n\t single_path(d, ctx);\n\t }\n\t });\n\t ctx.stroke();\n\t }", "searchPath( pastPositions, currY, currX ){\n var wentSomewhere = false;\n \n //Try to go up\n if(BadBoggle.validPath(pastPositions, currY - 1, currX)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY - 1, currX]]),\n currY - 1,\n currX\n );\n\n wentSomewhere = true;\n }\n\n //Try to go right \n if(BadBoggle.validPath(pastPositions, currY, currX + 1)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY, currX + 1]]),\n currY,\n currX + 1\n );\n\n wentSomewhere = true;\n }\n\n //Try to go down \n if(BadBoggle.validPath(pastPositions, currY + 1, currX)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY + 1, currX]]),\n currY + 1,\n currX\n );\n\n wentSomewhere = true;\n }\n\n //Try to go left \n if(BadBoggle.validPath(pastPositions, currY, currX - 1)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY, currX - 1]]),\n currY,\n currX - 1\n );\n\n wentSomewhere = true;\n }\n\n // If all paths are exhausted, add the path to the array\n if(wentSomewhere === false){\n var pathString = '';\n pastPositions.forEach(function(coords){\n pathString += gridArray[coords[0]][coords[1]];\n });\n gridPaths.push( pathString );\n }\n }", "function iterateFromLeaves(f) {\n function optimizeNextFromLeaves(node) {\n if (node instanceof SourceNode) {\n return;\n }\n var next = node.parent;\n if (f(node)) {\n optimizeNextFromLeaves(next);\n }\n }\n return optimizeNextFromLeaves;\n }", "generateAndTestMap(){\r\n let test = null;\r\n let ok = false\r\n while(test === null && !ok) {\r\n this.generateField();\r\n\r\n let pf = new Pathfinding(this);\r\n test = pf.findPath()\r\n }\r\n if(test.length < this.minPath) test = this.generateAndTestMap();\r\n return test;\r\n }", "findWay(passedGrid) {\n // console.log('moj gridek', passedGrid)\n var pathFinder = (entranceX, entranceY, grid) => {\n var distanceFromTop = entranceX;\n var distanceFromLeft = entranceY;\n\n var location = {\n distanceFromTop: distanceFromTop,\n distanceFromLeft: distanceFromLeft,\n path: [],\n status: 'Start'\n }\n\n //inicjalizacja kolejki\n var queue = [];\n queue.push(location);\n\n //loop grida\n while (queue.length > 0) {\n //zwrocenie pierwszego elementu z kolejki\n var currentLocation = queue.shift();\n\n //polnoc\n var newLocation = explore(currentLocation, 'North', grid);\n //jesli wyjscie przekazac do stanu aplikacji kolejke z najkrotsza sciezka\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n //droga\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //wschod\n var newLocation = explore(currentLocation, 'East', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //poludnie\n var newLocation = explore(currentLocation, 'South', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //zachod\n var newLocation = explore(currentLocation, 'West', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n }\n //nie znaleziono drogi\n this.setState(prevState => ({\n exit: [...prevState.exit, 'Nie znaleziono wyjścia, ten grobowiec będzie twoim grobowcem']\n }))\n return false;\n }\n\n //sprawdzenie typu lokacji\n var locationStatus = (location, grid) => {\n let gridSize = grid.length;\n let dft = location.distanceFromTop;\n let dfl = location.distanceFromLeft;\n // console.log(gridSize, 'size')\n // console.log(location)\n // console.log(grid, dft, dfl);\n\n if (location.distanceFromLeft < 0 ||\n location.distanceFromLeft >= gridSize ||\n location.distanceFromTop < 0 ||\n location.distanceFromTop >= gridSize) {\n //poza gridem\n return 'Invalid';\n //jesli wyjscie\n } else if (grid[dft][dfl].type === 'w') {\n return 'Exit';\n //jesli nie droga (zablokowana lub odwiedzona)\n } else if (grid[dft][dfl].type !== 'o') {\n return 'Blocked';\n //jesli droga\n } else {\n return 'Valid';\n }\n }\n\n //chodzenie\n var explore = (currentLocation, direction, grid) => {\n var newPath = currentLocation.path.slice();\n newPath.push(direction);\n\n var dft = currentLocation.distanceFromTop;\n var dfl = currentLocation.distanceFromLeft;\n\n if (direction === 'North') {\n dft -= 1;\n } else if (direction === 'East') {\n dfl += 1;\n } else if (direction === 'South') {\n dft += 1;\n } else if (direction === 'West') {\n dfl -= 1;\n }\n\n var newLocation = {\n distanceFromTop: dft,\n distanceFromLeft: dfl,\n path: newPath,\n status: 'Unknown'\n };\n\n newLocation.status = locationStatus(newLocation, grid);\n\n //jesli droga, to oznacz lokacje jako odwiedzoną\n if (newLocation.status === 'Valid') {\n grid[newLocation.distanceFromTop][newLocation.distanceFromLeft] = 'Visited';\n }\n\n return newLocation;\n }\n console.log(pathFinder(this.state.startY, this.state.startX, passedGrid));\n }", "nextStep(){\n this.search.shift()\n this.search = this.children.concat(this.search)\n\n if( this.search.length == 0){\n this.finished = true\n }\n else{\n this.state = this.search[0]\n this.children = []\n\n // If it is a final state\n if( this.blockInPath(this.state, this.maze.getFinish()) && this.state.length < this.cost){\n this.bestPath = this.state\n this.cost = this.state.length\n }\n // Branch and Bound: Examine the following paths only if they are better than the current best\n else if(this.state.length + 1 < this.cost){\n // Get the children paths with no repeating nodes\n this.children = this.getChildren(this.state).filter( child => !this.blockInPath(this.state, child[child.length - 1]) )\n \n }\n }\n \n }", "function nextStepPaths(x, z, xCount, zCount, board, endChar, xPrev, zPrev, ignorePointsBehind, dst) {\n function checkAdjacent(expect, expect2, expect3, xx, zz, notExpect) {\n if (xx === xPrev && zz === zPrev) {\n return null;\n }\n var ch = board[zz][xx];\n if (ch === expect || ch === expect2 || ch === expect3) {\n dst.push({ x: xx, z: zz });\n }\n else if (notExpect === ch) { }\n else if (ch === endChar) {\n return { x: xx, z: zz };\n }\n return null;\n }\n var res = ForEachUtil.forEachDirection(x, z, xCount, zCount, {\n top: function (x, z) { return checkAdjacent('|', '/', '\\\\', x, z, '-'); },\n topRight: function (x, z) { return checkAdjacent('/', '|', '-', x, z, '\\\\'); },\n right: function (x, z) { return checkAdjacent('-', '/', '\\\\', x, z, '|'); },\n bottomRight: function (x, z) { return checkAdjacent('\\\\', '|', '-', x, z, '/'); },\n bottom: function (x, z) { return checkAdjacent('|', '/', '\\\\', x, z, '-'); },\n bottomLeft: function (x, z) { return checkAdjacent('/', '|', '-', x, z, '\\\\'); },\n left: function (x, z) { return checkAdjacent('-', '/', '\\\\', x, z, '|'); },\n topLeft: function (x, z) { return checkAdjacent('\\\\', '|', '-', x, z, '//'); },\n }, ignorePointsBehind, xPrev, zPrev);\n return res;\n }", "followPaths(path_so_far) {\n // logging\n this.get_paths_ran += 1;\n if (this.get_paths_ran % 10000 == 0) {\n Log(\"get paths ran \" + String(this.get_paths_ran));\n }\n let note = this.db[path_so_far.all_members.last()];\n let all_members = path_so_far.all_members;\n let items = path_so_far.items;\n let new_paths_to_follow = [];\n let note_links_to = note.links_to.slice();\n let note_linked_from = note.linked_from.slice();\n note_links_to.forEach((link) => {\n // check whether the linked note also links to the current note\n let linked_to_or_both_ways = LINKED_TO;\n if (note_linked_from.contains(link)) {\n // remove it from the passive links to be followed later\n let index = note_linked_from.indexOf(link, 0);\n note_linked_from.splice(index, 1);\n linked_to_or_both_ways = LINKED_BOTH;\n }\n let new_path = {\n all_members: all_members.concat(link),\n items: items.concat([[link, linked_to_or_both_ways]]),\n };\n new_paths_to_follow.push(new_path);\n });\n note_linked_from.forEach((link) => {\n let new_path = {\n all_members: all_members.concat(link),\n items: items.concat([[link, LINKED_FROM]]),\n };\n new_paths_to_follow.push(new_path);\n });\n let called_itself = false; // whether the function called itself\n // function calls itself to explore every new path\n new_paths_to_follow.forEach((path) => {\n // the path without the next note that is to be explored\n let all_items_so_far = path.all_members.slice(0, -1);\n let last_item_path = path.all_members.last();\n let last_item = this.getNoteFromPath(last_item_path);\n // stop if this note is already part of the explored path\n if (all_items_so_far.includes(last_item_path)) {\n return;\n }\n // stop if the path meanders too much\n if (path.all_members.length - last_item.distance_from_CN > 1) {\n return;\n }\n this.followPaths(path);\n called_itself = true;\n });\n if (!called_itself) {\n // only add the path if it does't lead anywhere else. No need to have paths that are parts of other paths\n this.all_paths.push(path_so_far);\n }\n }", "function getForwardPathsLoopgains(paths){\r\n var forwardLoopgains = [];\r\n\r\n paths.forEach(p => {\r\n var forwardEdges = extractPathEdges(p);\r\n var flg = calculateLoopGain(forwardEdges);\r\n forwardLoopgains.push(flg);\r\n });\r\n\r\n return forwardLoopgains;\r\n}", "onCodePathEnd() {\n for (const node of scopeInfo.uselessContinues) {\n context.report({\n node,\n loc: node.loc,\n messageId: \"unnecessaryContinue\",\n fix(fixer) {\n if (isRemovable(node) && !sourceCode.getCommentsInside(node).length) {\n\n /*\n * Extend the replacement range to include the\n * entire function to avoid conflicting with\n * no-else-return.\n * https://github.com/eslint/eslint/issues/8026\n */\n return new FixTracker(fixer, sourceCode)\n .retainEnclosingFunction(node)\n .remove(node);\n }\n return null;\n }\n });\n }\n\n scopeInfo = scopeInfo.upper;\n }", "function mapPath(wire){\r\n\t// Start at origin\r\n\t\tlet x = 0;\r\n\t\tlet y = 0;\r\n\t\tlet steps = 0;\r\n\r\n\t// Create an empty array to pass back after filling\r\n\t\tvar xyArray = new Array();\r\n\t\r\n\tfor(let i=0; i<wire.length; i++){\r\n\t\tlet instruction = wire[i];\r\n\t\tlet direction = instruction.substring(0,1);\r\n\t\tlet travelDist = Number(instruction.substring(1,instruction.length));\r\n\r\n\t\t\tswitch(direction){\r\n\t\t\t\tcase \"R\":\r\n\t\t\t\t\t//Moving X in a positive direction, but Y remains the same...\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\tx = x+1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"L\":\r\n\t\t\t\t\t//Moving X in a negative direction, but Y remains the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\tx = x-1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"U\":\r\n\t\t\t\t\t//Moving Y in a postive direction, but X stays the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\ty = y+1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"D\":\r\n\t\t\t\t\t//Moving Y in a negative direction, but X stays the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\ty = y-1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tconsole.log(\"Should never be here....!!!!!\");\r\n\t\t\t}\r\n\r\n\t}\r\n\t\r\n\treturn xyArray;\r\n\t\r\n}", "function findAndAdd2ProngsOnAllPaths(shape) {\n let for2ProngsArray = shape.for2ProngsArray;\n for (let k = 0; k < for2ProngsArray.length; k++) {\n let for2Prongs = for2ProngsArray[k];\n findAndAdd2Prongs(shape, k, for2Prongs);\n }\n}", "function solveMaze(){\n var Xqueue=[parseInt(src_x)]; \n var Yqueue=[parseInt(src_y)]; \n let pathFound=false;\n var xLoc;\n var yLoc;\n\n while(Xqueue.length>0 && !pathFound){\n xLoc=Xqueue.shift();\n yLoc=Yqueue.shift();\n if(xLoc>1){\n if(tiles[xLoc-1][yLoc].state=='f'){\n pathFound=true;\n }\n }\n if(xLoc<tileColCount-1){\n if(tiles[xLoc+1][yLoc].state=='f'){\n pathFound=true;\n }\n }\n if(yLoc>1){\n if(tiles[xLoc][yLoc-1].state=='f'){\n pathFound=true;\n }\n }\n \n if(yLoc<tileRowCount-1){\n if(tiles[xLoc][yLoc+1].state=='f'){\n pathFound=true;\n }\n }\n if(xLoc>1){\n if(tiles[xLoc-1][yLoc].state=='e'){\n Xqueue.push(xLoc-1);\n Yqueue.push(yLoc);\n tiles[xLoc-1][yLoc].state=tiles[xLoc][yLoc].state+'l';\n // rect(xloc-1,yLoc,tileW,tileH,tiles[xLoc-1][yLoc].state);\n }\n }\n if(xLoc<tileColCount-1){\n if(tiles[xLoc+1][yLoc].state=='e'){\n Xqueue.push(xLoc+1);\n Yqueue.push(yLoc);\n tiles[xLoc+1][yLoc].state=tiles[xLoc][yLoc].state+'r';\n //rect(xloc+1,yLoc,tileW,tileH,tiles[xLoc+1][yLoc].state);\n }\n }\n if(yLoc>1){\n if(tiles[xLoc][yLoc-1].state=='e'){\n Xqueue.push(xLoc);\n Yqueue.push(yLoc-1);\n tiles[xLoc][yLoc-1].state=tiles[xLoc][yLoc].state+'u';\n // rect(xloc,yLoc-1,tileW,tileH,tiles[xLoc][yLoc-1].state);\n }\n }\n if(yLoc<tileRowCount-1){\n if(tiles[xLoc][yLoc+1].state=='e'){\n Xqueue.push(xLoc);\n Yqueue.push(yLoc+1);\n tiles[xLoc][yLoc+1].state=tiles[xLoc][yLoc].state+'d';\n // rect(xloc,yLoc+1,tileW,tileH,tiles[xLoc][yLoc+1].state);\n }\n }\n //setInterval(draw(),100);\n }\n if(!pathFound){\n output.innerHTML=\"No Solution\";\n }\n else{\n output.innerHTML=\"Solved\";\n let path=tiles[xLoc][yLoc].state; \n let pathLength=path.length;\n let currX=parseInt(src_x); \n let currY=parseInt(src_y); \n for(let i=0;i<pathLength-1;i++){\n if(path.charAt(i+1)=='u'){\n currY-=1;\n }\n if(path.charAt(i+1)=='d'){\n currY+=1;\n }\n if(path.charAt(i+1)=='l'){\n currX-=1;\n }\n if(path.charAt(i+1)=='r'){\n currX+=1;\n }\n tiles[currX][currY].state='p';\n }\n }\n}", "buildPath(num) {\n var result = new Set();\n var cur = num;\n const maxBound = this.props.maxBound;\n while (!result.has(cur) && cur <= maxBound && cur >= -maxBound) {\n result.add(cur);\n cur = this.getDestination(cur);\n }\n return [...result];\n }", "function calculatePath()\n\n{\n\n// create Nodes from the Start and End x,y coordinates\n\nvar\n\nmypathStart = Node(null, {x:pathStart[0], y:pathStart[1]});\n\nvar mypathEnd = Node(null, {x:pathEnd[0], y:pathEnd[1]});\n\n// create an array that will contain all world cells\n\nvar AStar = new Array(worldSize);\n\n// list of currently open Nodes\n\nvar Open = [mypathStart];\n\n// list of closed Nodes\n\nvar Closed = [];\n\n// list of the final output array\n\nvar result = [];\n\n// reference to a Node (that is nearby)\n\nvar myNeighbours;\n\n// reference to a Node (that we are considering now)\n\nvar myNode;\n\n// reference to a Node (that starts a path in question)\n\nvar myPath;\n\n// temp integer variables used in the calculations\n\nvar length, max, min, i, j;\n\n// iterate through the open list until none are left\n\nwhile(length = Open.length)\n\n{\n\nmax = worldSize;\n\nmin = -1;\n\nfor(i = 0; i < length; i++)\n\n{\n\nif(Open[i].f < max)\n\n{\n\nmax = Open[i].f;\n\nmin = i;\n\n}\n\n}\n\n// grab the next node and remove it from Open array\n\nmyNode = Open.splice(min, 1)[0];\n\n// is it the destination node?\n\nif(myNode.value === mypathEnd.value)\n\n{\n\nmyPath = Closed[Closed.push(myNode) - 1];\n\ndo\n\n{\n\nresult.push([myPath.x, myPath.y]);\n\n}\n\nwhile (myPath = myPath.Parent);\n\n// clear the working arrays\n\nAStar = Closed = Open = [];\n\n// we want to return start to finish\n\nresult.reverse();\n\n}\n\nelse // not the destination\n\n{\n\n// find which nearby nodes are walkable\n\nmyNeighbours = Neighbours(myNode.x, myNode.y);\n\n// test each one that hasn't been tried already\n\nfor(i = 0, j = myNeighbours.length; i < j; i++)\n\n{\n\nmyPath = Node(myNode, myNeighbours[i]);\n\nif (!AStar[myPath.value])\n\n{\n\n// estimated cost of this particular route so far\n\nmyPath.g = myNode.g + distanceFunction(myNeighbours[i], myNode);\n\n// estimated cost of entire guessed route to the destination\n\nmyPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n\n// remember this new path for testing above\n\nOpen.push(myPath);\n\n// mark this node in the world graph as visited\n\nAStar[myPath.value] = true;\n\n}\n\n}\n\n// remember this route as having no more untested options\n\nClosed.push(myNode);\n\n}\n\n} // keep iterating until the Open list is empty\n\nreturn result;\n\n}", "function getParentConditionalPath(path) {\n var parentPath;\n while (parentPath = path.parentPath) {\n if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n if (path.key === \"test\") {\n return;\n } else {\n return parentPath;\n }\n } else {\n path = parentPath;\n }\n }\n}", "function buildPath(pathStack, timer, visitedNodes, visitedNodesPainted) {\r\n\r\n pathStack.forEach(element => {\r\n setTimeout(function() {element.classList += \" pathNode\"}, timer * 50)\r\n timer++\r\n });\r\n}", "function hivtrace_get_path(next, i, j) {\n\n var all_paths = [];\n var i = parseInt(i);\n var j = parseInt(j);\n\n for (var c = 0; c < next[i][j].length; c++) {\n\n var k = next[i][j][c];\n var intermediate = k;\n\n if (intermediate == null || intermediate == i) {\n return [\n [parseInt(i), parseInt(j)]\n ];\n } else {\n\n var paths_i_k = hivtrace_get_path(next, i, intermediate);\n var paths_k_j = hivtrace_get_path(next, intermediate, j);\n\n for (var i_k_index = 0; i_k_index < paths_i_k.length; i_k_index++) {\n var i_k = paths_i_k[i_k_index];\n for (var k_j_index = 0; k_j_index < paths_k_j.length; k_j_index++) {\n var k_j = paths_k_j[k_j_index];\n if (i_k.length) {\n if ((i_k[0] == i) && (i_k[i_k.length - 1] == k) && (k_j[0] == k) && (k_j[k_j.length - 1] == j)) {\n i_k.pop()\n all_paths.push(i_k.concat(k_j));\n }\n }\n }\n }\n }\n }\n\n return all_paths;\n\n}", "shortestPath(start, goal) {\n // start isn't moveable to\n if (!this.moveable(start.x / this.tileW, start.y / this.tileH)) {\n return [];\n }\n let openSet = [];\n let closedSet = [];\n openSet.push(start);\n\n // clear path finding data\n for (let y = 0; y < round(height / this.tileH); y++) {\n for (let x = 0; x < round(width / this.tileW); x++) {\n this.map[y][x].f = 0;\n this.map[y][x].g = 0;\n this.map[y][x].h = 0;\n this.map[y][x].parent = null;\n }\n }\n\n while (openSet.length > 0) {\n // get lowest cost node in open set\n let currentNode = openSet[0];\n for (let i = 0; i < openSet.length; i++) {\n if (openSet[i].f < currentNode.f)\n currentNode = openSet[i];\n }\n\n // if end has been reached, then finish\n if (currentNode.x == goal.x && currentNode.y == goal.y) {\n let path = []\n while (currentNode.parent != null) {\n path.push(currentNode);\n currentNode = currentNode.parent;\n }\n return path.reverse();\n }\n\n // remove currentNode from openset, and put into closed set\n closedSet.push(currentNode);\n for (let i = openSet.length - 1; i >= 0; i--) {\n if (openSet[i] === currentNode) {\n openSet.splice(i, 1);\n }\n }\n\n // evaluate currentNode's neighbours\n for (let i = 0; i < currentNode.neighbours.length; i++) {\n let neighbour = currentNode.neighbours[i];\n if (!this.moveable(neighbour.x / this.tileW, neighbour.y / this.tileH)) {\n continue;\n }\n if (closedSet.includes(neighbour))\n continue;\n // valid neighbour found..\n let gScore = currentNode.g + 1;\n let bestG = false;\n if (!openSet.includes(neighbour)) {\n // first time at neighbour, so it's the best\n bestG = true;\n neighbour.h = this.heuristic(neighbour.x, neighbour.y, goal.x, goal.y);\n openSet.push(neighbour);\n } else if (gScore < neighbour.g) {\n // worse path to it exists in openset..\n bestG = true;\n openSet.splice(openSet.indexOf(neighbour), 1);\n }\n\n if (bestG) {\n neighbour.parent = currentNode;\n neighbour.g = gScore;\n neighbour.f = neighbour.h + neighbour.g;\n }\n }\n }\n // no path found\n return [];\n }", "function getParentConditionalPath(path) {\n\t var parentPath;\n\t while (parentPath = path.parentPath) {\n\t if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n\t if (path.key === \"test\") {\n\t return;\n\t } else {\n\t return parentPath;\n\t }\n\t } else {\n\t path = parentPath;\n\t }\n\t }\n\t}", "function getParentConditionalPath(path) {\n\t var parentPath;\n\t while (parentPath = path.parentPath) {\n\t if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n\t if (path.key === \"test\") {\n\t return;\n\t } else {\n\t return parentPath;\n\t }\n\t } else {\n\t path = parentPath;\n\t }\n\t }\n\t}", "function crawl(path) {\n if (path.is(\"_templateLiteralProduced\")) {\n crawl(path.get(\"left\"));\n crawl(path.get(\"right\"));\n } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n }\n}", "function crawl(path) {\n if (path.is(\"_templateLiteralProduced\")) {\n crawl(path.get(\"left\"));\n crawl(path.get(\"right\"));\n } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n }\n}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}" ]
[ "0.56938905", "0.55985314", "0.5439052", "0.5374248", "0.53719616", "0.5370415", "0.53631437", "0.53431183", "0.5274606", "0.5250422", "0.5237999", "0.5236706", "0.521821", "0.52163726", "0.5207558", "0.52072245", "0.5190481", "0.5186431", "0.5182813", "0.5167651", "0.5149536", "0.5149528", "0.51431626", "0.5130375", "0.5121384", "0.5118311", "0.5118311", "0.5118311", "0.5118311", "0.5116414", "0.511174", "0.5109402", "0.5109402", "0.5109402", "0.5109402", "0.5105698", "0.510177", "0.50941586", "0.50834286", "0.5075167", "0.50694364", "0.50694364", "0.50686353", "0.50686353", "0.5060095", "0.5042528", "0.5040009", "0.5001958", "0.4994568", "0.49923694", "0.49901757", "0.49800992", "0.49768046", "0.49590918", "0.495245", "0.49388996", "0.4935728", "0.49342152", "0.49255034", "0.49237928", "0.49121082", "0.49106774", "0.49090216", "0.4902872", "0.4902872", "0.49027255", "0.4900286", "0.4900286", "0.4897738", "0.48964816", "0.48922515", "0.48910478", "0.4888636", "0.48792344", "0.48750022", "0.4873813", "0.48696792", "0.48679557", "0.4867946", "0.4858861", "0.4853381", "0.48526284", "0.48400658", "0.4839074", "0.48387206", "0.48315474", "0.48209536", "0.48158145", "0.4811499", "0.48099822", "0.4807308", "0.48056763", "0.48023626", "0.4795997", "0.4793983", "0.4793983", "0.47892445", "0.47892445", "0.47769406", "0.47769406", "0.47769406" ]
0.0
-1
Warns if there is a duplicate or missing key
function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkDuplicates(error) {\n if (error.name === \"MongoError\" && error.code === 11000) {\n // check if the error from Mongodb is duplication error\n // eslint-disable-next-line no-useless-escape\n const regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i;\n const match = error.message.match(regex);\n const fieldName = match[1] || match[2];\n return new APIError({\n message: `${fieldName} already exists`,\n status: httpStatus.CONFLICT,\n isPublic: true,\n stack: error.stack,\n });\n }\n return error;\n }", "function testInsert_UniqueKeyViolation_SingleColumn() {\n var table = env.schema.table('tableE');\n var emailIndexSchema = table.getIndices()[1];\n assertTrue(emailIndexSchema.isUnique);\n var emailIndex = env.indexStore.get(emailIndexSchema.getNormalizedName());\n var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());\n\n var journal = createJournal([table]);\n var row1 = table.createRow({'id': 'pk1', 'email': 'emailAddress1'});\n journal.insert(table, [row1]);\n journal.commit();\n assertTrue(emailIndex.containsKey(row1.payload()['email']));\n assertTrue(rowIdIndex.containsKey(row1.id()));\n assertEquals(1, env.cache.getCount());\n\n journal = createJournal([table]);\n var row2 = table.createRow({'id': 'pk2', 'email': 'emailAddress1'});\n lf.testing.util.assertThrowsError(\n 201, // Duplicate keys are not allowed.\n journal.insert.bind(journal, table, [row2]));\n journal.rollback();\n\n assertEquals(row1.id(), emailIndex.get(row1.payload()['email'])[0]);\n assertTrue(rowIdIndex.containsKey(row1.id()));\n assertEquals(1, env.cache.getCount());\n}", "function getKeyError(err){\n var regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i,\n match = err.match(regex);\n return match[1] || match[2]; \n}", "isUniqueConstraintViolation(error) {\n return /duplicate key value violates unique constraint/.test(String(error));\n }", "function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys,returnFiber){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function testInsert_PrimaryKeyViolation3() {\n var table = env.schema.table('tableA');\n var pkIndexSchema = table.getConstraint().getPrimaryKey();\n var pkIndex = env.indexStore.get(pkIndexSchema.getNormalizedName());\n\n var rows = [];\n for (var i = 0; i < 3; i++) {\n rows.push(table.createRow(\n {'id': 'pk' + i.toString(), 'name': 'DummyName'}));\n }\n for (var j = 0; j < 3; j++) {\n rows.push(table.createRow({'id': 'samePk', 'name': 'DummyName'}));\n }\n\n var journal = createJournal([table]);\n lf.testing.util.assertThrowsError(\n 201, // Duplicate keys are not allowed.\n journal.insert.bind(journal, table, rows));\n journal.rollback();\n\n assertEquals(0, env.cache.getCount());\n var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());\n assertEquals(0, pkIndex.getRange().length);\n assertEquals(0, rowIdIndex.getRange().length);\n}", "function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error(\n 'Encountered two children with the same key, `%s`. ' +\n 'Keys should be unique so that components maintain their identity ' +\n 'across updates. Non-unique keys may cause children to be ' +\n 'duplicated and/or omitted — the behavior is unsupported and ' +\n 'could change in a future version.',\n key,\n );\n\n break;\n }\n }\n\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function makeEnsureExistsCallback(callback) {\n return function ensureExistsCallback(error,success) {\n //winston.log('info',sprintf(\"ensureExistsCallback:(%s,%s)\",JSON.stringify(error),JSON.stringify(success)));\n if (!error) {\n callback(null,1);\n }\n else if (error['code'] == mongo.errors.duplicateKeyError) {\n callback(null,0);\n } \n else {\n callback(error);\n }\n }\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n if (typeof child !== 'object' || child === null) return knownKeys;\n switch(child.$$typeof){\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') break;\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error(\"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \\u2014 the behavior is unsupported and could change in a future version.\", key);\n break;\n }\n return knownKeys;\n }", "checkForDuplicates(state, indexDictionary) {\n const data = state.dictionaries[indexDictionary].content;\n\n data.forEach((value) => {\n state.dictionaries[indexDictionary].content = data.map((pair, index) => {\n // Make sure the object is not itself\n if (data.indexOf(pair) !== data.indexOf(value)) {\n if (pair.domain === value.domain && pair.range === value.range) {\n if (\n data[index].validity.status\n && data[index].validity.reason === ''\n ) {\n // Change validity of the pair to false and assign the reason why\n data[index].validity.status = false;\n data[index].validity.reason = reasonNotValid.duplicate;\n }\n }\n }\n return pair;\n });\n });\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n\t {\n\t if (typeof child !== 'object' || child === null) {\n\t return knownKeys;\n\t }\n\t switch (child.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t case REACT_CALL_TYPE:\n\t case REACT_PORTAL_TYPE:\n\t warnForMissingKey(child);\n\t var key = child.key;\n\t if (typeof key !== 'string') {\n\t break;\n\t }\n\t if (knownKeys === null) {\n\t knownKeys = new Set();\n\t knownKeys.add(key);\n\t break;\n\t }\n\t if (!knownKeys.has(key)) {\n\t knownKeys.add(key);\n\t break;\n\t }\n\t warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t return knownKeys;\n\t }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "async testValidateKeyMissingKeyData() {\n const key = createKey().setKeyData(null);\n\n try {\n await Util.validateKey(key);\n } catch (e) {\n assertEquals(\n ExceptionText.InvalidKeyMissingKeyData(key.getKeyId()), e.toString());\n return;\n }\n fail('An exception should be thrown.');\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }" ]
[ "0.64586234", "0.63743407", "0.62774295", "0.61566454", "0.61478174", "0.61425227", "0.61372644", "0.61251426", "0.61251426", "0.6114083", "0.6114083", "0.6114083", "0.61133426", "0.61059004", "0.6096614", "0.60936666", "0.6082668", "0.5989997", "0.59782195", "0.59782195", "0.59782195", "0.59782195", "0.5968301", "0.5958314", "0.59582865", "0.5956432", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.5940093", "0.59280837", "0.59280837", "0.59275055", "0.5918077", "0.59043187", "0.59043187", "0.59043187", "0.59043187", "0.5888681", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966" ]
0.61219513
9
itself. They will be added to the sideeffect list as we pass through the children and the parent.
function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happens at the normal flow. // Handle top level unkeyed fragments as if they were arrays. // This leads to an ambiguity between <>{[...]}</> and <>...</>. // We treat the ambiguous cases above the same. var isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types var isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite // component, throw an error. If Fiber return types are disabled, // we already threw above. switch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null. break;}}}// Intentionally fall through to the next case, which handles both // functions and classes // eslint-disable-next-lined no-fallthrough case FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty. return deleteRemainingChildren(returnFiber,currentFirstChild);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) // Noop.\n return;\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) // Noop.\n return null;\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while(childToDelete !== null){\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while(existingChild !== null){\n if (existingChild.key !== null) existingChildren.set(existingChild.key, existingChild);\n else existingChildren.set(existingChild.index, existingChild);\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) // Noop.\n return lastPlacedIndex;\n var current3 = newFiber.alternate;\n if (current3 !== null) {\n var oldIndex = current3.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else // This item can stay in place.\n return oldIndex;\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) newFiber.flags = Placement;\n return newFiber;\n }\n function updateTextNode(returnFiber, current3, textContent, lanes) {\n if (current3 === null || current3.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current3, element, lanes) {\n if (current3 !== null) {\n if (current3.elementType === element.type || isCompatibleFamilyForHotReloading(current3, element)) {\n // Move based on index\n var existing = useFiber(current3, element.props);\n existing.ref = coerceRef(returnFiber, current3, element);\n existing.return = returnFiber;\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n return existing;\n }\n } // Insert\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current3, element);\n created.return = returnFiber;\n return created;\n }\n function updatePortal(returnFiber, current3, portal, lanes) {\n if (current3 === null || current3.tag !== HostPortal || current3.stateNode.containerInfo !== portal.containerInfo || current3.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current3, fragment, lanes, key) {\n if (current3 === null || current3.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n case REACT_PORTAL_TYPE:\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n _created2.return = returnFiber;\n return _created2;\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n _created3.return = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) return null;\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else return null;\n case REACT_PORTAL_TYPE:\n if (newChild.key === key) return updatePortal(returnFiber, oldFiber, newChild, lanes);\n else return null;\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) return null;\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n case REACT_PORTAL_TYPE:\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */ function warnOnInvalidKey(child, knownKeys, returnFiber) {\n if (typeof child !== 'object' || child === null) return knownKeys;\n switch(child.$$typeof){\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') break;\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error(\"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \\u2014 the behavior is unsupported and could change in a future version.\", key);\n break;\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // First, validate keys.\n var knownKeys = null;\n for(var i = 0; i < newChildren.length; i++){\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for(; oldFiber !== null && newIdx < newChildren.length; newIdx++){\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else nextOldFiber = oldFiber.sibling;\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) oldFiber = nextOldFiber;\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n else // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for(; newIdx < newChildren.length; newIdx++){\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n if (_newFiber === null) continue;\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n else previousNewFiber.sibling = _newFiber;\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n for(; newIdx < newChildren.length; newIdx++){\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) resultingFirstChild = _newFiber2;\n else previousNewFiber.sibling = _newFiber2;\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (!(typeof iteratorFn === 'function')) throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) error(\"Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.\");\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) error(\"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\");\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for(; !_step.done; _step = _newChildren.next()){\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n if (!(newChildren != null)) throw Error(\"An iterable object provided no iterator.\");\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for(; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()){\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else nextOldFiber = oldFiber.sibling;\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) oldFiber = nextOldFiber;\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n else // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for(; !step.done; newIdx++, step = newChildren.next()){\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n if (_newFiber3 === null) continue;\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n else previousNewFiber.sibling = _newFiber3;\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n for(; !step.done; newIdx++, step = newChildren.next()){\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) resultingFirstChild = _newFiber4;\n else previousNewFiber.sibling = _newFiber4;\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n while(child !== null){\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch(child.tag){\n case Fragment:\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n return existing;\n }\n break;\n case Block:\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n default:\n if (child.elementType === element.type || isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var _existing3 = useFiber(child, element.props);\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n return _existing3;\n }\n break;\n } // Didn't match.\n deleteRemainingChildren(returnFiber, child);\n break;\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n while(child !== null){\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) newChild = newChild.props.children;\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n if (isArray$1(newChild)) return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n if (getIteratorFn(newChild)) return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n if (isObject) throwOnInvalidObjectType(returnFiber, newChild);\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch(returnFiber.tag){\n case ClassComponent:\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) break;\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(\n returnFiber,\n current,\n textContent,\n expirationTime,\n ) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(\n textContent,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(\n returnFiber,\n current,\n element,\n expirationTime,\n ) {\n if (current !== null) {\n if (\n current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)\n ) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n var created = createFiberFromElement(\n element,\n returnFiber.mode,\n expirationTime,\n );\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(\n returnFiber,\n current,\n portal,\n expirationTime,\n ) {\n if (\n current === null ||\n current.tag !== HostPortal ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n ) {\n // Insert\n var created = createFiberFromPortal(\n portal,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(\n returnFiber,\n current,\n fragment,\n expirationTime,\n key,\n ) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n expirationTime,\n key,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText(\n '' + newChild,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n var _created = createFiberFromElement(\n newChild,\n returnFiber.mode,\n expirationTime,\n );\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE: {\n var _created2 = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n expirationTime,\n );\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n expirationTime,\n null,\n );\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n ) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(\n returnFiber,\n oldFiber,\n '' + newChild,\n expirationTime,\n );\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(\n returnFiber,\n oldFiber,\n newChild.props.children,\n expirationTime,\n key,\n );\n }\n\n return updateElement(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n );\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE: {\n if (newChild.key === key) {\n return updatePortal(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n );\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n null,\n );\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n expirationTime,\n ) {\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(\n returnFiber,\n matchedFiber,\n '' + newChild,\n expirationTime,\n );\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n var _matchedFiber =\n existingChildren.get(\n newChild.key === null ? newIdx : newChild.key,\n ) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(\n returnFiber,\n _matchedFiber,\n newChild.props.children,\n expirationTime,\n newChild.key,\n );\n }\n\n return updateElement(\n returnFiber,\n _matchedFiber,\n newChild,\n expirationTime,\n );\n }\n\n case REACT_PORTAL_TYPE: {\n var _matchedFiber2 =\n existingChildren.get(\n newChild.key === null ? newIdx : newChild.key,\n ) || null;\n\n return updatePortal(\n returnFiber,\n _matchedFiber2,\n newChild,\n expirationTime,\n );\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(\n returnFiber,\n _matchedFiber3,\n newChild,\n expirationTime,\n null,\n );\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error(\n 'Encountered two children with the same key, `%s`. ' +\n 'Keys should be unique so that components maintain their identity ' +\n 'across updates. Non-unique keys may cause children to be ' +\n 'duplicated and/or omitted — the behavior is unsupported and ' +\n 'could change in a future version.',\n key,\n );\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n expirationTime,\n ) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (\n ;\n oldFiber !== null && newIdx < newChildren.length;\n newIdx++\n ) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(\n newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(\n returnFiber,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(\n _newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n var existingChildren = mapRemainingChildren(\n returnFiber,\n oldFiber,\n ); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(\n _newFiber2.key === null ? newIdx : _newFiber2.key,\n );\n }\n }\n\n lastPlacedIndex = placeChild(\n _newFiber2,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildrenIterable,\n expirationTime,\n ) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\n 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.',\n );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (\n typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator'\n ) {\n if (!didWarnAboutGenerators) {\n error(\n 'Using Generators as children is unsupported and will likely yield ' +\n 'unexpected results because enumerating a generator mutates it. ' +\n 'You may convert it to an array with `Array.from()` or the ' +\n '`[...spread]` operator before rendering. Keep in mind ' +\n 'you might need to polyfill these features for older browsers.',\n );\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error(\n 'Using Maps as children is unsupported and will likely yield ' +\n 'unexpected results. Convert it to a sequence/iterable of keyed ' +\n 'ReactElements instead.',\n );\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error('An iterable object provided no iterator.');\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (\n ;\n oldFiber !== null && !step.done;\n newIdx++, step = newChildren.next()\n ) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n step.value,\n expirationTime,\n );\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(\n newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(\n returnFiber,\n step.value,\n expirationTime,\n );\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(\n _newFiber3,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n var existingChildren = mapRemainingChildren(\n returnFiber,\n oldFiber,\n ); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n step.value,\n expirationTime,\n );\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(\n _newFiber4.key === null ? newIdx : _newFiber4.key,\n );\n }\n }\n\n lastPlacedIndex = placeChild(\n _newFiber4,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(\n returnFiber,\n currentFirstChild,\n textContent,\n expirationTime,\n ) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (\n currentFirstChild !== null &&\n currentFirstChild.tag === HostText\n ) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling,\n );\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(\n textContent,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(\n returnFiber,\n currentFirstChild,\n element,\n expirationTime,\n ) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment: {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(\n child,\n element.props.children,\n );\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default: {\n if (\n child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(\n returnFiber,\n child,\n element,\n );\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(\n element.props.children,\n returnFiber.mode,\n expirationTime,\n element.key,\n );\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(\n element,\n returnFiber.mode,\n expirationTime,\n );\n\n _created4.ref = coerceRef(\n returnFiber,\n currentFirstChild,\n element,\n );\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(\n returnFiber,\n currentFirstChild,\n portal,\n expirationTime,\n ) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (\n child.tag === HostPortal &&\n child.stateNode.containerInfo === portal.containerInfo &&\n child.stateNode.implementation === portal.implementation\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(\n portal,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n function reconcileChildFibers(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment =\n typeof newChild === 'object' &&\n newChild !== null &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n var isObject =\n typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(\n reconcileSingleElement(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ),\n );\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(\n reconcileSinglePortal(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ),\n );\n }\n }\n\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n return placeSingleChild(\n reconcileSingleTextNode(\n returnFiber,\n currentFirstChild,\n '' + newChild,\n expirationTime,\n ),\n );\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n );\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n );\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (\n typeof newChild === 'undefined' &&\n !isUnkeyedTopLevelFragment\n ) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent: {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent: {\n var Component = returnFiber.type;\n\n {\n {\n throw Error(\n (Component.displayName ||\n Component.name ||\n 'Component') +\n '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',\n );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else {returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else {existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else {// This item can stay in place.\nreturn oldIndex;}}else {// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else {return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else {return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else {previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else {previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else {previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else {previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else {deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else {var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else {deleteRemainingChildren(returnFiber,child);break;}}else {deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing[\"return\"]=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created[\"return\"]=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing[\"return\"]=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created[\"return\"]=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2[\"return\"]=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3[\"return\"]=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing[\"return\"]=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3[\"return\"]=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created[\"return\"]=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4[\"return\"]=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created['return']=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created['return']=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2['return']=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3['return']=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4['return']=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\n\treturn;}// Deletions are added in reversed order so we add it to the front.\n\t// At this point, the return fiber's effect list is empty except for\n\t// deletions, so we can just append the deletion to the list. The remaining\n\t// effects aren't added until the complete phase. Once we implement\n\t// resuming, this may not be true.\n\tvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\n\treturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n\t// assuming that after the first child we've already added everything.\n\tvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n\t// keys quickly. Implicit (null) keys get added to this set with their index\n\tvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n\t// to forget to do before returning it. E.g. for the single child case.\n\tvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\n\treturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\n\treturn oldIndex;}}else{// This is an insertion.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n\t// placement for inserting new children.\n\tif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\n\tvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\n\tvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\n\tvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\n\tif(current===null||current.tag!==CallComponent){// Insert\n\tvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\n\tvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\n\tvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\n\tvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\n\tvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a\n\t// yield.\n\tif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are text nodes, they match.\n\tvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are returns, they match.\n\tvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n\t * Warns if there is a duplicate or missing key\n\t */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n\t// don't have backpointers on fibers. I'm trying to see how far we can get\n\t// with that model. If it ends up not being worth the tradeoffs, we can\n\t// add it later.\n\t// Even with a two ended optimization, we'd want to optimize for the case\n\t// where there are few changes and brute force the comparison instead of\n\t// going for the Map. It'd like to explore hitting that path first in\n\t// forward-only mode and only go for the Map once we notice that we need\n\t// lots of look ahead. This doesn't handle reversal as well as two ended\n\t// search but that's unusual. Besides, for the two ended optimization to\n\t// work on Iterables, we'd need to copy the whole set.\n\t// In this first iteration, we'll just live with hitting the bad case\n\t// (adding everything to a Map) in for every insert/move.\n\t// If you change this code, also update reconcileChildrenIterator() which\n\t// uses the same algorithm.\n\t{// First, validate keys.\n\tvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n\t// but using the iterator instead.\n\tvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\n\tif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n\t// We'll get a different iterator later for the main pass.\n\tvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n\t// way to define them.\n\tif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n\t// the rest.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n\t// and delete the existing ones.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\n\tvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n\t// itself. They will be added to the side-effect list as we pass through the\n\t// children and the parent.\n\tfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n\t// If the top level item is an array, we treat it as a set of children,\n\t// not as a fragment. Nested arrays on the other hand will be treated as\n\t// fragment nodes. Recursion happens at the normal flow.\n\t// Handle top level unkeyed fragments as if they were arrays.\n\t// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t// We treat the ambiguous cases above the same.\n\tif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\n\tvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n\t// component, throw an error. If Fiber return types are disabled,\n\t// we already threw above.\n\tswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\n\tbreak;}}}// Intentionally fall through to the next case, which handles both\n\t// functions and classes\n\t// eslint-disable-next-lined no-fallthrough\n\tcase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\n\treturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n\t function deleteChild(returnFiber, childToDelete) {\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return;\n\t }\n\t // Deletions are added in reversed order so we add it to the front.\n\t // At this point, the return fiber's effect list is empty except for\n\t // deletions, so we can just append the deletion to the list. The remaining\n\t // effects aren't added until the complete phase. Once we implement\n\t // resuming, this may not be true.\n\t var last = returnFiber.lastEffect;\n\t if (last !== null) {\n\t last.nextEffect = childToDelete;\n\t returnFiber.lastEffect = childToDelete;\n\t } else {\n\t returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n\t }\n\t childToDelete.nextEffect = null;\n\t childToDelete.effectTag = Deletion;\n\t }\n\t\n\t function deleteRemainingChildren(returnFiber, currentFirstChild) {\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return null;\n\t }\n\t\n\t // TODO: For the shouldClone case, this could be micro-optimized a bit by\n\t // assuming that after the first child we've already added everything.\n\t var childToDelete = currentFirstChild;\n\t while (childToDelete !== null) {\n\t deleteChild(returnFiber, childToDelete);\n\t childToDelete = childToDelete.sibling;\n\t }\n\t return null;\n\t }\n\t\n\t function mapRemainingChildren(returnFiber, currentFirstChild) {\n\t // Add the remaining children to a temporary map so that we can find them by\n\t // keys quickly. Implicit (null) keys get added to this set with their index\n\t var existingChildren = new Map();\n\t\n\t var existingChild = currentFirstChild;\n\t while (existingChild !== null) {\n\t if (existingChild.key !== null) {\n\t existingChildren.set(existingChild.key, existingChild);\n\t } else {\n\t existingChildren.set(existingChild.index, existingChild);\n\t }\n\t existingChild = existingChild.sibling;\n\t }\n\t return existingChildren;\n\t }\n\t\n\t function useFiber(fiber, pendingProps, expirationTime) {\n\t // We currently set sibling to null and index to 0 here because it is easy\n\t // to forget to do before returning it. E.g. for the single child case.\n\t var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n\t clone.index = 0;\n\t clone.sibling = null;\n\t return clone;\n\t }\n\t\n\t function placeChild(newFiber, lastPlacedIndex, newIndex) {\n\t newFiber.index = newIndex;\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return lastPlacedIndex;\n\t }\n\t var current = newFiber.alternate;\n\t if (current !== null) {\n\t var oldIndex = current.index;\n\t if (oldIndex < lastPlacedIndex) {\n\t // This is a move.\n\t newFiber.effectTag = Placement;\n\t return lastPlacedIndex;\n\t } else {\n\t // This item can stay in place.\n\t return oldIndex;\n\t }\n\t } else {\n\t // This is an insertion.\n\t newFiber.effectTag = Placement;\n\t return lastPlacedIndex;\n\t }\n\t }\n\t\n\t function placeSingleChild(newFiber) {\n\t // This is simpler for the single child case. We only need to do a\n\t // placement for inserting new children.\n\t if (shouldTrackSideEffects && newFiber.alternate === null) {\n\t newFiber.effectTag = Placement;\n\t }\n\t return newFiber;\n\t }\n\t\n\t function updateTextNode(returnFiber, current, textContent, expirationTime) {\n\t if (current === null || current.tag !== HostText) {\n\t // Insert\n\t var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, textContent, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateElement(returnFiber, current, element, expirationTime) {\n\t if (current !== null && current.type === element.type) {\n\t // Move based on index\n\t var existing = useFiber(current, element.props, expirationTime);\n\t existing.ref = coerceRef(current, element);\n\t existing['return'] = returnFiber;\n\t {\n\t existing._debugSource = element._source;\n\t existing._debugOwner = element._owner;\n\t }\n\t return existing;\n\t } else {\n\t // Insert\n\t var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n\t created.ref = coerceRef(current, element);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t }\n\t\n\t function updateCall(returnFiber, current, call, expirationTime) {\n\t // TODO: Should this also compare handler to determine whether to reuse?\n\t if (current === null || current.tag !== CallComponent) {\n\t // Insert\n\t var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Move based on index\n\t var existing = useFiber(current, call, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateReturn(returnFiber, current, returnNode, expirationTime) {\n\t if (current === null || current.tag !== ReturnComponent) {\n\t // Insert\n\t var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n\t created.type = returnNode.value;\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Move based on index\n\t var existing = useFiber(current, null, expirationTime);\n\t existing.type = returnNode.value;\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updatePortal(returnFiber, current, portal, expirationTime) {\n\t if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n\t // Insert\n\t var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, portal.children || [], expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n\t if (current === null || current.tag !== Fragment) {\n\t // Insert\n\t var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, fragment, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function createChild(returnFiber, newChild, expirationTime) {\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a text\n\t // node.\n\t var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n\t _created['return'] = returnFiber;\n\t return _created;\n\t } else {\n\t var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created2.ref = coerceRef(null, newChild);\n\t _created2['return'] = returnFiber;\n\t return _created2;\n\t }\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created3['return'] = returnFiber;\n\t return _created3;\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created4.type = newChild.value;\n\t _created4['return'] = returnFiber;\n\t return _created4;\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created5['return'] = returnFiber;\n\t return _created5;\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n\t _created6['return'] = returnFiber;\n\t return _created6;\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n\t // Update the fiber if the keys match, otherwise return null.\n\t\n\t var key = oldFiber !== null ? oldFiber.key : null;\n\t\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a text\n\t // node.\n\t if (key !== null) {\n\t return null;\n\t }\n\t return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n\t }\n\t return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t // Returns don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a\n\t // yield.\n\t if (key === null) {\n\t return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t if (key !== null) {\n\t return null;\n\t }\n\t\n\t return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys, so we neither have to check the old nor\n\t // new node for the key. If both are text nodes, they match.\n\t var matchedFiber = existingChildren.get(newIdx) || null;\n\t return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n\t }\n\t return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t // Returns don't have keys, so we neither have to check the old nor\n\t // new node for the key. If both are returns, they match.\n\t var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\t return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t var _matchedFiber5 = existingChildren.get(newIdx) || null;\n\t return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t /**\n\t * Warns if there is a duplicate or missing key\n\t */\n\t function warnOnInvalidKey(child, knownKeys) {\n\t {\n\t if (typeof child !== 'object' || child === null) {\n\t return knownKeys;\n\t }\n\t switch (child.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t case REACT_CALL_TYPE:\n\t case REACT_PORTAL_TYPE:\n\t warnForMissingKey(child);\n\t var key = child.key;\n\t if (typeof key !== 'string') {\n\t break;\n\t }\n\t if (knownKeys === null) {\n\t knownKeys = new Set();\n\t knownKeys.add(key);\n\t break;\n\t }\n\t if (!knownKeys.has(key)) {\n\t knownKeys.add(key);\n\t break;\n\t }\n\t warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t return knownKeys;\n\t }\n\t\n\t function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n\t // This algorithm can't optimize by searching from boths ends since we\n\t // don't have backpointers on fibers. I'm trying to see how far we can get\n\t // with that model. If it ends up not being worth the tradeoffs, we can\n\t // add it later.\n\t\n\t // Even with a two ended optimization, we'd want to optimize for the case\n\t // where there are few changes and brute force the comparison instead of\n\t // going for the Map. It'd like to explore hitting that path first in\n\t // forward-only mode and only go for the Map once we notice that we need\n\t // lots of look ahead. This doesn't handle reversal as well as two ended\n\t // search but that's unusual. Besides, for the two ended optimization to\n\t // work on Iterables, we'd need to copy the whole set.\n\t\n\t // In this first iteration, we'll just live with hitting the bad case\n\t // (adding everything to a Map) in for every insert/move.\n\t\n\t // If you change this code, also update reconcileChildrenIterator() which\n\t // uses the same algorithm.\n\t\n\t {\n\t // First, validate keys.\n\t var knownKeys = null;\n\t for (var i = 0; i < newChildren.length; i++) {\n\t var child = newChildren[i];\n\t knownKeys = warnOnInvalidKey(child, knownKeys);\n\t }\n\t }\n\t\n\t var resultingFirstChild = null;\n\t var previousNewFiber = null;\n\t\n\t var oldFiber = currentFirstChild;\n\t var lastPlacedIndex = 0;\n\t var newIdx = 0;\n\t var nextOldFiber = null;\n\t for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n\t if (oldFiber.index > newIdx) {\n\t nextOldFiber = oldFiber;\n\t oldFiber = null;\n\t } else {\n\t nextOldFiber = oldFiber.sibling;\n\t }\n\t var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\t if (newFiber === null) {\n\t // TODO: This breaks on empty slots like null children. That's\n\t // unfortunate because it triggers the slow path all the time. We need\n\t // a better way to communicate whether this was a miss or null,\n\t // boolean, undefined, etc.\n\t if (oldFiber === null) {\n\t oldFiber = nextOldFiber;\n\t }\n\t break;\n\t }\n\t if (shouldTrackSideEffects) {\n\t if (oldFiber && newFiber.alternate === null) {\n\t // We matched the slot, but we didn't reuse the existing fiber, so we\n\t // need to delete the existing child.\n\t deleteChild(returnFiber, oldFiber);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = newFiber;\n\t } else {\n\t // TODO: Defer siblings if we're not at the right index for this slot.\n\t // I.e. if we had null values before, then we want to defer this\n\t // for each null value. However, we also don't want to call updateSlot\n\t // with the previous one.\n\t previousNewFiber.sibling = newFiber;\n\t }\n\t previousNewFiber = newFiber;\n\t oldFiber = nextOldFiber;\n\t }\n\t\n\t if (newIdx === newChildren.length) {\n\t // We've reached the end of the new children. We can delete the rest.\n\t deleteRemainingChildren(returnFiber, oldFiber);\n\t return resultingFirstChild;\n\t }\n\t\n\t if (oldFiber === null) {\n\t // If we don't have any more existing children we can choose a fast path\n\t // since the rest will all be insertions.\n\t for (; newIdx < newChildren.length; newIdx++) {\n\t var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\t if (!_newFiber) {\n\t continue;\n\t }\n\t lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = _newFiber;\n\t } else {\n\t previousNewFiber.sibling = _newFiber;\n\t }\n\t previousNewFiber = _newFiber;\n\t }\n\t return resultingFirstChild;\n\t }\n\t\n\t // Add all children to a key map for quick lookups.\n\t var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\t\n\t // Keep scanning and use the map to restore deleted items as moves.\n\t for (; newIdx < newChildren.length; newIdx++) {\n\t var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\t if (_newFiber2) {\n\t if (shouldTrackSideEffects) {\n\t if (_newFiber2.alternate !== null) {\n\t // The new fiber is a work in progress, but if there exists a\n\t // current, that means that we reused the fiber. We need to delete\n\t // it from the child list so that we don't add it to the deletion\n\t // list.\n\t existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t resultingFirstChild = _newFiber2;\n\t } else {\n\t previousNewFiber.sibling = _newFiber2;\n\t }\n\t previousNewFiber = _newFiber2;\n\t }\n\t }\n\t\n\t if (shouldTrackSideEffects) {\n\t // Any existing children that weren't consumed above were deleted. We need\n\t // to add them to the deletion list.\n\t existingChildren.forEach(function (child) {\n\t return deleteChild(returnFiber, child);\n\t });\n\t }\n\t\n\t return resultingFirstChild;\n\t }\n\t\n\t function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n\t // This is the same implementation as reconcileChildrenArray(),\n\t // but using the iterator instead.\n\t\n\t var iteratorFn = getIteratorFn(newChildrenIterable);\n\t !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\t\n\t {\n\t // Warn about using Maps as children\n\t if (typeof newChildrenIterable.entries === 'function') {\n\t var possibleMap = newChildrenIterable;\n\t if (possibleMap.entries === iteratorFn) {\n\t warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n\t didWarnAboutMaps = true;\n\t }\n\t }\n\t\n\t // First, validate keys.\n\t // We'll get a different iterator later for the main pass.\n\t var _newChildren = iteratorFn.call(newChildrenIterable);\n\t if (_newChildren) {\n\t var knownKeys = null;\n\t var _step = _newChildren.next();\n\t for (; !_step.done; _step = _newChildren.next()) {\n\t var child = _step.value;\n\t knownKeys = warnOnInvalidKey(child, knownKeys);\n\t }\n\t }\n\t }\n\t\n\t var newChildren = iteratorFn.call(newChildrenIterable);\n\t !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\t\n\t var resultingFirstChild = null;\n\t var previousNewFiber = null;\n\t\n\t var oldFiber = currentFirstChild;\n\t var lastPlacedIndex = 0;\n\t var newIdx = 0;\n\t var nextOldFiber = null;\n\t\n\t var step = newChildren.next();\n\t for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n\t if (oldFiber.index > newIdx) {\n\t nextOldFiber = oldFiber;\n\t oldFiber = null;\n\t } else {\n\t nextOldFiber = oldFiber.sibling;\n\t }\n\t var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\t if (newFiber === null) {\n\t // TODO: This breaks on empty slots like null children. That's\n\t // unfortunate because it triggers the slow path all the time. We need\n\t // a better way to communicate whether this was a miss or null,\n\t // boolean, undefined, etc.\n\t if (!oldFiber) {\n\t oldFiber = nextOldFiber;\n\t }\n\t break;\n\t }\n\t if (shouldTrackSideEffects) {\n\t if (oldFiber && newFiber.alternate === null) {\n\t // We matched the slot, but we didn't reuse the existing fiber, so we\n\t // need to delete the existing child.\n\t deleteChild(returnFiber, oldFiber);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = newFiber;\n\t } else {\n\t // TODO: Defer siblings if we're not at the right index for this slot.\n\t // I.e. if we had null values before, then we want to defer this\n\t // for each null value. However, we also don't want to call updateSlot\n\t // with the previous one.\n\t previousNewFiber.sibling = newFiber;\n\t }\n\t previousNewFiber = newFiber;\n\t oldFiber = nextOldFiber;\n\t }\n\t\n\t if (step.done) {\n\t // We've reached the end of the new children. We can delete the rest.\n\t deleteRemainingChildren(returnFiber, oldFiber);\n\t return resultingFirstChild;\n\t }\n\t\n\t if (oldFiber === null) {\n\t // If we don't have any more existing children we can choose a fast path\n\t // since the rest will all be insertions.\n\t for (; !step.done; newIdx++, step = newChildren.next()) {\n\t var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\t if (_newFiber3 === null) {\n\t continue;\n\t }\n\t lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = _newFiber3;\n\t } else {\n\t previousNewFiber.sibling = _newFiber3;\n\t }\n\t previousNewFiber = _newFiber3;\n\t }\n\t return resultingFirstChild;\n\t }\n\t\n\t // Add all children to a key map for quick lookups.\n\t var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\t\n\t // Keep scanning and use the map to restore deleted items as moves.\n\t for (; !step.done; newIdx++, step = newChildren.next()) {\n\t var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\t if (_newFiber4 !== null) {\n\t if (shouldTrackSideEffects) {\n\t if (_newFiber4.alternate !== null) {\n\t // The new fiber is a work in progress, but if there exists a\n\t // current, that means that we reused the fiber. We need to delete\n\t // it from the child list so that we don't add it to the deletion\n\t // list.\n\t existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t resultingFirstChild = _newFiber4;\n\t } else {\n\t previousNewFiber.sibling = _newFiber4;\n\t }\n\t previousNewFiber = _newFiber4;\n\t }\n\t }\n\t\n\t if (shouldTrackSideEffects) {\n\t // Any existing children that weren't consumed above were deleted. We need\n\t // to add them to the deletion list.\n\t existingChildren.forEach(function (child) {\n\t return deleteChild(returnFiber, child);\n\t });\n\t }\n\t\n\t return resultingFirstChild;\n\t }\n\t\n\t function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n\t // There's no need to check for keys on text nodes since we don't have a\n\t // way to define them.\n\t if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n\t // We already have an existing node so let's just update it and delete\n\t // the rest.\n\t deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n\t var existing = useFiber(currentFirstChild, textContent, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t // The existing first child is not a text node so we need to create one\n\t // and delete the existing ones.\n\t deleteRemainingChildren(returnFiber, currentFirstChild);\n\t var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n\t var key = element.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n\t existing.ref = coerceRef(child, element);\n\t existing['return'] = returnFiber;\n\t {\n\t existing._debugSource = element._source;\n\t existing._debugOwner = element._owner;\n\t }\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t if (element.type === REACT_FRAGMENT_TYPE) {\n\t var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n\t _created7.ref = coerceRef(currentFirstChild, element);\n\t _created7['return'] = returnFiber;\n\t return _created7;\n\t }\n\t }\n\t\n\t function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n\t var key = call.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === CallComponent) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, call, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n\t // There's no need to check for keys on yields since they're stateless.\n\t var child = currentFirstChild;\n\t if (child !== null) {\n\t if (child.tag === ReturnComponent) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, null, expirationTime);\n\t existing.type = returnNode.value;\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t }\n\t }\n\t\n\t var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n\t created.type = returnNode.value;\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n\t var key = portal.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, portal.children || [], expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t // This API will tag the children with the side-effect of the reconciliation\n\t // itself. They will be added to the side-effect list as we pass through the\n\t // children and the parent.\n\t function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n\t // This function is not recursive.\n\t // If the top level item is an array, we treat it as a set of children,\n\t // not as a fragment. Nested arrays on the other hand will be treated as\n\t // fragment nodes. Recursion happens at the normal flow.\n\t\n\t // Handle top level unkeyed fragments as if they were arrays.\n\t // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t // We treat the ambiguous cases above the same.\n\t if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n\t newChild = newChild.props.children;\n\t }\n\t\n\t // Handle object types\n\t var isObject = typeof newChild === 'object' && newChild !== null;\n\t\n\t if (isObject) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\t\n\t case REACT_CALL_TYPE:\n\t return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n\t case REACT_RETURN_TYPE:\n\t return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n\t case REACT_PORTAL_TYPE:\n\t return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n\t }\n\t }\n\t\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n\t }\n\t\n\t if (isArray$1(newChild)) {\n\t return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n\t }\n\t\n\t if (getIteratorFn(newChild)) {\n\t return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n\t }\n\t\n\t if (isObject) {\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t if (typeof newChild === 'undefined') {\n\t // If the new child is undefined, and the return fiber is a composite\n\t // component, throw an error. If Fiber return types are disabled,\n\t // we already threw above.\n\t switch (returnFiber.tag) {\n\t case ClassComponent:\n\t {\n\t {\n\t var instance = returnFiber.stateNode;\n\t if (instance.render._isMockFunction) {\n\t // We allow auto-mocks to proceed as if they're returning null.\n\t break;\n\t }\n\t }\n\t }\n\t // Intentionally fall through to the next case, which handles both\n\t // functions and classes\n\t // eslint-disable-next-lined no-fallthrough\n\t case FunctionalComponent:\n\t {\n\t var Component = returnFiber.type;\n\t invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n\t }\n\t }\n\t }\n\t\n\t // Remaining cases are all treated as empty.\n\t return deleteRemainingChildren(returnFiber, currentFirstChild);\n\t }\n\t\n\t return reconcileChildFibers;\n\t}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n }\n else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n }\n else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n else {\n // This item can stay in place.\n return oldIndex;\n }\n }\n else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n }\n else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n }\n else {\n return null;\n }\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n }\n else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n }\n else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n }\n else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n }\n else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n }\n else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n }\n else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n }\n else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n }\n else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n }\n else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n }\n else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n }\n else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n }\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n _created3.return = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n if (_newFiber === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n didWarnAboutGenerators = true;\n }\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n didWarnAboutMaps = true;\n }\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; (newIdx++, step = newChildren.next())) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; (newIdx++, step = newChildren.next())) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; (newIdx++, step = newChildren.next())) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n break;\n }\n case Block:\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var _existing3 = useFiber(child, element.props);\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n break;\n }\n }\n // Didn't match.\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n hotCompareElements(current.elementType, element.type, hotUpdateChild(current), current.type) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n hotCompareElements(child.elementType, element.type, hotUpdateChild(child), child.type) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.type === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n case ClassComponentLazy:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.type === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n case ClassComponentLazy:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}" ]
[ "0.6270052", "0.6207396", "0.61424965", "0.61410725", "0.61407506", "0.61407506", "0.61407506", "0.6133052", "0.6133052", "0.6133052", "0.6133052", "0.61278206", "0.61278206", "0.61144173", "0.6083676", "0.60557383", "0.60557383", "0.60557383", "0.60557383", "0.60513395", "0.60397846", "0.60385156", "0.60385156", "0.60385156", "0.60385156", "0.60385156", "0.60385156", "0.602916", "0.602916", "0.602916", "0.60196525", "0.6003365", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.59950495", "0.5988887", "0.5988887", "0.5988887", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59839875", "0.59263915", "0.59263915", "0.59263915", "0.59263915", "0.59263915", "0.59263915", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987", "0.59193987" ]
0.0
-1
By default, return `true` to log errors to the console. Forks can return `false` if this isn't desirable.
function showErrorDialog(capturedError){return true;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function log (msg : string, err : any = false) : boolean {\n\tif (QUIET) return false\n\tif (err) {\n\t\tconsole.error(msg, err)\n\t} else {\n\t\tconsole.log(msg)\n\t}\n\treturn true\n}", "isErr() {\n return true;\n }", "isErr() {\n return false;\n }", "function logError(err) { if(console && console.log) console.log('Error!', err); return false; }", "error(error) {\n return true;\n }", "fork() {\n if (!cluster.isMaster) {\n throw new Error('fork must be called on master only');\n }\n\n if (this.started) {\n this._log('Worker already started');\n\n return;\n }\n\n this._log('fork');\n\n this.started = true;\n this.worker = cluster.fork(this.config.env);\n this._listen();\n }", "function checkChild(done) {\n\n // delay to allow time to child.js was killed or it handles the error\n setTimeout(function() {\n if(childError) {\n throw childError;\n }else{\n done();\n }\n }, testTimeout);\n}", "function handleError(message) {\n console.error(message);\n return false;\n}", "function spawnChild()\n{\n\tvar janitor = child_process.fork( libpath.resolve(__dirname,'clean-avatars.js'), {\n\t\tsilent: true\n\t});\n\n\tvar logfile = fs.createWriteStream(libpath.resolve(__dirname,'..','janitor.log'), {flags: 'a'});\n\tjanitor.stdout.on('data', function(chunk){\n\t\tlogfile.write(chunk);\n\t});\n\tjanitor.stdout.on('end', function(){\n\t\tlogfile.end();\n\t});\n}", "function onError(err){\n if (err) {\n console.log(err, err.stack);\n return true;\n }\n }", "function isSuccess(self) {\n return Ex.fold_(self.exit, _ => false, _ => true);\n}", "function fuseRun() {\n return new Promise((resolve, reject) => {\n let _error = console.error;\n let errors = false;\n\n console.error = function() {\n errors = true;\n _error(...arguments);\n setTimeout(() => {\n reject(new Error('Build errors occurred'));\n }, 2000);\n };\n\n return fuse.run().then(() => {\n console.error = _error;\n if (errors) return reject(new Error('Build errors occurred'));\n resolve(true);\n });\n });\n }", "function test() {\n\treturn console.log(true);\n\treturn console.log(false);\n}", "function saneSpawnWithOutput(cmd, args, opts) {\n cmd = path.normalize(cmd);\n opts = opts || {};\n opts.shell = true;\n // it's OK, I know what I'm doing\n const result = _DO_NOT_USE_spawn(cmd, args, opts);\n if (!spawnWasSuccessful(result)) {\n return false;\n }\n return {status: result.status == 0, stdout: result.stdout.toString()};\n}", "function f() {\n console.log(\"Hello!\");\n return true;\n}", "static get LOG_ERRORS() {\n return false;\n }", "get isError() { return (this.flags & 4 /* NodeFlag.Error */) > 0; }", "static runningOnNode ()\n\t\t{ let ud = \"undefined\";\n\n\t\t\tif (typeof process === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions.node )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof __dirname === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof __filename === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof require === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (require === null)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! require.resolve)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof module === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "_sendErrors() {\n if (this.errors.length) {\n process.stderr.write(this.errors.join('\\n'));\n process.exit(1);\n }\n }", "_isInteractive()\n\t\t{\n\t\t\treturn process.stdout.isTTY && !process.env.CI;\n\t\t}", "function run(cb) {\n syncTries++;\n\n console.log('\\n Try: ' + syncTries);\n console.log('-------------');\n\n let kid = child_process.spawn(argv._[0], argv._.slice(1), {\n encoding: 'utf8'\n });\n\n kid.stdout.pipe(process.stdout);\n kid.stderr.pipe(process.stdout);\n\n kid.on('close', function(code) {\n return cb(code);\n });\n}", "function say() {\n console.log(\"ok\");\n return false;\n}", "function endIfErr (err) {\n if (err) {\n console.error(err);\n process.exit(1);\n }\n}", "function endIfErr (err) {\n if (err) {\n console.error(err)\n process.exit(1)\n }\n}", "function error(msg) {\n console.error(msg);\n process.exit(1);\n}", "function forkWithErrorHandler_(self, handler, __trace) {\n return (0, _core.fork)((0, _onExit.onError_)(self, x => (0, _index2.fold)(handler, _core.halt)((0, _index.failureOrCause)(x))), __trace);\n}", "function puts(error, stdout, stderr) {\r\n if(stdout){\r\n console.log(stdout);\r\n }\r\n if(stderr){\r\n console.log(stderr);\r\n }\r\n }", "function aiFork() {\n var forks = getForkMoves(data.board, data.player2);\n if (forks.length > 0) {\n var move = pickRandomSpace(forks);\n placeMoveByIndex(move);\n return true;\n }\n return false;\n}", "function cleanError (msg) {\n console.error('Error: ' + msg)\n return process.exit(1)\n}", "function execcallback(error, stdout, stderr) {\n // if (stilltesting) {\n console.log('stdout: ' + stdout);\n console.log('stderr: ' + stderr);\n if (error !== null) {\n console.log('exec error: ' + error);\n }\n // }\n}", "_end(done){\r\n this.fork.stdout.on('data', data => {\r\n this.stdio.stdout.splitPush(data)\r\n })\r\n\r\n this.fork.stderr.on('data', data => {\r\n this.stdio.stderr.splitPush(data)\r\n })\r\n\r\n this.fork.on('exit', (signal, code) => { \r\n done(null, JSON.stringify({\r\n source: this.source.pathname,\r\n args: this.args,\r\n stdio: this.stdio,\r\n signal,\r\n code\r\n }, null, 2))\r\n })\r\n }", "function showVersionAndExit(): never {\n process.stdout.write(`${BUILD_INFO.VERSION_STRING}\\n`);\n log.debug(\"BUILD_INFO_COMMIT: %s\", BUILD_INFO.COMMIT);\n log.debug(\"BUILD_INFO_TIME_RFC3339: %s\", BUILD_INFO.BUILD_TIME_RFC3339);\n log.debug(\"BUILD_INFO_HOSTNAME: %s\", BUILD_INFO.BUILD_HOSTNAME);\n log.debug(\"BUILD_INFO_BRANCH_NAME: %s\", BUILD_INFO.BRANCH_NAME);\n\n // Cleanly shut down logging system.\n throw new ExitSuccess();\n}", "function outputConsole(err, data) {\n if (err) console.log('Unexpected problem : ', err);\n else console.log('Everything was fine ');\n}", "function processError(err) {\n if (err) {\n console.error(err);\n }\n process.exit(1);\n}", "function check() {\n console.log('checkcheck');\n return true;\n}", "function logErrorAndExit(e) {\n console.error(e);\n process.exit(1);\n}", "function error() {\n // Hint\n // throw new Error(\"Can't nest deeper than \" + Nest.options.maxDepth);\n return false;\n }", "isRunning() {\n return this._process !== null;\n }", "function debuglog(){\n if(false)\n console.log.apply(this,arguments)\n}", "function isPrime(value) {\n for(var i = 2; i < value; i++) {\n if(value % i === 0) {\n console.log(false);\n return false;\n }\n }\n console.log(true);\n return true;\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ?\n Boolean(exports.inspectOpts.colors) :\n tty.isatty(process.stderr.fd);\n}", "function checkIfShouldExit(choice) {\n if (choice.toLowerCase() === \"q\") {\n // Log a message and exit the current node process\n console.table(\"\\n====================================================\\n\")\n console.log(\"Goodbye! Hope to see you again!\");\n console.table(\"\\n====================================================\\n\")\n process.exit(0);\n }\n}", "function checkIfShouldExit(choice) {\n\tif (choice.toLowerCase() === \"q\") {\n\t // Log a message and exit the current node process\n\t console.log(\"Goodbye!\");\n\t process.exit(0);\n\t}\n }", "function main(){\n return false;\n}", "_verifyNpmLoginState() {\n var _a;\n return tslib.__awaiter(this, void 0, void 0, function* () {\n const registry = `NPM at the ${(_a = this._config.publishRegistry) !== null && _a !== void 0 ? _a : 'default NPM'} registry`;\n if (yield npmIsLoggedIn(this._config.publishRegistry)) {\n debug(`Already logged into ${registry}.`);\n return true;\n }\n error(red(` ✘ Not currently logged into ${registry}.`));\n const shouldLogin = yield promptConfirm('Would you like to log into NPM now?');\n if (shouldLogin) {\n debug('Starting NPM login.');\n try {\n yield npmLogin(this._config.publishRegistry);\n }\n catch (_b) {\n return false;\n }\n return true;\n }\n return false;\n });\n }", "function h$run(a) {\n ;\n var t = h$fork(a, false);\n h$startMainLoop();\n return t;\n}", "function errorHandler(error) {\n gulpUtil.beep();\n return true;\n}", "run() {\n\t\tthrow new Error;\n\t}", "function check(err) {\n\tif (!err) { return }\n\tconsole.log(\"ERROR\", err)\n\tthrow err\n}", "function returnConsole() {\n console.log('A message here');\n}", "async function haveChangesOccurred() {\n const parentPackage = core.getInput('parent-package');\n const versionResult = await exec(`npm view ${parentPackage}@latest version`);\n const version = versionResult.stdout.trim();\n const diffResult = await exec(`git diff --stat v${version}..master frontend-shared/`)\n return diffResult.stdout.length > 0;\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}", "async function parent() {\n logger();\n console.log(\"parent called\");\n}", "hasExited() {\n return this.has_exited;\n }", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function useColors() {\n return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);\n}", "function errorExit( err ) {\n\tconsole.log( err.message );\n\tprocess.exit( 1 );\n}", "function debug(...args) {\n if (false) {\n console.log(...args);\n }\n }", "function myErrorFunc(error) {\n if (error) {\n return console.log(error);\n } else {\n console.log(\"Success\");\n }\n}", "function useColors() {\n\t return 'colors' in exports.inspectOpts\n\t ? Boolean(exports.inspectOpts.colors)\n\t : tty.isatty(process.stderr.fd);\n\t}", "async function run(funsAndArgs) {\n console.log('😌');\n let result = false;\n try {\n for (const [fun, args] of funsAndArgs) {\n console.log(`🙋 ${fun.name} ${args.join(' ')}`);\n if (!await fun(args)) {\n console.log(`🙅 ${fun.name}`);\n return;\n }\n console.log(`🙆 ${fun.name}`);\n }\n result = true;\n } catch (e) {\n console.error(e);\n } finally {\n console.log(result ? `🎉 ${rot13('Nqinapr Nhfgenyvn!')} 🇳🇿` : '😱');\n }\n return result;\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "function useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}", "async function getResyncFailed() {\n const options = {};\n\n const logs = await bashService.exec('docker', ['logs', 'download'], options);\n\n if (logs.out.includes('failed') || logs.out.includes('Failed')) {\n return true;\n } else {\n return false;\n }\n}", "function reportErrors (err) {\n console.error(err.stack)\n process.exit(1)\n}", "function printTailoringStatusAndExit() {\n\tlet msg;\n\tif (persistedTailoringState === cStateNotTailored) {\n\t\tmsg = \"The npm module has not been tailored for a specific runtime environment.\";\n\t} else {\n\t\tmsg = `The npm module has been tailored for runtime environment: ${persistedTailoringState}`;\n\t}\n\tconsole.log(`TAILORING STATE: ${msg}`);\n\tprocess.exit(0);\n}" ]
[ "0.5841752", "0.5626627", "0.54532874", "0.5435985", "0.5388693", "0.52739596", "0.52606153", "0.521972", "0.52030414", "0.52020115", "0.5161493", "0.51220864", "0.50915825", "0.50780183", "0.5064728", "0.5037048", "0.5015287", "0.50104046", "0.4995979", "0.4994261", "0.4985101", "0.4956564", "0.49529803", "0.48889494", "0.4886779", "0.48558494", "0.4849502", "0.4848925", "0.48379895", "0.48252907", "0.4815132", "0.47990215", "0.47936946", "0.4793615", "0.47919935", "0.47830865", "0.47826135", "0.4778413", "0.47647476", "0.47586888", "0.47537208", "0.47518507", "0.4741382", "0.47359425", "0.4734212", "0.4731729", "0.47288105", "0.4721782", "0.47201934", "0.47079897", "0.4696539", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.46933648", "0.4691705", "0.46895033", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4688851", "0.4687028", "0.46772787", "0.46752024", "0.46723548", "0.46678895", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.4665237", "0.46645695", "0.46563673", "0.4646246" ]
0.0
-1
Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "simulateUnmount() {\n this.volumeUnmountListener(this.volumeInfo_.volumeId);\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)errorOrDestroy(dest,er);}// Make sure our error handler is attached before userland ones.", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "componentWillUnmount() {\n window.removeEventListener(\"unhandledrejection\", this.handleAllUncaughtErrors)\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "componentWillUnmount() {\n if (this.props.error) {\n this.props.removeError();\n }\n }", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$3(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$3(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureCommitPhaseError(current,unmountError);}}}", "_onError(e) {\n console.log(`Filer filesystem error: ${e}`);\n }", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "_onError(error) {\n values(this._watcherMap).forEach(watcherInfo =>\n watcherInfo.watchmanWatcher.handleErrorEvent(error)\n );\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "onError_() {\n this.switchScreen_(Screens.ERROR);\n getParentAccessUIHandler().onParentAccessDone(ParentAccessResult.kError);\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n\t {\n\t invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n\t if (hasCaughtError$1()) {\n\t var unmountError = clearCaughtError$1();\n\t captureError(current, unmountError);\n\t }\n\t }\n\t }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (dest.listenerCount('error') === 0) {\n const s = dest._writableState || dest._readableState;\n if (s && !s.errorEmitted) {\n // User incorrectly emitted 'error' directly on the stream.\n errorOrDestroy(dest, er);\n } else {\n dest.emit('error', er);\n }\n }\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n\t debug$2('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) errorOrDestroy$2(dest, er);\n\t } // Make sure our error handler is attached before userland ones.", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }" ]
[ "0.6382642", "0.5924542", "0.58511907", "0.58511907", "0.58511907", "0.58496785", "0.5823018", "0.5823018", "0.5823018", "0.5767682", "0.5741241", "0.5741241", "0.5741241", "0.5741241", "0.5741241", "0.56881076", "0.56881076", "0.56589913", "0.56378233", "0.56378233", "0.56378233", "0.56378233", "0.56378233", "0.56378233", "0.56098413", "0.559434", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5593422", "0.5591753", "0.55684173", "0.55684173", "0.5557047", "0.55557096", "0.55557096", "0.55557096", "0.55557096", "0.5551171", "0.5548788", "0.5548363", "0.5548363", "0.5548363", "0.5548363", "0.5548363", "0.5548363", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509", "0.553509" ]
0.57305086
16
deletion, so don't let them throw. Hostoriginating errors should interrupt deletion, so it's okay
function commitUnmount(current$$1){onCommitUnmount(current$$1);switch(current$$1.tag){case FunctionComponent:case ForwardRef:case MemoComponent:case SimpleMemoComponent:{var updateQueue=current$$1.updateQueue;if(updateQueue!==null){var lastEffect=updateQueue.lastEffect;if(lastEffect!==null){var firstEffect=lastEffect.next;var effect=firstEffect;do{var destroy=effect.destroy;if(destroy!==undefined){safelyCallDestroy(current$$1,destroy);}effect=effect.next;}while(effect!==firstEffect);}}break;}case ClassComponent:{safelyDetachRef(current$$1);var instance=current$$1.stateNode;if(typeof instance.componentWillUnmount==='function'){safelyCallComponentWillUnmount(current$$1,instance);}return;}case HostComponent:{safelyDetachRef(current$$1);return;}case HostPortal:{// TODO: this is recursive. // We are also not using this parent because // the portal will get pushed immediately. if(supportsMutation){unmountHostComponents(current$$1);}else if(supportsPersistence){emptyPortalContainer(current$$1);}return;}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot delete data\")\n\t\tthrow error\n\t} else {\n\t\tlog(\"Delete Success\") \n\t}\n}", "remove () {\n // cleanup\n }", "delete() {}", "detach() {\n throw new Error('Not Implemented');\n }", "detach() {\n throw new Error('Not Implemented');\n }", "cleanup() {}", "cleanup() {}", "function _handleRemove() {\n Promise.all(deletePromises).catch(error => console.log(error));\n next(err);\n }", "removed() {}", "removed() {}", "disconnectedCallback() {\r\n\t\t\tconsole.log(\"deleted\");\r\n\t\t}", "async cleanup() {\n // The cleanup logic is as follows:\n // - We first try to delete the resource using the delete() method\n // - However, it is possible that the user that created the resource does not have permission\n // to delete the resource or the user might have become inactive. Because of this we will\n // also try to perform the same delete() method but with default admin credentials\n\n try {\n await this.delete();\n } catch (error) {\n // Now we try with default admin credentials\n const adminSession = await this.setup.defaultAdminSession();\n this.axiosClient = adminSession.axiosClient;\n await this.delete();\n }\n }", "cleanUpDeadCreeps () {\n }", "disconnected() {\n this.unsubscribe?.();\n delete this.unsubscribe;\n delete this.baseObject;\n delete this.property;\n delete this.replica;\n delete this.path;\n }", "function linkCleanup() {\n\t\tvar links = new DBRow(lit.tables.LINK);\n\t\tlinks.query().then(function() {\n\t\t\tvar href = \"\";\n\n\t\t\twhile(links.next()){\n\t\t\t\thref = links.getValue(lit.LINK);\n\t\t\t\tvar isValid = true;//test link using something\n\t\t\t\tif (isValid)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\tlinks.delete().then(function() { //if it's not valid delete the current link\n\n\t\t\t\t\t}, function() {\n\t\t\t\t\t\tlog.warn(\"The link \" + href + \" was unable to be deleted but is invalid, consider manually deleting the link.\")\n\t\t\t\t\t})\n\t\t\t}\n\n\t\t}, function(err) {\n\n\t\t});\n\t}", "function exit(code) { \n debug(\"caught exit\");\n console.log(\"Trying to remove hosts from manage-hosts\");\n self.remove(hostMap, function() {\n process.exit(); \n });\n }", "cleanup() {\n\n\t}", "function stoogeDeleted(model, error) {\n if (typeof error != 'undefined') {\n callback(error);\n return;\n }\n // model parameter is what was deleted\n self.shouldBeTrue(undefined === model.get('id')); // ID removed\n self.shouldBeTrue(model.get('name') == 'Curly'); // the rest remains\n // Is it really dead?\n var curly = new self.Stooge();\n curly.set('id', self.deletedModelId);\n spec.integrationStore.getModel(curly, hesDeadJim);\n }", "die() {\n let entry;\n while (entry = this._queue.pop()) {\n entry.reject();\n }\n this._queue = null;\n }", "delete() {\n this.items().then(instances => {\n instances.forEach(instance => {\n instance.delete();\n })\n }).catch(error => {\n debugger;\n throw error;\n })\n }", "delete() {\n\n }", "detach() {\n throw new Error('incompatible reuse strategy');\n }", "function cleanup(){\n\t\t\tdelete pending[ serial]\n\t\t}", "function somethingBad() {\n nock.cleanAll()\n }", "function _remove() {\n return;\n }", "async function cleanOrigin( origin ) {\n const fdb = await origin.fdb;\n // Iterate over deleted records, build lists of items to delete by category.\n const deleted = {};\n await fdb.forEach('status','deleted', record => {\n // Read values from the record.\n const { path, category } = record;\n // Construct a request URL.\n const url = origin.url+path;\n // Construct an deletion item.\n const item = { path, url };\n // Record the fileset category.\n const list = deleted[category];\n if( list ) {\n list.push( item );\n }\n else {\n deleted[category] = [ item ];\n }\n });\n // Iterate over each fileset category and remove deleted files from its cache.\n for( const category in deleted ) {\n // Get the fileset cache name..\n const { cacheName } = getFileset( origin, category );\n // Open the cache.\n const cache = await caches.open( cacheName );\n // Get the list of deleted items.\n const items = deleted[category];\n log('debug','%s Deleting %d files from fileset %s...', IconDelete, items.length, category );\n // Iterate over the deleted items.\n for( const { path, url } of items ) {\n const request = new Request( url );\n // Delete from the cache.\n cache.delete( request );\n // Delete the object store record.\n await fdb.remove( path );\n }\n }\n // Prune commit records - delete any commit record with no active file records.\n await fdb.forEach('category', '$commit', async ( record ) => {\n const { path, info: { commit } } = record;\n const count = await fdb.indexCount('commit', commit );\n log('debug','commit %s count %d', commit, count );\n if( count == 0 ) {\n log('debug','%s Deleting commit record for %s...', IconDelete, commit );\n await fdb.remove( path );\n }\n });\n}", "delete() {\n if (!this.msg) throw new Error(\"Tried to delete embed pages but they havn't even been created yet.\");\n this.msg.delete().catch(() => null);\n }", "destroy() { /* There are no resources to clean up on MySQL server */ }", "delete(element) {\n return Promise.reject('not implement');\n }", "deleteRecord() {\n this._super(...arguments);\n const gist = this.gist;\n if(gist) {\n gist.registerDeletedFile(this.id);\n\n // Following try/catch should not be necessary. Bug in ember data?\n try {\n gist.get('files').removeObject(this);\n } catch(e) {\n /* squash */\n }\n }\n }", "delete() {\r\n return super.deleteCore();\r\n }", "delete() {\r\n return super.deleteCore();\r\n }", "delete() {\r\n return super.deleteCore();\r\n }", "async onDeleted() {\n this.log('device deleted', this.getName(), this.settings.serialNumber);\n this.client && this.client.end();\n this.timeout && clearTimeout(this.timeout);\n this.shouldSync = false;\n this.setUnavailable();\n }", "function destroyed() {\n throw new Error('Call made to destroyed method');\n}", "_destroy() {}", "function deleteMovieError() {\n console.log('Unble to delete movie...');\n}", "async function cleanup() {\n const packageResponse = await client.getPackage(packagePayload.Name, { resolveWithFullResponse: true });\n const propertySetTypeResponse = await client.getPropertySetType(\n propertySetTypePayload.Name,\n null,\n { resolveWithFullResponse: true },\n );\n const thingTypeResponse = await client.getThingType(thingTypePayload.Name, null, { resolveWithFullResponse: true });\n\n const things = await client.getThingsByThingType(thingTypePayload.Name);\n things.value.forEach(async (thing) => {\n await client.deleteThing(thing._id);\n console.log(`Thing deleted: ${thing._id}`);\n });\n\n await client.deleteThingType(thingTypePayload.Name, thingTypeResponse.headers.etag);\n console.log(`Thing type deleted: ${thingTypePayload.Name}`);\n await client.deletePropertySetType(propertySetTypePayload.Name, propertySetTypeResponse.headers.etag);\n console.log(`Property set type deleted: ${propertySetTypePayload.Name}`);\n await client.deletePackage(packagePayload.Name, packageResponse.headers.etag);\n console.log(`Package deleted: ${packagePayload.Name}`);\n}", "function socketError() {\n this.destroy();\n}", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "softDrop() {\r\n if (this.actual.softDrop()) {\r\n this.crashed();\r\n }\r\n }", "function socketError () {\n this.destroy();\n}", "function socketError () {\n this.destroy();\n}", "function erasereinforce(){\n\tdelete Reinforce;\n}", "async handleDeletions(keysToDelete) {\n if (this.parent) {\n await this.ensureIndexLoaded()\n }\n let condemned = this.index.getNodesByType(keysToDelete)\n if (Object.keys(condemned.local).length) {\n await this.dynamoClient.deleteAttributes({\n tableName: this.tableName,\n key: this.key,\n attributes: Object.keys(condemned.local)\n }).catch((err) => {u.error('failure in DBObject.handleDeletions', err)})\n }\n \n // Lateral\n let idsToDelete = []\n Object.keys(condemned.lateral).forEach((path) => {\n let node = condemned.lateral[path]\n idsToDelete = idsToDelete.concat(node.getLateralPointers())\n })\n await this._deleteLateral(idsToDelete)\n \n // Elsewhere\n let childNodesWithShitToDelete = {}\n Object.keys(condemned.elsewhere).forEach((path) => {\n let node = condemned.elsewhere[path]\n let pointer = node.getVerticalPointer()\n childNodesWithShitToDelete[pointer] = childNodesWithShitToDelete[pointer] || [] \n childNodesWithShitToDelete[pointer].push(path)\n })\n let pointers = Object.keys(childNodesWithShitToDelete)\n for (let i = 0; i < pointers.length; i++) {\n let pointer = pointers[i]\n let paths = childNodesWithShitToDelete[pointer]\n await this.cachedDirectChildren[pointer].handleDeletions(paths)\n }\n\n // If this is subordinate and we've deleted the last entry, delete the entire node\n if (this.parent) {\n keysToDelete.forEach((path) => {\n delete this.index.i[path]\n })\n this.index.updateMetaNodes()\n let allKeysInIndex = this.index.getChildren()\n if (!allKeysInIndex.length) {await this.destroy()}\n }\n\n // TODO: COLLECTION, FILE, REF\n }", "handleFailure (error_)\n\t{\n\t\t// todo: Undo all actions\n\t\tthis.cleanup ();\n\t\tthrow error_;\n\t}", "Remove() {}", "function cleanupInvalid() {\n //Check for invalid Droplets\n for(var i=droplets.length-1;i >= 0;i--) {\n if(!droplets[i].valid) {\n droplets.splice(i,1);\n }\n }\n\n //Check for invalid Flowers\n for(var i=flowers.length-1;i >= 0;i--) {\n if(!flowers[i].valid) {\n flowers.splice(i,1);\n }\n } \n}", "static cleanup() {\n return connect(DB_NAME).then(db => {\n const transaction = db.transaction([STORE_NAME], 'readwrite');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.index('expires').openCursor(IDBKeyRange.upperBound(Date.now()));\n return new Promise((resolve, reject) => {\n request.onsuccess = event => {\n const cursor = event.target.result;\n\n if (cursor) {\n cursor.delete(); // Ignoring return value … it's not terrible if this goes wrong.\n\n cursor.continue();\n } else {\n resolve(db);\n }\n };\n\n request.onerror = reject;\n });\n }).then(db => {\n db.close();\n });\n }", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "function socketError () {\n\t this.destroy();\n\t}", "function socketError () {\n\t this.destroy();\n\t}", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "internalCleanup() {\n\n }", "static actualize() {\n for (let i = 0; i < refs.length ; ++i) {\n const ref = refs[i];\n if (ref.isOutdated()) {\n ref.remove();\n refs.splice(i--, 1);\n }\n }\n }", "detach() {}", "delete() {\n this.afterDelete();\n Fiber.yield(true)\n }", "static async _delete() {\n\t\tconst serviceName = Config.str(\"serviceName\");\n\n\t\tconsole.log(\"DELETE 1) Find Target Group Arn\");\n\n\t\tconst targetGroup = await ELBManager.describeTargetGroup(serviceName);\n\t\tconst targetGroupArn = targetGroup.TargetGroupArn;\n\t\tif (!targetGroupArn) {\n\t\t\tthrow new Error(\"Could not find target group associated with service: \" + serviceName);\n\t\t}\n\n\t\tconsole.log(\"DELETE 2) Find ELB Rule for Target Group\");\n\n\t\t// List the rules for our core listener\n\t\t// Find the one that refers to our target group from the previous step\n\t\tconst rules = await ELBManager.describeRules(Config.str(\"listenerArn\"));\n\t\tlet ruleArn;\n\t\tfor (const rule of rules) {\n\t\t\tfor (const action of rule.Actions) {\n\t\t\t\tif (action.TargetGroupArn === targetGroupArn) {\n\t\t\t\t\truleArn = rule.RuleArn;\n\t\t\t\t\tconsole.log(\"FOUND RULE: \" + ruleArn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ruleArn) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If we found the rule delete - this should always happen, but we do as an if statement for safety\n\t\tif (ruleArn) {\n\t\t\tconsole.log(\"DELETE 3) Delete Rule\");\n\t\t\tawait ELBManager.deleteRule(ruleArn);\n\t\t}\n\n\t\t// Sleep for a little bit - otherwise we get a message saying the rule still exists\n\t\tawait Util.sleep(10000);\n\n\t\tconsole.log(\"DELETE 4) Delete Target Group\");\n\t\tawait ELBManager.deleteTargetGroup(targetGroupArn);\n\n\t\tconsole.log(\"DELETE 5) Delete Service\");\n\t\tawait ECSManager.deleteService();\n\t}", "function testExec_ThrowsMissingFrom() {\n asyncTestCase.waitForAsync('testExec_ThrowsMissingFrom');\n var query = new lf.query.DeleteBuilder(hr.db.getGlobal());\n query.exec().then(\n fail,\n function(e) {\n asyncTestCase.continueTesting();\n });\n}", "delete() {\n this.deleted = true;\n }", "function terminateOngoingUpload(key) {\n db.getTasks(\"owner_id\", key).then((rows) => {\n if (!rows)\n return;\n\n rows.forEach(row => {\n // file upload ongoing\n if (rows.status == constants.UPLOADING) {\n // file can be removed because the upload was approved\n // (ie the server didn't have the file before upload)\n let promises = [\n db.removeTask(row.taskID),\n db.removeFile(row.file_id)\n ];\n\n Promise.all(promises).then(() => {\n removeChunks(row.file_id);\n })\n .catch(function(err) {\n console.log(err);\n });\n }\n });\n });\n}", "function socketOnError () {\n this.destroy();\n}", "function socketOnError () {\n this.destroy();\n}", "function socketOnError () {\n this.destroy();\n}", "disconnectedCallback() {\n this.repository.delete();\n }", "function onFileSystemFail(err) {\n console.log('deleteFileFromPersistentStorage file system fail: ' + fileName);\n console.log('error code = ' + err.code);\n }", "[_delistFromMeta] () {\n const root = this.root\n if (!root.realpath || !this.path)\n return\n root.inventory.delete(this)\n root.tops.delete(this)\n if (root.meta)\n root.meta.delete(this.path)\n /* istanbul ignore next - should be impossible */\n debug(() => {\n if ([...root.inventory.values()].includes(this))\n throw new Error('failed to delist')\n })\n }", "async cleanup() {\n\n }", "die() {\n this.views.forEach(_view => {\n _view.setValueObj(HDummyValue.new());\n });\n this.views = [];\n if (this.id) {\n require('comm/values').del(this.id);\n }\n }", "die() {\n this.views.forEach(_view => {\n _view.setValueObj(HDummyValue.new());\n });\n this.views = [];\n if (this.id) {\n require('comm/values').del(this.id);\n }\n }", "receivedOp (op) {\n if (this.awaiting <= 0) {\n this.onevent(op)\n } else if (op.struct === 'Delete') {\n var self = this\n var checkDelete = function checkDelete (d) {\n if (d.length == null) {\n throw new Error('This shouldn\\'t happen! d.length must be defined!')\n }\n // we check if o deletes something in self.waiting\n // if so, we remove the deleted operation\n for (var w = 0; w < self.waiting.length; w++) {\n var i = self.waiting[w]\n if (i.struct === 'Insert' && i.id[0] === d.target[0]) {\n var iLength = i.hasOwnProperty('content') ? i.content.length : 1\n var dStart = d.target[1]\n var dEnd = d.target[1] + (d.length || 1)\n var iStart = i.id[1]\n var iEnd = i.id[1] + iLength\n // Check if they don't overlap\n if (iEnd <= dStart || dEnd <= iStart) {\n // no overlapping\n continue\n }\n // we check all overlapping cases. All cases:\n /*\n 1) iiiii\n ddddd\n --> modify i and d\n 2) iiiiiii\n ddddd\n --> modify i, remove d\n 3) iiiiiii\n ddd\n --> remove d, modify i, and create another i (for the right hand side)\n 4) iiiii\n ddddddd\n --> remove i, modify d\n 5) iiiiiii\n ddddddd\n --> remove both i and d (**)\n 6) iiiiiii\n ddddd\n --> modify i, remove d\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n (**) (also check if i contains content or type)\n */\n // TODO: I left some debugger statements, because I want to debug all cases once in production. REMEMBER END TODO\n if (iStart < dStart) {\n if (dStart < iEnd) {\n if (iEnd < dEnd) {\n // Case 1\n // remove the right part of i's content\n i.content.splice(dStart - iStart)\n // remove the start of d's deletion\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n continue\n } else if (iEnd === dEnd) {\n // Case 2\n i.content.splice(dStart - iStart)\n // remove d, we do that by simply ending this function\n return\n } else { // (dEnd < iEnd)\n // Case 3\n var newI = {\n id: [i.id[0], dEnd],\n content: i.content.slice(dEnd - iStart),\n struct: 'Insert'\n }\n self.waiting.push(newI)\n i.content.splice(dStart - iStart)\n return\n }\n }\n } else if (dStart === iStart) {\n if (iEnd < dEnd) {\n // Case 4\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n i.content = []\n continue\n } else if (iEnd === dEnd) {\n // Case 5\n self.waiting.splice(w, 1)\n return\n } else { // (dEnd < iEnd)\n // Case 6\n i.content = i.content.slice(dEnd - iStart)\n i.id = [i.id[0], dEnd]\n return\n }\n } else { // (dStart < iStart)\n if (iStart < dEnd) {\n // they overlap\n /*\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n */\n if (iEnd < dEnd) {\n // Case 7\n // debugger // TODO: You did not test this case yet!!!! (add the debugger here)\n self.waiting.splice(w, 1)\n checkDelete({\n target: [d.target[0], dStart],\n length: iStart - dStart,\n struct: 'Delete'\n })\n checkDelete({\n target: [d.target[0], iEnd],\n length: iEnd - dEnd,\n struct: 'Delete'\n })\n return\n } else if (iEnd === dEnd) {\n // Case 8\n self.waiting.splice(w, 1)\n w--\n d.length -= iLength\n continue\n } else { // dEnd < iEnd\n // Case 9\n d.length = iStart - dStart\n i.content.splice(0, dEnd - iStart)\n i.id = [i.id[0], dEnd]\n continue\n }\n }\n }\n }\n }\n // finished with remaining operations\n self.waiting.push(d)\n }\n if (op.key == null) {\n // deletes in list\n checkDelete(op)\n } else {\n // deletes in map\n this.waiting.push(op)\n }\n } else {\n this.waiting.push(op)\n }\n }", "remove() {\n // alert(\"DEAD ok !\");\n }", "destructor() {\n\t\tObject.keys(this.clients).forEach((hash) => {\n\t\t\tthis.removeClient(hash);\n\t\t});\n\t}", "onDeleted() {\n\t\tthis.isDeleted = true;\n\t\tthis.getDriver().removeListener('nodes_changed', this.onNodesChanged);\n\t}", "function postMortem() {\n throw new Error('This method cannot be called because this Handsontable instance has been destroyed');\n }", "doDestroy() {}", "handleDelete() {\n API.deleteNode(this.props.node).then(() => {\n this.props.node.remove();\n this.props.engine.repaintCanvas();\n }).catch(err => console.log(err));\n }", "ondelete(deltas) { /* ?? */}", "function checkDeleting(v, name) {\n if (v === undefined) {\n throw new Sk.builtin.TypeError(`${name} may not be deleted`);\n }\n}", "function checkDeleting(v, name) {\n if (v === undefined) {\n throw new Sk.builtin.TypeError(`${name} may not be deleted`);\n }\n}", "function deleteShelterError(error) {\n vm.error = \"Could not delete shelter at this time. Please try again later.\";\n scrollToError();\n }", "cleanupDeps() {\n // 源码有更多\n this.depIds = this.newDepIds;\n this.newDepIds.clear(); // 清除最新记录 depIds 集合\n this.deps = this.newDeps;\n this.newDeps.length = 0; // 清除最新记录 dep 集合\n }", "async abort() {\n return;\n }", "function notifydeleted(){\n\tdpost(\"notifydeleted function called\\n\");\n// \tcpost(\"ABOUT to got deleted\\n\");\n\tdeletenodeFromDB(myNodeName);\n\n\t// call all nodes inside the same nodespace and tell them\n\t// to remove connections to this node from the database\n\tmessnamed(myNodeSpace + \"::vpl::nodespace\", \"removeConnection\", myNodeName);\n messnamed(myNodeID + \"::props\", \"close\");\n// \tcpost(myNodeName + \" got deleted\\n\");\n myIOlets.freepeer();\n}" ]
[ "0.65547734", "0.6395657", "0.6280557", "0.6153434", "0.6153434", "0.60908616", "0.60908616", "0.60645497", "0.60639924", "0.60639924", "0.5951789", "0.5949893", "0.59108114", "0.5875467", "0.5855062", "0.5827057", "0.5824024", "0.58122593", "0.58100647", "0.5797361", "0.5781014", "0.577103", "0.57511634", "0.57320035", "0.5726191", "0.5719346", "0.57175606", "0.5711342", "0.5686956", "0.56791615", "0.5672498", "0.5672498", "0.5672498", "0.5670062", "0.566969", "0.56611276", "0.56564605", "0.56463265", "0.56221855", "0.5615482", "0.5615482", "0.5615482", "0.5615482", "0.5615482", "0.5615482", "0.55859816", "0.5574575", "0.5574575", "0.5531519", "0.5520559", "0.5515479", "0.55100286", "0.54972166", "0.5496541", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.5495065", "0.54910254", "0.54910254", "0.5475288", "0.5475288", "0.5475288", "0.54716676", "0.5455493", "0.54524344", "0.5437744", "0.5437681", "0.5430123", "0.54267764", "0.54226565", "0.5422084", "0.5422084", "0.5422084", "0.542202", "0.5421526", "0.5414079", "0.5398873", "0.5398806", "0.5398806", "0.53978276", "0.5395834", "0.5393374", "0.53925", "0.53871495", "0.5387042", "0.5378471", "0.53758764", "0.5371292", "0.5371292", "0.5350193", "0.5340336", "0.533629", "0.5335688" ]
0.0
-1
onYield is called upon exiting. We use these in lieu of returning a tuple. I've also chosen not to inline them into renderRoot because these will eventually be lifted into the renderer.
function onFatal(root){root.finishedWork=null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitYield_stmt(ctx) {\n\t}", "exitYield_expr(ctx) {\n\t}", "function hzYield() {\n\t\treturn t.callExpression(\n\t\t\tt.memberExpression(\n\t\t\t\tt.identifier(\"hzUserLib\"),\n\t\t\t\tt.identifier(\"yield\")\n\t\t\t),\n\t\t\t[t.ObjectExpression([\n\t\t\t\tt.ObjectProperty(t.identifier(\"value\"), t.identifier(\"undefined\")),\n\t\t\t\tt.ObjectProperty(t.identifier(\"done\"), t.BooleanLiteral(false))\n\t\t\t])]\n\t\t);\n\t}", "enterYield_stmt(ctx) {\n\t}", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "function parseYield() {\n next();\n if (!match(TokenType.semi) && !canInsertSemicolon()) {\n eat(TokenType.star);\n parseMaybeAssign();\n }\n}", "enterYield_expr(ctx) {\n\t}", "function matchYield(){return state.yieldAllowed && matchKeyword('yield',!strict);}", "function matchYield() {\n return state.yieldAllowed && matchKeyword('yield', !strict);\n }", "function matchYield() {\n return state.yieldAllowed && matchKeyword('yield', !strict);\n }", "function matchYield() {\n return state.yieldAllowed && matchKeyword('yield', !strict);\n }", "function matchYield() {\n return state.yieldAllowed && matchKeyword('yield', !strict);\n }", "function matchYield() {\n return state.yieldAllowed && matchKeyword('yield', !strict);\n }", "function parseYieldExpression() {\n\t var argument, expr, delegate, previousAllowYield;\n\n\t argument = null;\n\t expr = new Node();\n\t delegate = false;\n\n\t expectKeyword('yield');\n\n\t if (!hasLineTerminator) {\n\t previousAllowYield = state.allowYield;\n\t state.allowYield = false;\n\t delegate = match('*');\n\t if (delegate) {\n\t lex();\n\t argument = parseAssignmentExpression();\n\t } else {\n\t if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {\n\t argument = parseAssignmentExpression();\n\t }\n\t }\n\t state.allowYield = previousAllowYield;\n\t }\n\n\t return expr.finishYieldExpression(argument, delegate);\n\t }", "initEvents() {\n return __awaiter(this, void 0, void 0, function* () {\n yield Promise.all([\n this.renderMathJax(),\n this.renderZenUML(),\n this.renderWavedrom(),\n ]);\n this.previewElement.innerHTML = this.hiddenPreviewElement.innerHTML;\n this.hiddenPreviewElement.innerHTML = \"\";\n yield Promise.all([\n this.renderFlowchart(),\n this.renderInteractiveVega(),\n this.renderSequenceDiagram(),\n this.renderMermaid(),\n ]);\n this.setupCodeChunks();\n if (this.refreshingIconTimeout) {\n clearTimeout(this.refreshingIconTimeout);\n this.refreshingIconTimeout = null;\n }\n this.refreshingIcon.style.display = \"none\";\n });\n }", "formatYieldChildren(children){\n let {labelName, valueName, \n placeHolder, multi, style, className} = this.props;\n const {filterText, value, open} = this.state;\n\n let nodes = [], tags = [];\n React.Children.map(children, (item, index) => {\n const props = item.props;\n const item_val = props[valueName];\n const item_label = props[labelName];\n let selected = false;\n if (multi) {\n const _index = value.indexOf(item_val);\n selected = _index !== -1;\n if(selected) tags[_index] = item_label;\n } else {\n selected = value === item_val;\n if (selected) {\n placeHolder = item_label;\n }\n }\n \n if(this.filterTextMatched(filterText, item_label, item_val)) {\n nodes.push(\n <DropDownOption key={index}\n value={item_val} \n label={item_label}\n disabled={props.disabled}\n onClick={() => this.handleChangeSelect(item_val)}\n selected={selected}>\n {props.children}\n </DropDownOption>\n )\n }\n });\n\n let labelNode = this.formatLabel(multi ? tags : placeHolder)\n\n className = klassName('dropdown', className);\n\n if (open) {\n className = `${className} _active`;\n }\n\n return <div className={className} style={style}>\n {labelNode}\n <span className=\"_list\">\n {open ? nodes : null}\n {this.formatLoading()}\n </span>\n </div>;\n }", "function yieldTemplate(template, env, parentScope, morph, renderState, visitor) {\n return function (blockArguments, self) {\n // Render state is used to track the progress of the helper (since it\n // may call into us multiple times). As the user-land helper calls\n // into library code, we track what needs to be cleaned up after the\n // helper has returned.\n //\n // Here, we remember that a template has been yielded and so we do not\n // need to remove the previous template. (If no template is yielded\n // this render by the helper, we assume nothing should be shown and\n // remove any previous rendered templates.)\n renderState.morphToClear = null;\n\n // In this conditional is true, it means that on the previous rendering pass\n // the helper yielded multiple items via `yieldItem()`, but this time they\n // are yielding a single template. In that case, we mark the morph list for\n // cleanup so it is removed from the DOM.\n if (morph.morphList) {\n _htmlbarsUtilTemplateUtils.clearMorphList(morph.morphList, morph, env);\n renderState.morphListToClear = null;\n }\n\n var scope = parentScope;\n\n if (morph.lastYielded && isStableTemplate(template, morph.lastYielded)) {\n return morph.lastResult.revalidateWith(env, undefined, self, blockArguments, visitor);\n }\n\n // Check to make sure that we actually **need** a new scope, and can't\n // share the parent scope. Note that we need to move this check into\n // a host hook, because the host's notion of scope may require a new\n // scope in more cases than the ones we can determine statically.\n if (self !== undefined || parentScope === null || template.arity) {\n scope = env.hooks.createChildScope(parentScope);\n }\n\n morph.lastYielded = { self: self, template: template, shadowTemplate: null };\n\n // Render the template that was selected by the helper\n var renderOptions = new _render.RenderOptions(morph, self, blockArguments);\n _render2.default(template, env, scope, renderOptions);\n };\n}", "handle(context, type, onNext) {\n return __awaiter(this, void 0, void 0, function* () {\n let returnValue = null;\n function runHandler(index) {\n return __awaiter(this, void 0, void 0, function* () {\n if (index < handlers.length) {\n const val = yield handlers[index](context, () => runHandler(index + 1));\n // if a value is returned, and we have not yet set the return value,\n // capture it. This is used to allow InvokeResponses to be returned.\n if (typeof (val) !== 'undefined' && returnValue === null) {\n returnValue = val;\n }\n }\n else {\n const val = yield onNext();\n if (typeof (val) !== 'undefined') {\n returnValue = val;\n }\n }\n });\n }\n const handlers = this.handlers[type] || [];\n yield runHandler(0);\n return returnValue;\n });\n }", "function yieldTemplate(template, env, parentScope, morph, renderState, visitor) {\n return function (blockArguments, self) {\n // Render state is used to track the progress of the helper (since it\n // may call into us multiple times). As the user-land helper calls\n // into library code, we track what needs to be cleaned up after the\n // helper has returned.\n //\n // Here, we remember that a template has been yielded and so we do not\n // need to remove the previous template. (If no template is yielded\n // this render by the helper, we assume nothing should be shown and\n // remove any previous rendered templates.)\n renderState.morphToClear = null;\n\n // In this conditional is true, it means that on the previous rendering pass\n // the helper yielded multiple items via `yieldItem()`, but this time they\n // are yielding a single template. In that case, we mark the morph list for\n // cleanup so it is removed from the DOM.\n if (morph.morphList) {\n _htmlbarsUtilTemplateUtils.clearMorphList(morph.morphList, morph, env);\n renderState.morphListToClear = null;\n }\n\n var scope = parentScope;\n\n if (morph.lastYielded && isStableTemplate(template, morph.lastYielded)) {\n return morph.lastResult.revalidateWith(env, undefined, self, blockArguments, visitor);\n }\n\n // Check to make sure that we actually **need** a new scope, and can't\n // share the parent scope. Note that we need to move this check into\n // a host hook, because the host's notion of scope may require a new\n // scope in more cases than the ones we can determine statically.\n if (self !== undefined || parentScope === null || template.arity) {\n scope = env.hooks.createChildScope(parentScope);\n }\n\n morph.lastYielded = { self: self, template: template, shadowTemplate: null };\n\n // Render the template that was selected by the helper\n var renderOptions = new _render.RenderOptions(morph, self, blockArguments);\n _render.default(template, env, scope, renderOptions);\n };\n }", "function parseYieldExpression() {\n var argument, expr, delegate, previousAllowYield;\n\n argument = null;\n expr = new Node();\n delegate = false;\n\n expectKeyword('yield');\n\n if (!hasLineTerminator) {\n previousAllowYield = state.allowYield;\n state.allowYield = false;\n delegate = match('*');\n if (delegate) {\n lex();\n argument = parseAssignmentExpression();\n } else {\n if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {\n argument = parseAssignmentExpression();\n }\n }\n state.allowYield = previousAllowYield;\n }\n\n return expr.finishYieldExpression(argument, delegate);\n }", "function yieldTemplate(template, env, parentScope, morph, renderState, visitor) {\n return function (blockArguments, self) {\n // Render state is used to track the progress of the helper (since it\n // may call into us multiple times). As the user-land helper calls\n // into library code, we track what needs to be cleaned up after the\n // helper has returned.\n //\n // Here, we remember that a template has been yielded and so we do not\n // need to remove the previous template. (If no template is yielded\n // this render by the helper, we assume nothing should be shown and\n // remove any previous rendered templates.)\n renderState.morphToClear = null;\n\n // In this conditional is true, it means that on the previous rendering pass\n // the helper yielded multiple items via `yieldItem()`, but this time they\n // are yielding a single template. In that case, we mark the morph list for\n // cleanup so it is removed from the DOM.\n if (morph.morphList) {\n _htmlbarsUtilTemplateUtils.clearMorphList(morph.morphList, morph, env);\n renderState.morphListToClear = null;\n }\n\n var scope = parentScope;\n\n if (morph.lastYielded && isStableTemplate(template, morph.lastYielded)) {\n return morph.lastResult.revalidateWith(env, undefined, self, blockArguments, visitor);\n }\n\n // Check to make sure that we actually **need** a new scope, and can't\n // share the parent scope. Note that we need to move this check into\n // a host hook, because the host's notion of scope may require a new\n // scope in more cases than the ones we can determine statically.\n if (self !== undefined || parentScope === null || template.arity) {\n scope = env.hooks.createChildScope(parentScope);\n }\n\n morph.lastYielded = { self: self, template: template, shadowTemplate: null };\n\n // Render the template that was selected by the helper\n _render.default(template, env, scope, { renderNode: morph, self: self, blockArguments: blockArguments });\n };\n }", "function yieldTemplate(template, env, parentScope, morph, renderState, visitor) {\n return function (blockArguments, self) {\n // Render state is used to track the progress of the helper (since it\n // may call into us multiple times). As the user-land helper calls\n // into library code, we track what needs to be cleaned up after the\n // helper has returned.\n //\n // Here, we remember that a template has been yielded and so we do not\n // need to remove the previous template. (If no template is yielded\n // this render by the helper, we assume nothing should be shown and\n // remove any previous rendered templates.)\n renderState.morphToClear = null;\n\n // In this conditional is true, it means that on the previous rendering pass\n // the helper yielded multiple items via `yieldItem()`, but this time they\n // are yielding a single template. In that case, we mark the morph list for\n // cleanup so it is removed from the DOM.\n if (morph.morphList) {\n _htmlbarsUtilTemplateUtils.clearMorphList(morph.morphList, morph, env);\n renderState.morphListToClear = null;\n }\n\n var scope = parentScope;\n\n if (morph.lastYielded && isStableTemplate(template, morph.lastYielded)) {\n return morph.lastResult.revalidateWith(env, undefined, self, blockArguments, visitor);\n }\n\n // Check to make sure that we actually **need** a new scope, and can't\n // share the parent scope. Note that we need to move this check into\n // a host hook, because the host's notion of scope may require a new\n // scope in more cases than the ones we can determine statically.\n if (self !== undefined || parentScope === null || template.arity) {\n scope = env.hooks.createChildScope(parentScope);\n }\n\n morph.lastYielded = { self: self, template: template, shadowTemplate: null };\n\n // Render the template that was selected by the helper\n _render.default(template, env, scope, { renderNode: morph, self: self, blockArguments: blockArguments });\n };\n }", "*end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }", "function parseYieldExpression() {\n var argument, expr, delegate, previousAllowYield;\n\n argument = null;\n expr = new Node();\n\n expectKeyword('yield');\n\n if (!hasLineTerminator) {\n previousAllowYield = state.allowYield;\n state.allowYield = false;\n delegate = match('*');\n if (delegate) {\n lex();\n argument = parseAssignmentExpression();\n } else {\n if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {\n argument = parseAssignmentExpression();\n }\n }\n state.allowYield = previousAllowYield;\n }\n\n return expr.finishYieldExpression(argument, delegate);\n }", "function parseYieldExpression() {\n var argument, expr, delegate, previousAllowYield;\n\n argument = null;\n expr = new Node();\n delegate = false;\n\n expectKeyword('yield');\n\n if (!hasLineTerminator) {\n previousAllowYield = state.allowYield;\n state.allowYield = false;\n delegate = match('*');\n if (delegate) {\n lex();\n argument = parseAssignmentExpression();\n } else {\n if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {\n argument = parseAssignmentExpression();\n }\n }\n state.allowYield = previousAllowYield;\n }\n\n return expr.finishYieldExpression(argument, delegate);\n }", "function parseYieldExpression() {\n var argument, expr, delegate, previousAllowYield;\n\n argument = null;\n expr = new Node();\n delegate = false;\n\n expectKeyword('yield');\n\n if (!hasLineTerminator) {\n previousAllowYield = state.allowYield;\n state.allowYield = false;\n delegate = match('*');\n if (delegate) {\n lex();\n argument = parseAssignmentExpression();\n } else {\n if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {\n argument = parseAssignmentExpression();\n }\n }\n state.allowYield = previousAllowYield;\n }\n\n return expr.finishYieldExpression(argument, delegate);\n }", "function parseYieldExpression() {\n var argument, expr, delegate;\n\n expr = new Node();\n\n if (!state.allowYield) {\n tolerateUnexpectedToken(lookahead, Messages.IllegalYield);\n }\n\n expectKeyword('yield');\n\n if (!hasLineTerminator) {\n delegate = match('*');\n if (delegate) {\n lex();\n argument = parseExpression();\n } else {\n if (!match(';') && !match('}') && lookahead.type !== Token.EOF) {\n argument = parseExpression();\n }\n }\n }\n\n return expr.finishYieldExpression(argument, delegate);\n }", "*end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }", "defaultNextEvent(context) {\n const runDialogs = () => __awaiter(this, void 0, void 0, function* () {\n yield this.handle(context, 'Dialog', () => __awaiter(this, void 0, void 0, function* () {\n // noop\n }));\n });\n return runDialogs;\n }", "onDispose() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.arena.winner && this.arena.loser)\n try {\n yield this.updateGameRecords(this.arena.winner, this.arena.loser);\n if (!this.updateMissions)\n return;\n yield this.updateMissionGoals(this.arena.winner, this.arena.loser);\n if (!this.allowMatchCalculations)\n return;\n yield results.updateGameResults(Object.assign(Object.assign({}, this.arena.loser.season), { coins: this.arena.loser.coins, season: 1, id: this.arena.loser.id }));\n yield results.updateGameResults(Object.assign(Object.assign({}, this.arena.winner.season), { coins: this.arena.winner.coins, season: 1, id: this.arena.winner.id }));\n }\n catch (e) {\n logger_1.log.error(e);\n }\n });\n }", "exitPair(ctx) {\n }", "function YieldExpression(node, parent) {\n\t return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) || t.isYieldExpression(parent);\n\t}", "function YieldExpression(node, parent) {\n\t return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) || t.isYieldExpression(parent);\n\t}", "_displayBlocks() { /////////////////////\n return (\n <ViroNode>\n {this._makeBlocks()}\n </ViroNode>\n )\n }", "function generator2() {\n yield 5;\n}", "*forwards() {\r\n yield this;\r\n yield* this.descendants();\r\n }", "function YieldExpression(node, parent) {\n return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) || t.isYieldExpression(parent);\n}", "*entries() {\n for (const item of this) {\n yield [item, item];\n }\n }", "exitPair(ctx) {\n\t}", "render() {\r\n return;\r\n }", "*all() {\n for (let cur = this.from; cur <= this.to; cur++) {\n yield this.glass(Address4.fromInteger(cur).address)\n }\n }", "function returnHandler(data){\n allHandle(data);\n }", "function handleOneNext() {\n var prevResult = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n\n try {\n var yielded = genObj.next(prevResult); // may throw\n if (yielded.done) {\n if (yielded.value !== undefined) {\n // Something was explicitly returned:\n // Report the value as a result to the caller\n callbacks.success(yielded.value);\n }\n } else {\n setTimeout(runYieldedValue, 0, yielded.value);\n }\n }\n // Catch unforeseen errors in genObj\n catch (error) {\n if (callbacks) {\n callbacks.failure(error);\n } else {\n throw error;\n }\n }\n }", "render() {\n\n // for i of x\n\n // RULE 5: MUST RETURN BACK JSX\n return (\n <div className=\"MYMEMES\">\n { bla() }\n { array.map( (val) => {\n return this.videos(val.imgSrc, val.title);\n })\n }\n </div>\n );\n }", "function stackConsumers(retFn) {\n const values = [];\n let fn = () => retFn(values);\n\n for (let i = 0; i < contexts.length; i++) {\n const Context = contexts[i];\n const childFn = fn;\n\n fn = () => (\n <Context.Consumer>\n {(value) => {\n values[i] = value;\n return childFn();\n }}\n </Context.Consumer>\n );\n }\n\n return fn();\n}", "*nodes(){\n if(!this.root) return;\n let stack = [this.root];\n while(stack.length){\n const node = stack.pop();\n if(node.left) stack.push(node.left);\n if(node.right) stack.push(node.right);\n yield node;\n }\n }", "function recursivelyCallNextOnIterator(data) {\n var yielded = iterator.next.apply(iterator, arguments);\n // yielded = { value: Any, done: Boolean }\n\n if (yielded.done) {\n taskInstance.isIdle = true;\n taskInstance.isRunning = false;\n // call setState with the same state to trigger another render\n // so that you can use task properties like isIdle directly\n // in your render function\n component.setState(component.state);\n return;\n }\n\n if (isPromise(yielded.value)) {\n yielded.value.then(function (data) {\n if (component._isMounted) {\n recursivelyCallNextOnIterator(data);\n }\n }, function (e) {\n if (component._isMounted) {\n iterator.throw(e);\n }\n });\n }\n }", "*match(root) {\n const context = { scope: root };\n yield* this.matchInternal(root, 0, context);\n }", "onCloseTag() {\n const poppedTag = this.activeTagStack.pop();\n // If we were converting a tag to a string, and the tag was not self-closing, close it here.\n if (poppedTag.childrenStringEmitClosingTag) {\n poppedTag.childrenStringTags.push(poppedTag.childrenStringEmitClosingTag);\n }\n // Set the literal value if we were collecting XML tags to string\n if (poppedTag.childrenTagsToString) {\n poppedTag.datatype = this.dataFactory.namedNode(RdfXmlParser.RDF + 'XMLLiteral');\n poppedTag.text = poppedTag.childrenStringTags.join('');\n poppedTag.hadChildren = false; // Force a literal triple to be emitted hereafter\n }\n if (poppedTag.childrenCollectionSubject) {\n // Terminate the rdf:List\n this.emitTriple(poppedTag.childrenCollectionSubject, poppedTag.childrenCollectionPredicate, this.dataFactory.namedNode(RdfXmlParser.RDF + 'nil'), poppedTag.reifiedStatementId);\n }\n else if (poppedTag.predicate) {\n if (!poppedTag.hadChildren && poppedTag.childrenParseType !== ParseType.PROPERTY) {\n // Property element contains text\n this.emitTriple(poppedTag.subject, poppedTag.predicate, this.dataFactory.literal(poppedTag.text || '', poppedTag.datatype || poppedTag.language), poppedTag.reifiedStatementId);\n }\n else if (!poppedTag.predicateEmitted) {\n // Emit remaining properties on an anonymous property element\n const subject = this.dataFactory.blankNode();\n this.emitTriple(poppedTag.subject, poppedTag.predicate, subject, poppedTag.reifiedStatementId);\n for (let i = 0; i < poppedTag.predicateSubPredicates.length; i++) {\n this.emitTriple(subject, poppedTag.predicateSubPredicates[i], poppedTag.predicateSubObjects[i], null);\n }\n }\n }\n }", "*blocks() {\r\n\t\tfor (let i = 0; i < this.#blocks.length; i++) {\r\n\t\t\tyield this.#blocks[i]\r\n\t\t}\r\n\t}", "function _contextNext() {\n\t\n\t // Get the next node from the sequence\n\t if (!this._contextState.nextSequence) {\n\t return undefined;\n\t }\n\t if (this._context.reverse) {\n\t this._contextState.nextSequence = this._contextState.nextSequence.getNext();\n\t if (!this._contextState.nextSequence) {\n\t return undefined;\n\t }\n\t }\n\t var renderNode = this._contextState.nextSequence.get();\n\t if (!renderNode) {\n\t this._contextState.nextSequence = undefined;\n\t return undefined;\n\t }\n\t var nextSequence = this._contextState.nextSequence;\n\t if (!this._context.reverse) {\n\t this._contextState.nextSequence = this._contextState.nextSequence.getNext();\n\t }\n\t if (this._contextState.lastRenderNode === renderNode) {\n\t throw 'ViewSequence is corrupted, should never contain the same renderNode twice, index: ' + nextSequence.getIndex();\n\t }\n\t this._contextState.lastRenderNode = renderNode;\n\t return {\n\t renderNode: renderNode,\n\t viewSequence: nextSequence,\n\t next: true,\n\t index: ++this._contextState.nextGetIndex\n\t };\n\t }", "exitDecorated(ctx) {\n\t}", "exitBlock(ctx) {\n\t}", "render() {\n\t\treturn (\n\t\t\tnull\n\t\t)\n\t}", "function decorateContextFunction(ctx, next) {\r\n ctx.render = (content) => render(content, document.querySelector('main'));\r\n ctx.setUserNav = setUserNav;\r\n next();\r\n}", "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "function allPages(req, res, template, block, next) {\n\n // All available parameters\n // NOTE: This only works here because this template is last:true (see exports).\n var params = res.params;\n\n // Get some data (e.g. this could be a call off to Mongo based on the params\n var item = {\n variable: \"Hello World\",\n params: params\n };\n\n // Now render the output\n calipso.theme.renderItem(req, res, template, block, {\n item: item\n },next);\n\n}", "routeCallback(req, res) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield this.callback(req, res);\n }\n catch (error) {\n this.handleError(error, res);\n }\n });\n }", "squareToRender() {\n const element = [];\n for (let i = 0; i < 3; i++) {\n element.push(this.handleSquare(i))\n }\n return element.map((item, index) => <Fragment key={index}>{item}</Fragment>);\n }", "getEventsToRender() {}", "function YieldBlock(to, params) {\n return [op('SimpleArgs', {\n params,\n hash: null,\n atNames: true\n }), op(23\n /* GetBlock */\n , to), op(24\n /* SpreadBlock */\n ), op('Option', op(60\n /* CompileBlock */\n )), op(63\n /* InvokeYield */\n ), op(39\n /* PopScope */\n ), op(1\n /* PopFrame */\n )];\n}", "function shouldYield(){if(deadline===null){return false;}if(deadline.timeRemaining()>timeHeuristicForUnitOfWork){// Disregard deadline.didTimeout. Only expired work should be flushed\n// during a timeout. This path is only hit for non-expired work.\nreturn false;}deadlineDidExpire=true;return true;}// TODO: Not happy about this hook. Conceptually, renderRoot should return a", "function shouldYield(){if(deadline===null){return false;}if(deadline.timeRemaining()>timeHeuristicForUnitOfWork){// Disregard deadline.didTimeout. Only expired work should be flushed\n// during a timeout. This path is only hit for non-expired work.\nreturn false;}deadlineDidExpire=true;return true;}// TODO: Not happy about this hook. Conceptually, renderRoot should return a", "* iterNodeIds() {\n yield* this.nodes.keys();\n }", "*descendants() {\r\n let state = this.next;\r\n while (state != null) {\r\n yield state;\r\n state = state.next;\r\n }\r\n }", "function renderEverything() {\n renderPepperonni() ;\n renderMushrooms() ;\n renderGreenPeppers() ;\n renderWhiteSauce() ;\n renderGlutenFreeCrust() ;\n // renderButtons() -- not done, integrated this into the render of each ingredient ;\n renderPrice() ;\n}", "async *walk() {\n for await (let relPath of this.walkRecursively('')) {\n yield relPath;\n }\n }", "*[Symbol.iterator]() {\n for (let node = this.first, position = 0; node; position++, node = node.next) {\n yield node.value;\n }\n }", "render() {\n return <> </>\n }", "*backwards() {\r\n yield this;\r\n yield* this.ancestors();\r\n }", "static rendered () {}", "static rendered () {}", "ReturnStatement(path) {\n if (path.node.argument.type === 'SequenceExpression') {\n path.replaceWithMultiple(\n path.node.argument.expressions.map(e => t.expressionStatement(e))\n );\n }\n }", "render() {\n\t\tthis.a1.render(this.context);\n\t\tthis.b1.render(this.context);\n\t\tthis.c1.render(this.context);\n\t\tthis.c2.render(this.context);\n\t\tthis.d1.render(this.context);\n\t\tthis.e1.render(this.context);\n\t\tthis.f1.render(this.context);\n\t\tthis.g1.render(this.context);\n\t\tthis.a1s.render(this.context);\n\t\tthis.c1s.render(this.context);\n\t\tthis.d1s.render(this.context);\n\t\tthis.f1s.render(this.context);\n\t\tthis.g1s.render(this.context);\n\n\t}", "function generators() {\n\t\t\t\tBlockly.JavaScript.fw = function(block) {\n\t\t\t\t\tif (checkTopLevel(block)) {\n\t\t\t\t\t\treturn 'programService.addInstruction(instructionFactory.getInstruction(\\x27' + block.type + '\\x27));';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.JavaScript.rr = function(block) {\n\t\t\t\t\tif (checkTopLevel(block)) {\n\t\t\t\t\t\treturn 'programService.addInstruction(instructionFactory.getInstruction(\\x27' + block.type + '\\x27));';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.JavaScript.rl = function(block) {\n\t\t\t\t\tif (checkTopLevel(block)) {\n\t\t\t\t\t\treturn 'programService.addInstruction(instructionFactory.getInstruction(\\x27' + block.type + '\\x27));';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.JavaScript.lt = function(block) {\n\t\t\t\t\tif (checkTopLevel(block)) {\n\t\t\t\t\t\treturn 'programService.addInstruction(instructionFactory.getInstruction(\\x27' + block.type + '\\x27));';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.JavaScript.start = function(block) {\n\t\t\t\t\treturn '';\n\t\t\t\t};\n\t\t\t}", "function generator(node) {\n\t var body = [];\n\t var container = t.functionExpression(null, [], t.blockStatement(body), true);\n\t container.shadow = true;\n\n\t body.push(_helpersBuildComprehension2[\"default\"](node, function () {\n\t return t.expressionStatement(t.yieldExpression(node.body));\n\t }));\n\n\t return t.callExpression(container, []);\n\t}", "function generator(node) {\n\t var body = [];\n\t var container = t.functionExpression(null, [], t.blockStatement(body), true);\n\t container.shadow = true;\n\n\t body.push(_helpersBuildComprehension2[\"default\"](node, function () {\n\t return t.expressionStatement(t.yieldExpression(node.body));\n\t }));\n\n\t return t.callExpression(container, []);\n\t}", "function _contextNext() {\n\n\t // Get the next node from the sequence\n\t if (!this._contextState.nextSequence) {\n\t return undefined;\n\t }\n\t if (this._context.reverse) {\n\t this._contextState.nextSequence = this._contextState.nextSequence.getNext();\n\t if (!this._contextState.nextSequence) {\n\t return undefined;\n\t }\n\t }\n\t var renderNode = this._contextState.nextSequence.get();\n\t if (!renderNode) {\n\t this._contextState.nextSequence = undefined;\n\t return undefined;\n\t }\n\t var nextSequence = this._contextState.nextSequence;\n\t if (!this._context.reverse) {\n\t this._contextState.nextSequence = this._contextState.nextSequence.getNext();\n\t }\n\t return {\n\t renderNode: renderNode,\n\t viewSequence: nextSequence,\n\t next: true,\n\t index: ++this._contextState.nextGetIndex\n\t };\n\t }", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderButtons();\n renderPrice();\n renderReceipt()\n}", "onUnload(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (this.refreshEufySecurityTimeout)\n clearTimeout(this.refreshEufySecurityTimeout);\n yield this.clearEvents(this.personDetected, types_1.CameraStateID.PERSON_DETECTED);\n yield this.clearEvents(this.motionDetected, types_1.CameraStateID.MOTION_DETECTED);\n yield this.clearEvents(this.ringing, types_1.DoorbellStateID.RINGING);\n yield this.clearEvents(this.cryingDetected, types_1.IndoorCameraStateID.CRYING_DETECTED);\n yield this.clearEvents(this.soundDetected, types_1.IndoorCameraStateID.SOUND_DETECTED);\n yield this.clearEvents(this.petDetected, types_1.IndoorCameraStateID.PET_DETECTED);\n yield this.clearEvents(this.downloadEvent);\n if (this.eufy)\n this.setPushPersistentIds(this.eufy.getPushPersistentIds());\n this.writePersistentData();\n if (this.eufy)\n this.eufy.close();\n callback();\n }\n catch (e) {\n callback();\n }\n });\n }", "function execute(generator, yieldValue) {\r\n let next = generator.next(yieldValue);\r\n\r\n if (!next.done) {\r\n next.value.then(\r\n result => execute(generator, result),\r\n err => generator.throw(err)\r\n );\r\n } else {\r\n // block is for 'return' from generators\r\n alert(next.value);\r\n }\r\n}", "function renderEverything() {\n renderPepperonni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderPrice();\n}", "exitWrappedGraph(ctx) {\n\t}", "exitComp_iter(ctx) {\n\t}", "function complete(){\n callbackCount++;\n if(callbackCount >= 1){\n // console.log(context)\n res.render('users', context);\n }\n }", "function get_each_context$8(ctx, list, i) {\n var child_ctx = ctx.slice();\n child_ctx[10] = list[i];\n return child_ctx;\n } // (49:0) {#if items && items.length}", "visitChildren(ctx) {\n if (!ctx) {\n return;\n }\n if (ctx.children) {\n return ctx.children.map((child) => {\n if (child.children && child.children.length !== 0) {\n return child.accept(this);\n }\n return child.getText();\n });\n }\n }", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function generator(node) {\n var body = [];\n var container = t.functionExpression(null, [], t.blockStatement(body), true);\n container.shadow = true;\n\n body.push(_helpersBuildComprehension2[\"default\"](node, function () {\n return t.expressionStatement(t.yieldExpression(node.body));\n }));\n\n return t.callExpression(container, []);\n}", "exitDecorators(ctx) {\n\t}", "function hzYieldArg(argExp, delegate = false) {\n\t\tconst callExp = hzYield();\n\t\tcallExp.callee.property.name = \"yieldValue\";\n\t\tcallExp.arguments[0].properties[0].value = argExp;\n\t\tcallExp.arguments[1] = t.BooleanLiteral(delegate);\n\t\treturn callExp;\n\t}", "renderResponse(responseURI, response) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.renderResponseConcrete(responseURI, response);\n });\n }", "exitList_iter(ctx) {\n\t}", "function Test_GetAdminMsg() {\n return __awaiter(this, void 0, void 0, function () {\n var out_rpc_msg;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n console.log(\"Begin: Test_GetAdminMsg\");\n return [4 /*yield*/, api.GetAdminMsg()];\n case 1:\n out_rpc_msg = _a.sent();\n console.log(out_rpc_msg);\n console.log(\"End: Test_GetAdminMsg\");\n console.log(\"-----\");\n console.log();\n return [2 /*return*/];\n }\n });\n });\n}" ]
[ "0.56866634", "0.5684245", "0.5497083", "0.5296737", "0.5290775", "0.52903396", "0.52688825", "0.5127838", "0.5015035", "0.49599028", "0.49599028", "0.49599028", "0.49599028", "0.4956098", "0.49541187", "0.49217808", "0.4916253", "0.48688143", "0.48666376", "0.48553962", "0.483992", "0.483992", "0.4799903", "0.47973102", "0.47894996", "0.47894996", "0.4775974", "0.474141", "0.4659574", "0.45813015", "0.45282486", "0.45180175", "0.45180175", "0.44805604", "0.4469075", "0.44632208", "0.4458119", "0.44511828", "0.44354555", "0.44262844", "0.44100404", "0.43988037", "0.43700755", "0.43535194", "0.43475673", "0.43279994", "0.43208462", "0.43055308", "0.43038493", "0.42882645", "0.42785233", "0.42779917", "0.4274677", "0.42587042", "0.4257772", "0.42507824", "0.42507824", "0.4247143", "0.4245858", "0.42307445", "0.42307237", "0.42299086", "0.4227097", "0.4227097", "0.42268836", "0.41988608", "0.4193915", "0.41845855", "0.41825598", "0.4180134", "0.417929", "0.41789684", "0.41789684", "0.4174549", "0.4172427", "0.41706312", "0.41663513", "0.41663513", "0.41626203", "0.41481903", "0.41433612", "0.41354784", "0.41325158", "0.41323835", "0.41266522", "0.4123138", "0.41199866", "0.4118395", "0.4112045", "0.4112045", "0.4112045", "0.4112045", "0.4112045", "0.4112045", "0.4112045", "0.4105815", "0.41032514", "0.41015592", "0.4101496", "0.41000903", "0.4090637" ]
0.0
-1
It's up to the renderer to call renderRoot at some point in the future.
function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of // the currently rendering batch. return;}if(isBatchingUpdates){// Flush work at the end of the batch. if(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should // flush it now. nextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time? if(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpirationTime(root,expirationTime);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_render() {\n this._reactComponent = this._getReactComponent();\n if (!this._root) this._root = createRoot(this._container.getElement()[0]);\n this._root.render(this._reactComponent);\n }", "_renderNewRootComponent(/* instance, ... */) { }", "function completeRender() {\n\t\t\t\t\t\tvar console = window.console;\n\t\t\t\t\t\tvar afterRender = root.afterRender;\n\n\t\t\t\t\t\tif (afterRender) {\n\t\t\t\t\t\t\tafterRender.call(root, root);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Always emit an afterRender event.\n\t\t\t\t\t\t */\n\t\t\t\t\t\troot.trigger(\"afterRender\", root);\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * If there are multiple top level elements and `el: false` is used,\n\t\t\t\t\t\t * display a warning message and a stack trace.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (manager.noel && root.$el.length > 1) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Do not display a warning while testing or if warning suppression\n\t\t\t\t\t\t\t * is enabled.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (_.isFunction(console.warn) && !root.suppressWarnings) {\n\t\t\t\t\t\t\t\tconsole.warn(\"`el: false` with multiple top level elements is \" +\n\t\t\t\t\t\t\t\t\t\t\"not supported.\");\n\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Provide a stack trace if available to aid with debugging.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif (_.isFunction(console.trace)) {\n\t\t\t\t\t\t\t\t\tconsole.trace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "function completeRender() {\n var console = window.console;\n var afterRender = root.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n\n // If there are multiple top level elements and `el: false` is used,\n // display a warning message and a stack trace.\n if (manager.noel && root.$el.length > 1) {\n // Do not display a warning while testing or if warning suppression\n // is enabled.\n if (_.isFunction(console.warn) && !root.suppressWarnings) {\n console.warn(\"`el: false` with multiple top level elements is \" +\n \"not supported.\");\n\n // Provide a stack trace if available to aid with debugging.\n if (_.isFunction(console.trace)) {\n console.trace();\n }\n }\n }\n }", "render() {\n this._userEvent('beforeRender');\n const html = this.template.render({data: this.viewData}, (data) => {\n return this.wrapTemplate(data);\n });\n if (!this.wrapper) {\n this.wrapper = this._createWrapper();\n }\n this.updateNode(this.wrapper, html);\n this.resize();\n this._userEvent('afterRender');\n }", "function render(element) {\n ROOT_NODE = createElement('ROOT');\n const container = ROOT_NODE;\n\n // Returns the current fiber (flushed fiber)\n const node = DesktopRenderer.createContainer(ROOT_NODE);\n\n // Schedules a top level update with current fiber and a priority level (depending upon the context)\n DesktopRenderer.updateContainer(element, node, null);\n ROOT_NODE.render();\n // DesktopRenderer.injectIntoDevTools({\n // bundleType: 1,\n // version: '0.1.0',\n // rendererPackageName: 'custom-renderer',\n // findHostInstanceByFiber: DesktopRenderer.findHostInstance\n // })\n}", "function render() {\n renderRegistry();\n renderDirectory();\n renderOverride();\n}", "function actuallyRender() {\n var options = root.getAllOptions();\n var manager = root.__manager__;\n var parent = manager.parent;\n var rentManager = parent && parent.__manager__;\n\n // The `_viewRender` method is broken out to abstract away from having\n // too much code in `processRender`.\n root._render(LayoutManager._viewRender, options).done(function() {\n // If there are no children to worry about, complete the render\n // instantly.\n if (!_.keys(root.views).length) {\n return resolve();\n }\n\n // Create a list of promises to wait on until rendering is done.\n // Since this method will run on all children as well, its sufficient\n // for a full hierarchical. \n var promises = _.map(root.views, function(view) {\n var insert = _.isArray(view);\n\n // If items are being inserted, they will be in a non-zero length\n // Array.\n if (insert && view.length) {\n // Schedule each view to be rendered in order and return a promise\n // representing the result of the final rendering.\n return _.reduce(view.slice(1), function(prevRender, view) {\n return prevRender.then(function() {\n return view.render();\n });\n // The first view should be rendered immediately, and the resulting\n // promise used to initialize the reduction.\n }, view[0].render());\n }\n\n // Only return the fetch deferred, resolve the main deferred after\n // the element has been attached to it's parent.\n return !insert ? view.render() : view;\n });\n\n // Once all nested Views have been rendered, resolve this View's\n // deferred.\n options.when(promises).done(function() {\n resolve();\n });\n });\n }", "createRenderRoot() {\n return this;\n }", "function actuallyRender() {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * The `_viewRender` method is broken out to abstract away from having\n\t\t\t\t\t * too much code in `actuallyRender`.\n\t\t\t\t\t */\n\t\t\t\t\troot._render().done(function () {\n\t\t\t\t\t\tvar promises;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * If there are no children to worry about, complete the render\n\t\t\t\t\t\t * instantly.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (!_.keys(root.views).length) {\n\t\t\t\t\t\t\treturn resolve();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Create a list of promises to wait on until rendering is done.\n\t\t\t\t\t\t * Since this method will run on all children as well, its sufficient\n\t\t\t\t\t\t * for a full hierarchical.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpromises = _.map(root.views, function (view) {\n\t\t\t\t\t\t\tvar insert = _.isArray(view);\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * If items are being inserted, they will be in a non-zero length\n\t\t\t\t\t\t\t * Array.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (insert && view.length) {\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Mark each subview's manager so they don't attempt to attach by\n\t\t\t\t\t\t\t\t * themselves. Return a single promise representing the entire\n\t\t\t\t\t\t\t\t * render.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\treturn root.when(_.map(view, function (subView) {\n\t\t\t\t\t\t\t\t\tsubView.__manager__.insertedViaFragment = true;\n\t\t\t\t\t\t\t\t\treturn subView.render().__manager__.renderDeferred;\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Only return the fetch deferred, resolve the main deferred after\n\t\t\t\t\t\t\t * the element has been attached to it's parent.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\treturn !insert ? view.render().__manager__.renderDeferred : view;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Once all nested Views have been rendered, resolve this View's\n\t\t\t\t\t\t * deferred.\n\t\t\t\t\t\t */\n\t\t\t\t\t\troot.when(promises).done(resolve);\n\t\t\t\t\t});\n\t\t\t\t}", "function render()\n {\n if (me.triggerEvent('renderBefore', data) === false)\n return;\n\n // remove all child nodes\n container.html('');\n\n // render child nodes\n for (var i=0; i < data.length; i++) {\n data[i].level = 0;\n render_node(data[i], container);\n }\n\n me.triggerEvent('renderAfter', container);\n }", "function actuallyRender() {\n var options = root._options();\n var manager = root.__manager__;\n var parent = manager.parent;\n var rentManager = parent && parent.__manager__;\n\n // The `_viewRender` method is broken out to abstract away from having\n // too much code in `processRender`.\n root._render(LayoutManager._viewRender, options).done(function() {\n // If there are no children to worry about, complete the render\n // instantly.\n if (!_.keys(root.views).length) {\n return resolve();\n }\n\n // Create a list of promises to wait on until rendering is done.\n // Since this method will run on all children as well, its sufficient\n // for a full hierarchical. \n var promises = _.map(root.views, function(view) {\n var append = _.isArray(view);\n\n // If items are being inserted, they will be in a non-zero length\n // Array.\n if (append && view.length) {\n // Only need to wait for the first View to complete, the rest\n // will be synchronous, by virtue of having the template cached.\n return view[0].render().pipe(function() {\n // Map over all the View's to be inserted and call render on\n // them all. Once they have all resolved, resolve the other\n // deferred.\n return options.when(_.map(view.slice(1), function(insertView) {\n return insertView.render();\n }));\n });\n }\n\n // Only return the fetch deferred, resolve the main deferred after\n // the element has been attached to it's parent.\n return !append ? view.render() : view;\n });\n\n // Once all nested Views have been rendered, resolve this View's\n // deferred.\n options.when(promises).done(function() {\n resolve();\n });\n });\n }", "onRender()/*: void*/ {\n this.render();\n }", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function renderTopLevel()\n{\n $(\"#wrapper\").prepend(templates['header']());\n $('#center_wrap').append(templates['files']());\n $('#center_wrap').append(templates['panes']());\n console.log('-- rendered top level UI html --');\n}", "function actuallyRender() {\n\n // The `_viewRender` method is broken out to abstract away from having\n // too much code in `actuallyRender`.\n root._render().done(function() {\n // If there are no children to worry about, complete the render\n // instantly.\n if (!_.keys(root.views).length) {\n return resolve();\n }\n\n // Create a list of promises to wait on until rendering is done.\n // Since this method will run on all children as well, its sufficient\n // for a full hierarchical.\n var promises = _.map(root.views, function(view) {\n var insert = _.isArray(view);\n\n // If items are being inserted, they will be in a non-zero length\n // Array.\n if (insert && view.length) {\n // Mark each subview's manager so they don't attempt to attach by\n // themselves. Return a single promise representing the entire\n // render.\n return root.when(_.map(view, function(subView) {\n subView.__manager__.insertedViaFragment = true;\n return subView.render().__manager__.renderDeferred;\n }));\n }\n\n // Only return the fetch deferred, resolve the main deferred after\n // the element has been attached to it's parent.\n return !insert ? view.render().__manager__.renderDeferred : view;\n });\n\n // Once all nested Views have been rendered, resolve this View's\n // deferred.\n root.when(promises).done(resolve);\n });\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "function render() {\n\t\t\t}", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n\n\t\t\t}", "function main() {\n\t\t\ttry{\n\t\t\t\trender();\n\t\t\t} catch(e) {\n\t\t\t\tconsole.log(e);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(rendering == true) {\n\t\t\t\traf(main.bind(this));\n\t\t\t}\n\t\t}", "_renderScreen() {\n\t\tif (this._el && this._component) {\n\t\t\tthis._component.render(this._el);\n\t\t}\n\t}", "render() {\n if (this.renderer) {\n this.renderer.call(this.owner, this.content, this.owner, this.model);\n }\n }", "render() {\n //using template function to render component\n const html = this.getTemplate().call(this, (this.getData())).trim();\n // generate virtual dom tree\n const tree = tvdom.parse(html);\n const lastRender = this._lastRender;\n // update component\n if (lastRender) {\n // diff two trees: last and current\n const patches = tvdom.diff(lastRender.tree, tree);\n if (!this._isEmptyObject(patches)) {\n // patch last dom tree\n tvdom.patch(lastRender.root, patches);\n // save changes\n lastRender.html = html;\n lastRender.tree = tree;\n }\n } else {\n // first time render dom tree\n const root = tree.render();\n this._$mountPoint.empty().html(root);\n // save render states\n this._lastRender = { mountPoint: this.getMountPoint(), html, tree, root}\n }\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "render() {\n if (!this.initialized) this.init();\n }", "function performSyncWorkOnRoot(root) {\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n flushPassiveEffects();\n var lanes;\n var exitStatus;\n if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {\n // There's a partial tree, and at least one of its lanes has expired. Finish\n // rendering it before rendering the rest of the expired work.\n lanes = workInProgressRootRenderLanes;\n exitStatus = renderRootSync(root, lanes);\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n // \n // Note that this only happens when part of the tree is rendered\n // concurrently. If the whole tree is rendered synchronously, then there\n // are no interleaved events.\n lanes = getNextLanes(root, lanes);\n exitStatus = renderRootSync(root, lanes);\n }\n } else {\n lanes = getNextLanes(root, NoLanes);\n exitStatus = renderRootSync(root, lanes);\n }\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n executionContext |= RetryAfterError;\n // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n }\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n lanes = getLanesToRetrySynchronouslyOnError(root);\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root);\n // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n ensureRootIsScheduled(root, now());\n return null;\n }", "render(container) {\n this.renderer.render(container);\n }", "render() { this.screen.render() }", "render() {\n\t\tif (!this.component_.element) {\n\t\t\tthis.component_.element = document.createElement('div');\n\t\t}\n\t\tthis.emit('rendered', !this.isRendered_);\n\t}", "function init() { render(this); }", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "render() {\n const { rootNode, sizeSet } = this;\n let visualIndex = this.visualIndex;\n\n if (this.isSharedViewSet() && sizeSet.isPlaceOn(WORKING_SPACE_BOTTOM)) {\n visualIndex += sizeSet.sharedSize.nextSize;\n }\n\n let node = rootNode.childNodes[visualIndex];\n\n if (node.tagName !== this.childNodeType) {\n const newNode = this.nodesPool();\n\n rootNode.replaceChild(newNode, node);\n node = newNode;\n }\n\n this.collectedNodes.push(node);\n this.visualIndex += 1;\n }", "render() {\n return this.renderChildren() || null;\n }", "function createRootComponentView(rNode,def,rootView,rendererFactory,renderer,sanitizer){resetComponentState();var tView=rootView[TVIEW];var componentView=createLView(rootView,getOrCreateTView(def.template,def.consts,def.vars,def.directiveDefs,def.pipeDefs,def.viewQuery),null,def.onPush?8/* Dirty */:4/* CheckAlways */,rendererFactory,renderer,sanitizer);var tNode=createNodeAtIndex(0,3/* Element */,rNode,null,null);if(tView.firstTemplatePass){diPublicInInjector(getOrCreateNodeInjectorForNode(tNode,rootView),rootView,def.type);tNode.flags=1/* isComponent */;initNodeFlags(tNode,rootView.length,1);queueComponentIndexForCheck(tNode);}// Store component view at node index, with node as the HOST\ncomponentView[HOST]=rootView[HEADER_OFFSET];componentView[HOST_NODE]=tNode;return rootView[HEADER_OFFSET]=componentView;}", "function render() {\n\t}", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function render() {\n\t\t\n\t}", "function fixRender()\n {\n cls.add(d.documentElement, 'v-fix-render');\n\n if (fixtimeout) clearTimeout(fixtimeout);\n\n fixtimeout = setTimeout(function () {\n cls.remove(d.documentElement, 'v-fix-render');\n }, 500);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "render() {\n // Subclasses should override\n }", "render(){if(this.renderer){this.renderer.call(this.owner,this.content,this.owner,this.model)}}", "function render() {\n\t// actually display the scene in the Dom element\n\trenderer.render( scene, camera );\n}", "sysRender() {\n \n let rendered = this.render();\n \n // If render() returns a String, then insert that as innerHTML in the\n // Part View node. Otherwise, do something else (TODO)\n \n if (typeof rendered === 'string') {\n this.domNode.innerHTML = rendered;\n } else if (false) { // TODO: test for jQuery return, DOM Node object, etc.\n // WHAT? \n }\n }", "render() {\n if (!this.initialized) {\n this.init();\n }\n }", "onBeforeRendering() {}", "render() {\n console.debug(`Rendering DOM of ${this.constructor.name}`);\n this.shadowRoot.innerHTML = this.html;\n if (this.script != null) {\n console.debug(`Running script of ${this.constructor.name}`);\n this.script();\n console.debug(`Finished running script of ${this.constructor.name}`);\n }\n console.debug(`Finished rendering DOM of ${this.constructor.name}`);\n }", "function lateRender() {\n\t\tsetTimeout(function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\trenderView();\n\t\t\t}\n\t\t},0);\n\t}", "function lateRender() {\n\t\tsetTimeout(function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\trenderView();\n\t\t\t}\n\t\t},0);\n\t}", "function lateRender() {\n\t\tsetTimeout(function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\trenderView();\n\t\t\t}\n\t\t},0);\n\t}", "function lateRender() {\n\t\tsetTimeout(function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\trenderView();\n\t\t\t}\n\t\t},0);\n\t}", "function lateRender() {\n\t\tsetTimeout(function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\trenderView();\n\t\t\t}\n\t\t},0);\n\t}", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "render() {\n\t\tthis.patch();\n\t}", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "static rendered () {}", "static rendered () {}", "renderIncDom() {\n\t\tif (this.component_.render) {\n\t\t\tthis.component_.render();\n\t\t} else {\n\t\t\tIncrementalDOM.elementVoid('div');\n\t\t}\n\t}", "postRendering() {\n this.ctx.restore();\n }", "build() {\n const componentsRenderer =\n this.namespace().ComponentRenderer.new({ rootComponent: this })\n\n this.renderWith(componentsRenderer)\n }", "function render(element, launchInfo) {\n const container = createElement('ROOT');\n const node = ElectronRenderer.createContainer(container);\n\n // This is a hack to be able to test whether App passes this to `onReady`\n container.launchInfo = launchInfo;\n\n ElectronRenderer.updateContainer(element, node, null);\n\n return container;\n}", "render () {\n let data = this.getData();\n this._tree = this._createTree(data);\n this._toolTip = this._createToolTip();\n this._updateTree(this.getRoot());\n }", "render() {\n\t\trenderer.render(scene, camera);\n\t}", "render() {\n\t\trenderer.render(scene, camera);\n\t}", "onAfterRendering() {}", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "displayScene() {\n // entry point for graph rendering\n //TODO: Render loop starting at root of graph\n //console.log(this.nodes)\n this.components[this.idRoot].display();\n }", "afterRender() { }", "afterRender() { }", "init() {\n this.render();\n }", "init() {\n this.render();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "render() {\n\n\t}", "render() {\n\n\t}", "function resolve() {\n\n // Insert all subViews into the parent at once.\n _.each(root.views, function(views, selector) {\n // Fragments aren't used on arrays of subviews.\n if (_.isArray(views)) {\n root.htmlBatch(root, views, selector);\n }\n });\n\n // If there is a parent and we weren't attached to it via the previous\n // method (single view), attach.\n if (parent && !manager.insertedViaFragment) {\n if (!root.contains(parent.el, root.el)) {\n // Apply the partial using parent's html() method.\n parent.partial(parent.$el, root.$el, rentManager, manager);\n }\n }\n\n // Ensure events are always correctly bound after rendering.\n root.delegateEvents();\n\n // Set this View as successfully rendered.\n root.hasRendered = true;\n manager.renderInProgress = false;\n\n // Clear triggeredByRAF flag.\n delete manager.triggeredByRAF;\n\n // Only process the queue if it exists.\n if (manager.queue && manager.queue.length) {\n // Ensure that the next render is only called after all other\n // `done` handlers have completed. This will prevent `render`\n // callbacks from firing out of order.\n (manager.queue.shift())();\n } else {\n // Once the queue is depleted, remove it, the render process has\n // completed.\n delete manager.queue;\n }\n\n // Reusable function for triggering the afterRender callback and event.\n function completeRender() {\n var console = window.console;\n var afterRender = root.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n\n // If there are multiple top level elements and `el: false` is used,\n // display a warning message and a stack trace.\n if (manager.noel && root.$el.length > 1) {\n // Do not display a warning while testing or if warning suppression\n // is enabled.\n if (_.isFunction(console.warn) && !root.suppressWarnings) {\n console.warn(\"`el: false` with multiple top level elements is \" +\n \"not supported.\");\n\n // Provide a stack trace if available to aid with debugging.\n if (_.isFunction(console.trace)) {\n console.trace();\n }\n }\n }\n }\n\n // If the parent is currently rendering, wait until it has completed\n // until calling the nested View's `afterRender`.\n if (rentManager && (rentManager.renderInProgress || rentManager.queue)) {\n // Wait until the parent View has finished rendering, which could be\n // asynchronous, and trigger afterRender on this View once it has\n // completed.\n parent.once(\"afterRender\", completeRender);\n } else {\n // This View and its parent have both rendered.\n completeRender();\n }\n\n return def.resolveWith(root, [root]);\n }", "_render() {}", "render() {\n this.el.innerHTML = this.template();\n\n setTimeout(() => {\n this.bindUIElements();\n }, 0);\n }", "render() {\n // background box.\n this.renderBackground();\n this.renderName();\n this.renderTimeLine();\n this.renderWave();\n }", "function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {\n resetComponentState();\n var tView = rootView[TVIEW];\n var componentView = createLView(rootView, getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 8 /* Dirty */ : 4 /* CheckAlways */, rendererFactory, renderer, sanitizer);\n var tNode = createNodeAtIndex(0, 3 /* Element */, rNode, null, null);\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = 1 /* isComponent */;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n // Store component view at node index, with node as the HOST\n componentView[HOST] = rootView[HEADER_OFFSET];\n componentView[HOST_NODE] = tNode;\n return rootView[HEADER_OFFSET] = componentView;\n}", "function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {\n resetComponentState();\n var tView = rootView[TVIEW];\n var componentView = createLView(rootView, getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 8 /* Dirty */ : 4 /* CheckAlways */, rendererFactory, renderer, sanitizer);\n var tNode = createNodeAtIndex(0, 3 /* Element */, rNode, null, null);\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = 1 /* isComponent */;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n // Store component view at node index, with node as the HOST\n componentView[HOST] = rootView[HEADER_OFFSET];\n componentView[HOST_NODE] = tNode;\n return rootView[HEADER_OFFSET] = componentView;\n}", "render() {\n this.shadowRoot.innerHTML = this.template;\n }", "renderMain()\n {\n if (this.state.registering)\n {\n return this.renderRegistration();\n }\n else if(!this.state.loggedin)\n {\n return this.renderLogIn();\n }\n else\n {\n return this.renderBrowser();\n }\n }", "function render() {\n \trequestAnimationFrame( render );\n control.update(0.5);\n \trenderer.render( scene, camera );\n }", "function render() {\n \trequestAnimationFrame( render );\n control.update(0.5);\n \trenderer.render( scene, camera );\n }", "draw(modelView) {\n if (this.root != null && this.renderer != null) {\n this.renderer.draw(this.root, modelView);\n }\n }", "render() { return super.render(); }", "function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {\n resetComponentState();\n var tView = rootView[TVIEW];\n ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);\n rootView[0 + HEADER_OFFSET] = rNode;\n var tNode = getOrCreateTNode(tView, null, 0, 3 /* Element */, null, null);\n var componentView = createLView(rootView, getOrCreateTView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = 1 /* isComponent */;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n // Store component view at node index, with node as the HOST\n return rootView[HEADER_OFFSET] = componentView;\n}", "function render() {\n if (frameBuffers.length > 0) {\n drawScene(gl, programInfo);\n }\n requestAnimationFrame(render);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "Render(){\n throw new Error(\"Render() method must be implemented in child!\");\n }", "initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }" ]
[ "0.7567403", "0.734714", "0.7108107", "0.7062153", "0.6986511", "0.69759756", "0.6908444", "0.6891713", "0.6869012", "0.6835855", "0.67799586", "0.6750756", "0.67459285", "0.6744858", "0.66837424", "0.6667817", "0.6663176", "0.66528493", "0.6623243", "0.6623243", "0.6623243", "0.6576639", "0.6535243", "0.6526674", "0.6495577", "0.6489391", "0.64877415", "0.6461924", "0.64528364", "0.6450774", "0.644311", "0.64226794", "0.64129454", "0.6403083", "0.6375176", "0.6363976", "0.63609374", "0.63590574", "0.6345103", "0.63057655", "0.6304263", "0.62916803", "0.62916803", "0.6288342", "0.62837654", "0.62760305", "0.62760305", "0.6269533", "0.62620825", "0.6251945", "0.6224105", "0.62147653", "0.6209522", "0.62084746", "0.62027735", "0.62027735", "0.62027735", "0.62027735", "0.62027735", "0.6193713", "0.61882496", "0.6187329", "0.61836016", "0.61836016", "0.6181917", "0.6181917", "0.61765176", "0.6175386", "0.6172019", "0.61513126", "0.6144299", "0.6133194", "0.6133194", "0.6132356", "0.6130589", "0.6126715", "0.61228716", "0.61228716", "0.6119139", "0.6119139", "0.6118671", "0.61077154", "0.61077154", "0.6106204", "0.61047304", "0.6096923", "0.6095073", "0.6089928", "0.6089928", "0.608835", "0.6077871", "0.60747325", "0.60747325", "0.6072696", "0.6070982", "0.60695255", "0.6063285", "0.6056833", "0.60554343", "0.604174", "0.60348403" ]
0.0
-1
Don't add it. See `./inlinetyped.js` for an explanation.
function createPortal$1(children,containerInfo,// TODO: figure out the API for cross-renderer implementation. implementation){var key=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;return{// This tag allow us to uniquely identify this as a React Portal $$typeof:REACT_PORTAL_TYPE,key:key==null?null:''+key,children:children,containerInfo:containerInfo,implementation:implementation};}// TODO: this is special because it gets imported during build.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ignore() { }", "function notInlineUseCase() { console.log('Not an inline use case');}", "function IGNORE() {\r\n //Do not delete.\r\n }", "get Ignore() {}", "function skipHello(){saidHello=true;}", "function reserved(){}", "function Noop() {}", "function Noop() {}", "function Noop() {}", "function noOP() {\n }", "function noOP() {\n }", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "hacky(){\n return\n }", "function nonewFun() {}", "function nope() {}", "function nope() {}", "function doNothing() { }", "function nop() {\n // What's the deal with airline food?\n}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "no_op() {}", "function noop(){\n\t// Left intentionally blank. \n}", "function Noop(data) {\r\n\r\n}", "function acabarPreInversion (){\n \n realizandoInversion = false \n}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}", "set Ignore(value) {}", "function _hidden() {}", "function ignore() {\n return null\n}", "function ignore() {\n return null;\n}", "function doNothing() {\n }", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop(){}", "inorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function inside() {\n return false;\n }", "function inside() {\n return false;\n }", "function inside() {\n return false;\n }", "function inside() {\n return false;\n }", "function inside() {\n return false;\n }", "function inside() {\n return false;\n }", "function inception() {\n \tinception();\n }", "function ignore() {\n return null\n }", "function nope() {\n\n}", "function getYepnope () {\n var y = yepnope;\n y['loader'] = {\n \"load\": load,\n \"i\" : 0\n };\n return y;\n }", "function getYepnope () {\n var y = yepnope;\n y['loader'] = {\n \"load\": load,\n \"i\" : 0\n };\n return y;\n }", "function noop () { }", "function noop () { }", "function noop () { }", "function noop () { }", "function init() {\n //no-op\n}", "function init() {\n //no-op\n}", "function SkipSelfDecorator() {}", "function SkipSelfDecorator() {}", "function SkipSelfDecorator() {}", "function skipHello() {\n saidHello = true;\n}", "function noOp() {\n return;\n}", "function nop() {}", "function nop() {}", "function nop() {}", "function skipHello() {\n saidHello = true;\n}", "function skipHello() {\n saidHello = true;\n}", "function skipHello() {\n saidHello = true;\n}", "function skipHello() {\n saidHello = true;\n}", "function skipHello() {\n saidHello = true;\n}", "function doNothing() { /* empty */ }", "preset () { return false }", "function no_op () {}", "function noop() { } // tslint:disable-line:no-empty", "function noop(){\r\n\r\n }", "function Dummy() {}", "function Dummy() {}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}" ]
[ "0.68530124", "0.62983644", "0.61769766", "0.6062427", "0.60414135", "0.5965747", "0.59498113", "0.59498113", "0.59498113", "0.59405136", "0.59405136", "0.5831074", "0.5831074", "0.5831074", "0.5831074", "0.5831074", "0.5831074", "0.5831074", "0.580174", "0.579486", "0.57814693", "0.57814693", "0.5763879", "0.57563245", "0.57562125", "0.57562125", "0.57562125", "0.573624", "0.5723673", "0.5690332", "0.568695", "0.56852955", "0.56852955", "0.56852955", "0.56852955", "0.56852955", "0.5680543", "0.5678251", "0.56697804", "0.5667185", "0.56661487", "0.56412536", "0.56412536", "0.56412536", "0.5621865", "0.5621865", "0.5621865", "0.5621865", "0.5621865", "0.5621865", "0.5621865", "0.55894554", "0.5567686", "0.5555717", "0.5555717", "0.5555717", "0.5555717", "0.5555717", "0.5555717", "0.55539787", "0.55429643", "0.5542452", "0.55369717", "0.55369717", "0.553614", "0.553614", "0.553614", "0.553614", "0.55246043", "0.55246043", "0.5523508", "0.5523508", "0.5523508", "0.55222106", "0.55177313", "0.54945", "0.54945", "0.54945", "0.549355", "0.549355", "0.549355", "0.549355", "0.549355", "0.5483854", "0.5483604", "0.5475373", "0.54628927", "0.54611737", "0.5451965", "0.5451965", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906", "0.5447906" ]
0.0
-1
AsyncMode should be deprecated
function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAsync(){\n this.async = true;\n }", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint\nconsole['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "enableAsyncRequest() {\n this._asyncRequest = true;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, \"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\");\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\t\n\t console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn'](\n 'The ReactIs.isAsyncMode() alias has been deprecated, ' +\n 'and will be removed in React 17+. Update your code to use ' +\n 'ReactIs.isConcurrentMode() instead. It has the exact same API.',\n );\n }\n }\n\n return (\n isConcurrentMode(object) ||\n typeOf(object) === REACT_ASYNC_MODE_TYPE\n );\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, \"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\");\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n\t console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}" ]
[ "0.71772456", "0.71477026", "0.71477026", "0.71477026", "0.707457", "0.6901749", "0.6824169", "0.6809441", "0.6809441", "0.6793582", "0.6785743", "0.67846984", "0.6757779", "0.6750946", "0.6745032", "0.6745032", "0.67303115", "0.6702358", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195" ]
0.67276573
22
connect is a facade over connectAdvanced. It turns its args into a compatible selectorFactory, which has the signature: (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps connect passes its args to connectAdvanced as options, which will in turn pass them to selectorFactory each time a Connect component instance is instantiated or hot reloaded. selectorFactory returns a final props selector from its mapStateToProps, mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, mergePropsFactories, and pure args. The resulting final props selector is called by the Connect component instance whenever it receives new props or store state.
function match(arg, factories, name) { for (var i = factories.length - 1; i >= 0; i--) { var result = factories[i](arg); if (result) return result; } return function (dispatch, options) { throw new Error("Invalid value of type " + (typeof arg === "undefined" ? "undefined" : _typeof(arg)) + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = connect_objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, connect_extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = connect__objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, connect__extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties$2(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends$4({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual$1 : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual$1 : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual$1 : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties$3(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends$6({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? connect_selectorFactory[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n\t var _ref = _temp === void 0 ? {} : _temp,\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === void 0 ? _connectAdvanced.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n\t if (_ref2 === void 0) {\n\t _ref2 = {};\n\t }\n\t\n\t var _ref3 = _ref2,\n\t _ref3$pure = _ref3.pure,\n\t pure = _ref3$pure === void 0 ? true : _ref3$pure,\n\t _ref3$areStatesEqual = _ref3.areStatesEqual,\n\t areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n\t _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _shallowEqual.default : _ref3$areOwnPropsEqua,\n\t _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n\t areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _shallowEqual.default : _ref3$areStatePropsEq,\n\t _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _shallowEqual.default : _ref3$areMergedPropsE,\n\t extraOptions = (0, _objectWithoutPropertiesLoose2.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t return connectHOC(selectorFactory, (0, _extends2.default)({\n\t // used in error messages\n\t methodName: 'connect',\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return \"Connect(\" + name + \")\";\n\t },\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t }, extraOptions));\n\t };\n\t}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areMergedPropsE,\n extraOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areMergedPropsE,\n extraOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = Object(objectWithoutPropertiesLoose[\"a\" /* default */])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(esm_extends[\"a\" /* default */])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}" ]
[ "0.7501837", "0.75000197", "0.74194384", "0.74194384", "0.74166214", "0.7413978", "0.7372918", "0.7372918", "0.7372918", "0.7372918", "0.7372918", "0.7372918", "0.7372918", "0.73706967", "0.73706967", "0.73706967", "0.73706967", "0.73284143", "0.73284143", "0.73284143", "0.73284143", "0.73284143", "0.7261164", "0.72567886", "0.72567886", "0.72567886", "0.72567886", "0.72567886", "0.72567886", "0.72567886", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7228521", "0.7190085", "0.71784633", "0.7155185", "0.7137354", "0.7137354", "0.7119413", "0.7119413", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574", "0.71025574" ]
0.0
-1
different options opens up some testing and extensibility scenarios
function createConnect(_temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$connectHOC = _ref.connectHOC, connectHOC = _ref$connectHOC === void 0 ? _connectAdvanced2.default : _ref$connectHOC, _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps2.default : _ref$mapStateToPropsF, _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps2.default : _ref$mapDispatchToPro, _ref$mergePropsFactor = _ref.mergePropsFactories, mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps2.default : _ref$mergePropsFactor, _ref$selectorFactory = _ref.selectorFactory, selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory2.default : _ref$selectorFactory; return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { if (_ref2 === void 0) { _ref2 = {}; } var _ref3 = _ref2, _ref3$pure = _ref3.pure, pure = _ref3$pure === void 0 ? true : _ref3$pure, _ref3$areStatesEqual = _ref3.areStatesEqual, areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _shallowEqual2.default : _ref3$areOwnPropsEqua, _ref3$areStatePropsEq = _ref3.areStatePropsEqual, areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _shallowEqual2.default : _ref3$areStatePropsEq, _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _shallowEqual2.default : _ref3$areMergedPropsE, extraOptions = (0, _objectWithoutPropertiesLoose3.default)(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); return connectHOC(selectorFactory, (0, _extends3.default)({ // used in error messages methodName: 'connect', // used to compute Connect's displayName from the wrapped component's displayName. getDisplayName: function getDisplayName(name) { return "Connect(" + name + ")"; }, // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes shouldHandleStateChanges: Boolean(mapStateToProps), // passed through to selectorFactory initMapStateToProps: initMapStateToProps, initMapDispatchToProps: initMapDispatchToProps, initMergeProps: initMergeProps, pure: pure, areStatesEqual: areStatesEqual, areOwnPropsEqual: areOwnPropsEqual, areStatePropsEqual: areStatePropsEqual, areMergedPropsEqual: areMergedPropsEqual }, extraOptions)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: true, t: testCssPrefix },\n\t\t\t'cssClasses': { r: true, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( !isSet(options[name]) && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: true, t: testCssPrefix },\n\t\t\t'cssClasses': { r: true, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( !isSet(options[name]) && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\t\n\t\t\t// To prove a fix for #537, freeze options here.\n\t\t\t// If the object is modified, an error will be thrown.\n\t\t\t// Object.freeze(options);\n\t\n\t\t\tvar parsed = {\n\t\t\t\tmargin: 0,\n\t\t\t\tlimit: 0,\n\t\t\t\tanimate: true,\n\t\t\t\tformat: defaultFormatter\n\t\t\t}, tests;\n\t\n\t\t\t// Tests are executed in the order they are presented here.\n\t\t\ttests = {\n\t\t\t\t'step': { r: false, t: testStep },\n\t\t\t\t'start': { r: true, t: testStart },\n\t\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t\t'range': { r: true, t: testRange },\n\t\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t\t'format': { r: false, t: testFormat },\n\t\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t\t'cssPrefix': { r: false, t: testCssPrefix }\n\t\t\t};\n\t\n\t\t\tvar defaults = {\n\t\t\t\t'connect': false,\n\t\t\t\t'direction': 'ltr',\n\t\t\t\t'behaviour': 'tap',\n\t\t\t\t'orientation': 'horizontal'\n\t\t\t};\n\t\n\t\t\t// Run all options through a testing mechanism to ensure correct\n\t\t\t// input. It should be noted that options might get modified to\n\t\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\t\tObject.keys(tests).forEach(function( name ){\n\t\n\t\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\t\n\t\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t\t}\n\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\n\t\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t\t});\n\t\n\t\t\t// Forward pips options\n\t\t\tparsed.pips = options.pips;\n\t\n\t\t\t// Pre-define the styles.\n\t\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\t\n\t\t\treturn parsed;\n\t\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function options(){\n\n \tswitch(userInput) {\n\n\t\tcase \"my-tweets\": \n\t\tmyTweets(); \n\t\tbreak;\n\n\t\tcase \"spotify-this-song\": \n\t\tspotifyThisSong(); \n\t\tbreak;\n\n\t\tcase \"movie-this\":\n\t\t movieThis(); \n\t\t break;\n\n\t\tcase \"do-what-it-says\": \n\t\tdoWhatItSays(); \n\t\tbreak;\n\t}\n}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\r\n\r\n\t\t\t// To prove a fix for #537, freeze options here.\r\n\t\t\t// If the object is modified, an error will be thrown.\r\n\t\t\t// Object.freeze(options);\r\n\r\n\t\t\tvar parsed = {\r\n\t\t\t\tmargin: 0,\r\n\t\t\t\tlimit: 0,\r\n\t\t\t\tanimate: true,\r\n\t\t\t\tanimationDuration: 300,\r\n\t\t\t\tformat: defaultFormatter\r\n\t\t\t}, tests;\r\n\r\n\t\t\t// Tests are executed in the order they are presented here.\r\n\t\t\ttests = {\r\n\t\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t\t'cssClasses': { r: false, t: testCssClasses }\r\n\t\t\t};\r\n\r\n\t\t\tvar defaults = {\r\n\t\t\t\t'connect': false,\r\n\t\t\t\t'direction': 'ltr',\r\n\t\t\t\t'behaviour': 'tap',\r\n\t\t\t\t'orientation': 'horizontal',\r\n\t\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t\t'cssClasses': {\r\n\t\t\t\t\ttarget: 'target',\r\n\t\t\t\t\tbase: 'base',\r\n\t\t\t\t\torigin: 'origin',\r\n\t\t\t\t\thandle: 'handle',\r\n\t\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\t\tvertical: 'vertical',\r\n\t\t\t\t\tbackground: 'background',\r\n\t\t\t\t\tconnect: 'connect',\r\n\t\t\t\t\tltr: 'ltr',\r\n\t\t\t\t\trtl: 'rtl',\r\n\t\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\t\ttap: 'state-tap',\r\n\t\t\t\t\tactive: 'active',\r\n\t\t\t\t\tstacking: 'stacking',\r\n\t\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\t\tpips: 'pips',\r\n\t\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\t\tmarker: 'marker',\r\n\t\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\t\tvalue: 'value',\r\n\t\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t\t// input. It should be noted that options might get modified to\r\n\t\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t\t});\r\n\r\n\t\t\t// Forward pips options\r\n\t\t\tparsed.pips = options.pips;\r\n\r\n\t\t\t// Pre-define the styles.\r\n\t\t\tparsed.style = parsed.ort ? 'top' : 'left';\r\n\r\n\t\t\treturn parsed;\r\n\t\t}", "function ExtraOptions() {}", "function ExtraOptions() {}", "function ExtraOptions(){}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\tstacking: 'stacking',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\tstacking: 'stacking',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\r\n\r\n\t\t// To prove a fix for #537, freeze options here.\r\n\t\t// If the object is modified, an error will be thrown.\r\n\t\t// Object.freeze(options);\r\n\r\n\t\tvar parsed = {\r\n\t\t\tmargin: 0,\r\n\t\t\tlimit: 0,\r\n\t\t\tanimate: true,\r\n\t\t\tanimationDuration: 300,\r\n\t\t\tformat: defaultFormatter\r\n\t\t}, tests;\r\n\r\n\t\t// Tests are executed in the order they are presented here.\r\n\t\ttests = {\r\n\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\r\n\t\t};\r\n\r\n\t\tvar defaults = {\r\n\t\t\t'connect': false,\r\n\t\t\t'direction': 'ltr',\r\n\t\t\t'behaviour': 'tap',\r\n\t\t\t'orientation': 'horizontal',\r\n\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t'cssClasses': {\r\n\t\t\t\ttarget: 'target',\r\n\t\t\t\tbase: 'base',\r\n\t\t\t\torigin: 'origin',\r\n\t\t\t\thandle: 'handle',\r\n\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\tvertical: 'vertical',\r\n\t\t\t\tbackground: 'background',\r\n\t\t\t\tconnect: 'connect',\r\n\t\t\t\tltr: 'ltr',\r\n\t\t\t\trtl: 'rtl',\r\n\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\ttap: 'state-tap',\r\n\t\t\t\tactive: 'active',\r\n\t\t\t\tstacking: 'stacking',\r\n\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\tpips: 'pips',\r\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\tmarker: 'marker',\r\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\tvalue: 'value',\r\n\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t// input. It should be noted that options might get modified to\r\n\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t});\r\n\r\n\t\t// Forward pips options\r\n\t\tparsed.pips = options.pips;\r\n\r\n\t\t// Pre-define the styles.\r\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\r\n\r\n\t\treturn parsed;\r\n\t}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: null,\n limit: null,\n padding: null,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter,\n };\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardMultiplier: { r: false, t: testKeyboardMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses },\n handleAttributes: { r: false, t: testHandleAttributes },\n };\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardMultiplier: 1,\n keyboardDefaultStep: 10,\n };\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return;\n }\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n // Pips don't move, so we can place them using left/top.\n var styles = [\n [\"left\", \"top\"],\n [\"right\", \"bottom\"],\n ];\n parsed.style = styles[parsed.dir][parsed.ort];\n return parsed;\n }", "function testOptions ( options ) {\r\n\r\n\t\t// To prove a fix for #537, freeze options here.\r\n\t\t// If the object is modified, an error will be thrown.\r\n\t\t// Object.freeze(options);\r\n\r\n\t\tvar parsed = {\r\n\t\t\tmargin: 0,\r\n\t\t\tlimit: 0,\r\n\t\t\tpadding: 0,\r\n\t\t\tanimate: true,\r\n\t\t\tanimationDuration: 300,\r\n\t\t\tformat: defaultFormatter\r\n\t\t};\r\n\r\n\t\t// Tests are executed in the order they are presented here.\r\n\t\tvar tests = {\r\n\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t'padding': { r: false, t: testPadding },\r\n\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\r\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\r\n\t\t};\r\n\r\n\t\tvar defaults = {\r\n\t\t\t'connect': false,\r\n\t\t\t'direction': 'ltr',\r\n\t\t\t'behaviour': 'tap',\r\n\t\t\t'orientation': 'horizontal',\r\n\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t'cssClasses': {\r\n\t\t\t\ttarget: 'target',\r\n\t\t\t\tbase: 'base',\r\n\t\t\t\torigin: 'origin',\r\n\t\t\t\thandle: 'handle',\r\n\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\tvertical: 'vertical',\r\n\t\t\t\tbackground: 'background',\r\n\t\t\t\tconnect: 'connect',\r\n\t\t\t\tltr: 'ltr',\r\n\t\t\t\trtl: 'rtl',\r\n\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\ttap: 'state-tap',\r\n\t\t\t\tactive: 'active',\r\n\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\tpips: 'pips',\r\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\tmarker: 'marker',\r\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\tvalue: 'value',\r\n\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t},\r\n\t\t\t'useRequestAnimationFrame': true\r\n\t\t};\r\n\r\n\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t// input. It should be noted that options might get modified to\r\n\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t});\r\n\r\n\t\t// Forward pips options\r\n\t\tparsed.pips = options.pips;\r\n\r\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\r\n\r\n\t\t// Pre-define the styles.\r\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\r\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\r\n\r\n\t\treturn parsed;\r\n\t}", "function managerOptions() {\n inquirer.prompt([\n {\n name: \"option\",\n message: \"Hello, random manager. What would you like to do today?\",\n type: \"list\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\"]\n }\n ]).then(function (answer) {\n\n //Use a switch case since we have multiple scenarios\n switch (answer.option) {\n\n case \"View Products for Sale\":\n viewProducts();\n break;\n\n case \"View Low Inventory\":\n lowInventory();\n break;\n\n case \"Add to Inventory\":\n addInventory();\n break;\n\n case \"Add New Product\":\n addNew();\n break;\n };\n });\n}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function options() {\n inquirer\n .prompt({\n name: \"departmentOfManagers\",\n type: \"list\",\n message: \"Which saleDepartment you are looking for ?\",\n choices: [\"Products of sale\", \"Low Inventory\", \"Add to Inventory\", \" Add New Product\"]\n })\n .then(function(answer) {\n // based on their answer of functions\n if (answer.options === \"Products of sale\") {\n viewSaleProduct();\n }\n else if(answer.options === \"Low Inventory\") {\n lowInventory();\n }\n else if(answer.options === \"Add to Inventory\") {\n addInventory();\n } \n else if(answer.options === \"Add New Product\") \n {\n addNewProduct();\n } else{\n connection.end();\n }\n });\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardDefaultStep: 10\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "get options() {}", "function testOptions(){\n\tif (mvOptions.selectLongueur === \"\" || mvOptions.selectDifficulte === \"\") {\n\n\t\tmvOptions.messageError= \"\";\n\n\t\tif (mvOptions.selectLongueur === \"\") {\n\t\t\t\tmvOptions.messageError += \"Veuillez sélectionner la longueur que vous désirez pour l'exercice \\n\";\n\t\t}\n\t\tif (mvOptions.selectDifficulte === \"\") {\n\t\t\tmvOptions.messageError += \"Veuillez sélectionner la difficulté de l'exercice\";\n\t\t}\n\t}\n\telse {\n\t\tverificationDisponibiliteImage(mvOptions.selectLongueur);\n\t}\n}", "function ExtraOptions() { }", "function ExtraOptions() { }", "function StepperOptions() {}", "function showUsage() {\n\tconsole.log(\"Usage: ./tests/testClient hostname port baseurl all|user|category|product|offer\");\n\treturn;\n}", "function options() {\n\tstorage.getf().then((props) => {\n\t\tjira.profile(props.url).then((profile) => {\n\t\t\tdirect.speak(S(MENU_OPTION_INITIAL).template({\n\t\t\t\tname: profile.displayName\n\t\t\t}).s);\n\n\t\t\tdefineOption1(props.url, props.project);\n\t\t\tdefineOption2(props.url, props.project);\n\t\t}, (error) => {\n\t\t\tcommands = {};\n\t\t\tdirect.speak(jira.errors(error));\n\t\t});\n\t});\n}", "function doSomething(opt, enable) {\r\n var defaults = { enable: false, count: 0, title: \"\", values: [1,2,3] };\r\n var options = mixIn({}, defaults, opt); //opzioni correnti con \r\n //ovverride in base all'opt passate\r\n //... logica della funzione che usa TUTTE le options\r\n console.dir(options.enable);\r\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: {\n target: \"target\",\n base: \"base\",\n origin: \"origin\",\n handle: \"handle\",\n handleLower: \"handle-lower\",\n handleUpper: \"handle-upper\",\n touchArea: \"touch-area\",\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n background: \"background\",\n connect: \"connect\",\n connects: \"connects\",\n ltr: \"ltr\",\n rtl: \"rtl\",\n draggable: \"draggable\",\n drag: \"state-drag\",\n tap: \"state-tap\",\n active: \"active\",\n tooltip: \"tooltip\",\n pips: \"pips\",\n pipsHorizontal: \"pips-horizontal\",\n pipsVertical: \"pips-vertical\",\n marker: \"marker\",\n markerHorizontal: \"marker-horizontal\",\n markerVertical: \"marker-vertical\",\n markerNormal: \"marker-normal\",\n markerLarge: \"marker-large\",\n markerSub: \"marker-sub\",\n value: \"value\",\n valueHorizontal: \"value-horizontal\",\n valueVertical: \"value-vertical\",\n valueNormal: \"value-normal\",\n valueLarge: \"value-large\",\n valueSub: \"value-sub\"\n }\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "function optionSwitch() {\r\n\t//Standard banner - no extra options; no featured targets available, so desired result mode can't be used\r\n\tif (bannerTypes[0].checked) {\r\n\t\tsimTypes[1].disabled = \"disabled\";\r\n\t\tsimTypes[0].checked = \"checked\";\r\n\t\t\r\n\t\tguarantee4StarToggle.disabled = \"disabled\";\r\n\t\tguarantee5StarToggle.disabled = \"disabled\";\r\n\t\t\r\n\t\trealNonFeat4StarOdds.disabled = \"disabled\";\r\n\t\t\r\n\t\tfor (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].disabled = \"disabled\";\r\n\t }\r\n\t\tfatePointInput.disabled = \"disabled\";\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t}\r\n\t//Event character banner - character to pursue, if desired result mode is on\r\n\telse if (bannerTypes[1].checked) {\r\n\t\tsimTypes[1].removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tguarantee4StarToggle.removeAttribute(\"disabled\");\r\n\t\tguarantee5StarToggle.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\trealNonFeat4StarOdds.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tif (simTypes[1].checked) {\r\n\t\t for (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (i=0; i< eventCharTargets.length; i++) {\r\n\t\t\t\teventCharTargets[i].disabled = \"disabled\";\r\n\t\t\t}\r\n\t\t}\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].disabled = \"disabled\";\r\n\t }\r\n\t\tfatePointInput.disabled = \"disabled\";\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t}\r\n\t//Event weapon banner - Epitomized Path; character to pursue, if desired result mode is on\r\n\telse {\r\n\t\tsimTypes[1].removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tguarantee4StarToggle.removeAttribute(\"disabled\");\r\n\t\tguarantee5StarToggle.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\trealNonFeat4StarOdds.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tfor (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\tfatePointInput.removeAttribute(\"disabled\");\r\n\t\tif (simTypes[1].checked) {\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t\t\teventWeapTargets[i].disabled = \"disabled\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function testOptions(options) {\n\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n 'step': {r: false, t: testStep},\n 'start': {r: true, t: testStart},\n 'connect': {r: true, t: testConnect},\n 'direction': {r: true, t: testDirection},\n 'snap': {r: false, t: testSnap},\n 'animate': {r: false, t: testAnimate},\n 'animationDuration': {r: false, t: testAnimationDuration},\n 'range': {r: true, t: testRange},\n 'orientation': {r: false, t: testOrientation},\n 'margin': {r: false, t: testMargin},\n 'limit': {r: false, t: testLimit},\n 'padding': {r: false, t: testPadding},\n 'behaviour': {r: true, t: testBehaviour},\n 'multitouch': {r: true, t: testMultitouch},\n 'ariaFormat': {r: false, t: testAriaFormat},\n 'format': {r: false, t: testFormat},\n 'tooltips': {r: false, t: testTooltips},\n 'cssPrefix': {r: false, t: testCssPrefix},\n 'cssClasses': {r: false, t: testCssClasses},\n 'useRequestAnimationFrame': {r: false, t: testUseRaf}\n };\n\n var defaults = {\n 'connect': false,\n 'direction': 'ltr',\n 'behaviour': 'tap',\n 'multitouch': false,\n 'orientation': 'horizontal',\n 'cssPrefix': 'noUi-',\n 'cssClasses': {\n target: 'target',\n base: 'base',\n origin: 'origin',\n handle: 'handle',\n handleLower: 'handle-lower',\n handleUpper: 'handle-upper',\n horizontal: 'horizontal',\n vertical: 'vertical',\n background: 'background',\n connect: 'connect',\n ltr: 'ltr',\n rtl: 'rtl',\n draggable: 'draggable',\n drag: 'state-drag',\n tap: 'state-tap',\n active: 'active',\n tooltip: 'tooltip',\n pips: 'pips',\n pipsHorizontal: 'pips-horizontal',\n pipsVertical: 'pips-vertical',\n marker: 'marker',\n markerHorizontal: 'marker-horizontal',\n markerVertical: 'marker-vertical',\n markerNormal: 'marker-normal',\n markerLarge: 'marker-large',\n markerSub: 'marker-sub',\n value: 'value',\n valueHorizontal: 'value-horizontal',\n valueVertical: 'value-vertical',\n valueNormal: 'value-normal',\n valueLarge: 'value-large',\n valueSub: 'value-sub'\n },\n 'useRequestAnimationFrame': true\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n\n // If the option isn't set, but it is required, throw an error.\n if (options[name] === undefined && defaults[name] === undefined) {\n\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, options[name] === undefined ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n var styles = [['left', 'top'], ['right', 'bottom']];\n\n // Pre-define the styles.\n parsed.style = styles[parsed.dir][parsed.ort];\n parsed.styleOposite = styles[parsed.dir ? 0 : 1][parsed.ort];\n\n return parsed;\n }", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "responsibilities() {\n return 'testing';\n }", "main() {\n if(this.options.createActions) {\n return this._private_actionPrompt()\n }\n\n return this.log('ERROR: Please select an option')\n }", "constructor(args, opts) {\n super(args, opts);\n\n console.log(args);\n // Cconsole.log(opts);\n /**\n * Set option skip welcome message\n */\n this.option('skip-welcome-msg', {\n desc: 'Skips the welcome message',\n type: Boolean\n });\n\n /**\n * Set option skip install message\n */\n this.option('skip-install-msg', {\n desc: 'Skips the message after the installation of dependencies',\n type: Boolean\n });\n\n /**\n * Set option use feature for jquery or bootstrap\n */\n this.option('use-feature', {\n desc: 'Includes bootstrap or jquery: bs-reset, bs-grid, bs-modules, jquery or none',\n type: String\n });\n\n /**\n * Set option use velocity\n */\n this.option('use-velocity', {\n desc: 'Includes velocity',\n type: Boolean\n });\n\n /**\n * Set option use vrt (visual regression testing)\n */\n this.option('use-vrt', {\n desc: 'Includes a tool for Visual Regression Testing',\n type: Boolean\n });\n }", "function test_switches(opt) {\n var test_types = ['symbols', 'strings', 'oddball', 'smi', 'heapnum'];\n\n function test(clause_type) {\n var values = clause_values[clause_type];\n\n test_types.forEach(function(test_type) {\n test_switch(clause_type, test_type, 'all', opt);\n test_switch(clause_type, test_type, 'none', opt);\n\n // Targeting specific clause feedback\n values.forEach(function(value) {\n test_switch(clause_type, test_type, [value], value, opt);\n test_switch(clause_type, test_type, value, value, opt);\n });\n });\n };\n\n test('string');\n test('smi');\n test('mixed');\n}", "function describeOptionTest (configurator, name, options) {\n describe('option: ' + name, function () {\n if (options.default) {\n it('default must be ' + options.default, function () {\n const config = configurator.load({})\n assert.strictEqual(config[name].toString(), options.default.toString())\n })\n }\n\n it('config: ' + name, function () {\n const configOptions = {}\n configOptions[name] = options.expected\n const config = configurator.load({ config: configOptions, argv: noArgs, env: noEnv })\n assert.strictEqual(config[name], options.expected)\n })\n\n it('env: ' + options.env, function () {\n const envOptions = {}\n envOptions[options.env] = options.expected\n const config = configurator.load({ env: envOptions })\n assert.strictEqual(config[name], options.expected)\n })\n\n if (options.short) {\n it('short arg: ' + options.short, function () {\n const config = configurator.load({ argv: ['', '', options.short, options.expected] })\n assert.strictEqual(config[name], options.expected)\n })\n }\n\n if (options.long) {\n it('long arg: ' + options.long, function () {\n const config = configurator.load({ argv: ['', '', options.long, options.expected] })\n assert.strictEqual(config[name], options.expected)\n })\n }\n })\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: 0,\n limit: 0,\n animate: true,\n format: defaultFormatter\n },\n tests;\n // Tests are executed in the order they are presented here.\n tests = {\n 'step': {\n r: false,\n t: testStep\n },\n 'start': {\n r: true,\n t: testStart\n },\n 'connect': {\n r: true,\n t: testConnect\n },\n 'direction': {\n r: true,\n t: testDirection\n },\n 'snap': {\n r: false,\n t: testSnap\n },\n 'animate': {\n r: false,\n t: testAnimate\n },\n 'range': {\n r: true,\n t: testRange\n },\n 'orientation': {\n r: false,\n t: testOrientation\n },\n 'margin': {\n r: false,\n t: testMargin\n },\n 'limit': {\n r: false,\n t: testLimit\n },\n 'behaviour': {\n r: true,\n t: testBehaviour\n },\n 'format': {\n r: false,\n t: testFormat\n },\n 'tooltips': {\n r: false,\n t: testTooltips\n },\n 'cssPrefix': {\n r: false,\n t: testCssPrefix\n }\n };\n var defaults = {\n 'connect': false,\n 'direction': 'ltr',\n 'behaviour': 'tap',\n 'orientation': 'horizontal'\n };\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (options[name] === undefined && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return true;\n }\n tests[name].t(parsed, options[name] === undefined ? defaults[\n name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // Pre-define the styles.\n parsed.style = parsed.ort ? 'top' : 'left';\n return parsed;\n }", "function userOptions() {\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"managerSelection\",\n message: \"What would you like to do?\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\", \"Exit\"]\n }\n ])\n .then(function (answer) {\n switch (answer.managerSelection) {\n case 'View Products for Sale':\n viewProducts();\n break;\n case 'View Low Inventory':\n viewLowInventory();\n break;\n case 'Add to Inventory':\n addToInventory();\n break;\n case 'Add New Product':\n addNewProduct();\n break;\n default:\n closeAndExit();\n }\n });\n}", "setTestOptions (callback) {\n\t\tthis.teamOptions.creatorIndex = 1;\n\t\tthis.userOptions.numRegistered = 3;\n\t\tthis.repoOptions.creatorIndex = 1;\n\t\tthis.repoOptions.numRepos = 2;\n\t\t/*\n\t\tthis.streamOptions.creatorIndex = 1;\n\t\tif (this.streamType === 'team stream') {\n\t\t\tObject.assign(this.streamOptions, {\n\t\t\t\ttype: 'channel',\n\t\t\t\tisTeamStream: true\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.streamOptions.type = this.streamType || 'channel';\n\t\t}\n\t\t*/\n\t\tObject.assign(this.postOptions, {\n\t\t\tcreatorIndex: 0,\n\t\t\twantReview: true,\n\t\t\tnumChanges: 2,\n\t\t\twantMarkers: 2\n\t\t});\n\t\tcallback();\n\t}", "function options() {\n\tconsole.clear();\n\t\n\tconsole.log('☮☮☮.⚠⚠⚠⚠⚠.⌘⌘⌘..⌘⌘⌘.⚠⚠⚠⚠⚠.☮☮☮\\n');\n\t\n\tconsole.log(' SUKUNASPAM OFICIAL v1.1'.help);\n\tconsole.log(' Powered by MP Server Inc.\\n'.help);\n\t\n\tconsole.log('☮☮☮.⚠⚠⚠⚠⚠.⌘⌘⌘..⌘⌘⌘.⚠⚠⚠⚠⚠.☮☮☮\\n');\n\t\n\tconsole.log('1 - Spam SMS [ Vivo ]'.yellow);\n\tconsole.log('2 - Spam SMS [ Claro ]'.yellow);\n\tconsole.log('3 - Spam SMS [ 99 Food ]'.yellow);\n\tconsole.log('4 - Spam SMS [ OFF ]'.yellow);\n\tconsole.log('5 - Spam SMS [ Uber Eats ]'.yellow);\n\tconsole.log('6 - Spam SMS [ OFF ]'.yellow);\n\tconsole.log('0 - Sair\\n'.yellow);\n\treturn readLine.question('Selecione uma opção: '.error);\n}", "function EnableTShirtDesignsAndColorsInteraction_ExceedingExpectations() {\n const $designSelect = $(\"#design\");\n const $colorSelect = $(\"#color\");\n const $colorSelectLabel = $(\"label[for='color']\");\n\n // Add a placeholder option\n const $placeholderOption = $('<option>Please select a T-shirt theme</option>');\n $colorSelect.prepend($placeholderOption);\n\n function MakeColorsVisibleByDesign(design) {\n let options = $colorSelect.children();\n\n /* Toggle visibility and select the first entry when selecting\n an option that is visible. */\n if (design === \"Select Theme\") { \n $colorSelect.hide(); \n $colorSelectLabel.hide();\n }\n\n for (let i = 0; i < options.length; i++ ) {\n let $option = $(options[i]);\n\n $option.toggle($option.data(\"belongstoshirt\") === design);\n }\n\n if (design !== \"Select Theme\") { \n $colorSelect.show(); \n $colorSelectLabel.show();\n $colorSelect.val($colorSelect.find(\"option:visible\")[0].value);\n }\n }\n\n // Connect & initialize interaction\n $designSelect.on(\"change\", () => { MakeColorsVisibleByDesign($designSelect.val()); });\n MakeColorsVisibleByDesign($designSelect.val());\n }", "function mainOptions() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\n \"View\",\n \"Add\",\n \"Delete\",\n \"Update\"\n ]\n })\n .then(function (answer) {\n switch (answer.action) {\n\n case \"View\":\n viewChoice();\n break;\n\n case \"Add\":\n addChoice();\n break;\n\n case \"Delete\":\n deleteChoice()\n break;\n\n case \"Update\":\n updateChoice()\n break;\n\n\n }\n });\n\n}", "function getOptions(provided)\n{\n var options = provided || {};\n\n if (!options.documentView)\n options.documentView = {};\n if (!options.documentView.closeLabel)\n options.documentView.closeLabel = \"Done\";\n\n\n if (!options.navigationView)\n options.navigationView = {};\n if (!options.navigationView.closeLabel)\n options.navigationView.closeLabel = \"Back\";\n\n\n if (!options.email)\n options.email = {};\n if (!options.email.enabled)\n options.email.enabled = false;\n\n\n if (!options.print)\n options.print = {};\n if (!options.print.enabled)\n options.print.enabled = false;\n\n\n if (!options.openWith)\n options.openWith = {};\n if (!options.openWith.enabled)\n options.openWith.enabled = false;\n\n\n if (!options.bookmarks)\n options.bookmarks = {};\n if (!options.bookmarks.enabled)\n options.bookmarks.enabled = false;\n\n\n if (!options.search)\n options.search = {};\n if (!options.search.enabled)\n options.search.enabled = false;\n\n\n if (!options.android)\n options.android = {};\n if (!options.android.viewerAppPackage)\n options.android.viewerAppPackage = 'de.sitewaerts.cleverdox.viewer';\n if (!options.android.viewerAppActivity)\n options.android.viewerAppActivity = 'DocumentViewerActivity';\n\n return options;\n}", "function executeHTests(){\n\t\n\tconsole.log(\"Hotel Tests:\");\n\ttestHSelectOption(1, 500);\n\ttestHSelectOption(2, 200);\n\ttestHSelectOption(3, 700);\n\ttestHSelectOption(4, 300);\n\ttestHSelectOption(5, 100);\n\ttestHSelectOption(6, 400);\n\ttestHSelectOption(7, 70);\n\ttestHSelectOption(8, 900);\n\ttestHSelectOption(9, 250);\n\ttestHSelectOption(10, 80);\n\tconsole.log(\"Should fail:\")\n\ttestHSelectOption(10, 800);\n\n\n}", "function Options() {\n\t\tchrome.runtime.sendMessage({\n\t\t\ttype: 'OPEN_OPTIONS'\n\t\t});\n\t}", "static Setup(options) {\n return Part_1.Part.Setup(options);\n }", "static Setup(options) {\n return Part_1.Part.Setup(options);\n }", "function offersTests({ apiGET, apiPOST }) {\n // maybe we don't need this in the API?\n it.todo(\"get offers for session\");\n // maybe we don't need this in the API?\n it.todo(\"get offers for position\");\n it.todo(\"get offer for assignment\");\n it.todo(\"accept/reject/withdraw offer\");\n it.todo(\"increment nag count\");\n it.todo(\"error when attempting to update a frozen field\");\n}", "function openOptionsPage() {\n browser.runtime.openOptionsPage().catch(err => reportError(err))\n }", "SetOption() {\n\n }", "function test_ChangeOption(scope) {\n selected_Test = scope.first_test;\n\tcurrent_test=selected_Test;\n\tscope.sample_disable=true;\n}", "function displayOptions() {\n\tinquirer.prompt([\n\t\t{\n\t\t\tname: \"options\",\n\t\t\ttype: \"list\",\n\t\t\tmessage: \"Welcome! What would you like to do today?\",\n\t\t\tchoices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\",\n\t\t\t\"Add New Product\"]\n\t\t}\n\t]).then(function(answers) {\n\t\tif (answers.options === \"View Products for Sale\") {\n\t\t\tviewProducts();\n\t\t}\n\t\telse if (answers.options === \"View Low Inventory\") {\n\t\t\tlowInventory();\n\t\t}\n\t\telse if (answers.options === \"Add to Inventory\") {\n\t\t\taddInventory();\n\t\t}\n\t\telse if (answers.options === \"Add New Product\") {\n\t\t\taddProduct();\n\t\t}\n\t});\n}", "function applyExtendedVersion() {\n\t\t//show avoid areas\n\t\t$('#avoidAreas').show();\n\t\t\n\t\t//show import/export features\n\t\t$('#exportImport').show();\n\t\t\n\t\t//show accessibility analysis\n\t\t$('#accessibilityAnalysis').show();\n\t}", "async function employeeOptions() {\n const { choice } = await inquirer.prompt([\n {\n type: \"list\",\n choices: [\"View all employees\",\n \"View employees by department\",\n \"View employees by manager\",\n \"Add a new employee\",\n \"Update employee\",\n \"Remove an employee\",\n \"Back\"\n ],\n message: \"What would you like to do?\",\n name: \"choice\"\n }\n ]);\n\n switch (choice) {\n case \"View all employees\":\n await employee.viewAllEmployees();\n break;\n case \"View employees by department\":\n await employee.viewEmployeesByDepartment();\n break;\n case \"View employees by manager\":\n await employee.viewEmployeesByManager();\n break;\n case \"Add a new employee\":\n await employee.addEmployee();\n break;\n case \"Update employee\":\n await employee.updateEmployee();\n break;\n case \"Remove an employee\":\n await employee.deleteEmployee();\n break;\n default:\n break;\n }\n askQuestions();\n}", "function managerOptions() {\n inquirer.prompt([\n {\n type: \"checkbox\",\n name: \"managerTask\",\n message: \"Hi manager. What would you like to do?\",\n choices: [\"View products for sale\", \"View low inventory\", \"Add to inventory\", \"Add New Product\"]\n }\n ]).then(function (manager) {\n var task = manager.managerTask;\n if (task == \"View products for sale\") {\n viewProducts();\n }\n else if (task == \"View low inventory\") {\n lowinventory();\n }\n else if (task == \"Add to inventory\") {\n addToInvetory();\n }\n else if (task == \"Add New Product\") {\n addProduct();\n }\n });\n}", "function openOptionsPage() {\n try {\n browser.runtime.openOptionsPage();\n }\n catch ( e ) {\n /**\n * @todo\n */\n }\n}", "function GetTestability(){}", "function options() {\n if (chrome.runtime.openOptionsPage) {\n chrome.runtime.openOptionsPage();\n } else {\n window.open(chrome.runtime.getURL('options.html'));\n }\n}", "function validateExtraFeatures(extraFeatures) { // 3 // 11\n if (extraFeatures) { // 4 // 12\n check(extraFeatures, { // 5 // 13\n // Modify options to enable ES2015 module syntax. // 6 // 14\n modules: Match.Optional(Boolean), // 7 // 15\n // Modify options to enable async/await syntax powered by Fibers. // 8 // 16\n meteorAsyncAwait: Match.Optional(Boolean), // 9 // 17\n // Modify options to enable React/JSX syntax. // 10\n react: Match.Optional(Boolean), // 11\n // Improve compatibility in older versions of Internet Explorer. // 12\n jscript: Match.Optional(Boolean) // 13\n }); // 14\n } // 15\n} // 16", "function setup()\n{\n\treturn {\n\t\t// Mandatory parameters\n\t\tdescription: \"Carte Novea\",\n\t\tproduct: \"010100AA\",\n\t\tconfig: \"config.js\",\n\t\ttests:[\n\t\t\t\t//test,//, test2, test3, test4\n\t\t\t\ttest_nested_module.my_tests\n\t\t\t],\n\t\t// Optional parameters\n\t\tadmin_pass: \"\", // leave empty == no admin mode, sinon \"caravane\"\n\t};\n}", "function testOptions ( options ) {\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat }\n\t\t};\n\n\t\t// Set defaults where applicable.\n\t\toptions = $.extend({\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal'\n\t\t}, options);\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\t$.each( tests, function( name, test ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined ) {\n\n\t\t\t\tif ( test.r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttest.t( parsed, options[name] );\n\t\t});\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function AdjustTestOptions() {\n this.hasContext = false;\n this.baseUrl = null;\n this.gdprUrl = null;\n this.subscriptionUrl = null;\n this.basePath = null;\n this.gdprPath = null;\n this.subscriptionPath = null;\n this.useTestConnectionOptions = null;\n this.timerIntervalInMilliseconds = null;\n this.timerStartInMilliseconds = null;\n this.sessionIntervalInMilliseconds = null;\n this.subsessionIntervalInMilliseconds = null;\n this.teardown = null;\n this.teardown = null;\n this.tryInstallReferrer = null;\n this.noBackoffWait = null;\n}", "function showOptions() {\n inquirer.prompt([{\n type: \"list\",\n name: \"menu\",\n message: \"Menu Options\",\n choices: [\n \"View Product Sales by Department\",\n \"Create New Department\",\n \"Exit\"\n ]\n }\n\n ]).then(function (option) {\n\n switch (option.menu) {\n case \"View Product Sales by Department\":\n viewProductSalesbyDepartment();\n break;\n case \"Create New Department\":\n createNewDepartment();\n break;\n default:\n connection.end();\n }\n });\n}", "function menuOptions() {\n\tinquirer.prompt([\n\t{\n\t\ttype: \"list\",\n\t\tmessage:\"\\nSelect a menu option from below\",\n\t\tchoices: [\"Make a new card\", \"Show existing cards\", \"Exit\"],\n\t\tname: \"menuChoices\"\n\t}\n\t\t]).then(function(useranswer){\n\n\t\t\tswitch (useranswer.menuChoices){\n\t\t\t\tcase 'Make a new card':\n\t\t\t\tconsole.log(\"Make a new flashcard\");\n\t\t\t\tBasicCard();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Show existing cards':\n\t\t\t\tconsole.log(\"This feature is not yet active\");\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Exit':\n\t\t\t\tconsole.log(\"Exit\");\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tconsole.log(\"\");\n\t\t\t\tconsole.log(\"Try Again\");\n\t\t\t\tconsole.log(\"\");\n\t\t\t} // close question selection\n\t\t});\n\t} // close function menuOptions", "setOptions() {\n let defaultObj = {numChar: 1, limitNum: 3, orderBlock: [\"suggest\",\"collection\",\"product\"]};\n if(!this.options)\n {\n this.options = defaultObj; // set default if user not put arg\n }\n else {\n for(let key in defaultObj) // \n {\n if(!this.options[key])\n {\n this.options[key] = defaultObj[key];\n }\n }\n }\n \n\n \n }", "function checkOpts() {\n for (var i = 0; i < $scope.opts.length; i++) {\n if ($scope.opts[i].toLowerCase() == $scope.ua) {\n $element.show();\n return false;\n }\n }\n }", "function testMain() {\n var mode = 'test';\n main(mode);\n}", "function getLocalOptions(config) {\n services: ['selenium-standalone']\n}", "function openOptions() {\n chromeRuntime.openOptionsPage();\n }", "function managerOptions() {\n inquirer.prompt({\n name: \"action\",\n type: \"list\",\n message: \"Please make a selection.\",\n choices: [\"View products for sale.\",\n \"View low inventory.\",\n \"Add to current inventory levels.\",\n \"Add new product.\",\n \"Exit the system.\"\n ]\n }).then(function(answer) {\n switch (answer.action) {\n case \"View products for sale.\":\n displayInventory();\n break;\n case \"View low inventory.\":\n lowInventory();\n break;\n case \"Add to current inventory levels.\":\n addInventory();\n break;\n case \"Add new product.\":\n addNewItem();\n break;\n case \"Exit the system.\":\n quitManager();\n break;\n }\n });\n}", "_optionalVRT() {\n let isVRT = false;\n if (this.props.useVRT || this.options['use-vrt']) {\n isVRT = true;\n // Config file for visual regression tests\n this.fs.copy(\n this.templatePath('test_visual-regression-tests_backstop_config.js'),\n this.destinationPath('test/visual-regression-tests/backstop_config.js')\n );\n // Config for viewports\n this.fs.copy(\n this.templatePath('test_visual-regression-tests_backstop_viewports.js'),\n this.destinationPath('test/visual-regression-tests/backstop_viewports.js')\n );\n\n // Add Tasts for VRT if this option is chosen\n this.fs.copyTpl(\n this.templatePath('felab_default_aliases.yaml'),\n this.destinationPath('felab/default/aliases.yaml'),\n {\n includeVRT: isVRT\n }\n );\n }\n }", "responsibilities() {\n return 'application development';\n }", "function main() {\n // Setup Applitools\n let eyes = setup();\n\n // Set viewports\n const viewportLandscape = { width: 1920, height: 1200 };\n const viewportPortrait = { width: 600, height: 800 };\n \n // Execute Chrome driver tests\n browserDriver(eyes, Capabilities.chrome(), viewportLandscape, viewportPortrait);\n \n // Execute FireFox driver tests\n browserDriver(eyes, Capabilities.firefox(), viewportLandscape, viewportPortrait);\n}", "function employeeOption() {\n inquirer.prompt(employeeOptionQuestions).then(response => {\n if (response.teamMember === 'Add an Engineer') {\n addEngineer();\n }\n else if (response.teamMember === 'Add an Intern') {\n addIntern();\n }\n else {\n generateHTML(team);\n }\n });\n }", "function run_selectedTests() {\r\n\tadd_UnSelectedTestsToShould_ignore();\r\n\tvar suite = framework.createTestSuite(framework.testcaseArray[\"suiteName\"]);\r\n\tfor (var tc in framework.testcaseArray) {\r\n\t\tsuite.add(framework.testcaseArray[tc]);\r\n\t}\r\n\tframework.runSuite(suite);\r\n\t//enable the four display button\r\n\tdocument.getElementById('btnXML').style.display = 'inline';\r\n\tdocument.getElementById('btnTAP').style.display = 'inline';\r\n\tdocument.getElementById('btnJUnitXML').style.display = 'inline';\r\n\tdocument.getElementById('btnJSON').style.display = 'inline';\r\n\tdocument.getElementById('btnSendReport').style.display = 'inline';\r\n}", "function jum_choose_tests(scopeobj) {\n if (jum.areTestsChosen()) {\n bu_alert(\"tests already chosen\");\n return;\n }\n\n if (arguments.length == 0 || !scopeobj) scopeobj = jum_global;\n\n var test_func_names;\n // see if user has supplied a set of desired test function names\n // a flat Array of test function names that may have alaready been provided (see testnames.pl)\n if (typeof jum.TEST_FUNCTION_NAMES !== 'undefined') {\n test_func_names = jum.TEST_FUNCTION_NAMES;\n // iterate over and ensure they are actually in the scopeobj\n var filtered = [];\n var removed = [];\n for(var i=0;i<test_func_names.length;++i) {\n var name = test_func_names[i];\n if (typeof scopeobj[name] == 'undefined') {removed.push(name)}\n else filtered.push(name);\n }\n if (removed.length > 0) bu_alert(\"removed \" + removed.length + \" non-existent test function names: \" + removed.join(','));\n test_func_names = filtered;\n }\n\n // if not, we have to do some reflection\n else {\n if (jum_are_global_functions_enumerable()) {\n test_func_names = jum_get_object_function_names(scopeobj);\n }\n else if (jum_are_scripts_parseable()) {\n test_func_names = jum_parse_window_scripts();\n }\n else {throw new Error(\"no way to determine test functions\");}\n\n // filter for ones whose names match the pattern\n //bu_alert(\"(jsunit_wrap.js) got \" + test_func_names.length + \" symbols before filtering for test functions\");\n test_func_names = jum_just_test_functions(test_func_names);\n }\n\n bu_alert(\"(jsunit_wrap.js) got \" + test_func_names.length + \" test function names\");\n\n // see if user has selected a desired group\n var groupname = jum.getChosenTestGroupName();\n if (groupname && groupname == '') groupname = null;\n\n if (groupname) {\n jum.info(\"(jsunit_wrap.js) running group \" + groupname);\n test_func_names = jum_function_names_in_group(test_func_names);\n }\n\n // append our special test at the end\n// test_func_names.push('jum_special_reportAsync');\n\n // convert to alltests\n var alltests = jum_new_alltests();\n jum_initialize_alltests(alltests, scopeobj, test_func_names);\n\n // append our special test at the end\n if (jum_has_settimeout()) {\n jum_add_test(alltests, 'special', 'reportAsync', 'jum_special_reportAsync', jum_special_reportAsync);\n }\n else {\n jum.info('no setTimeout, not checking async completion');\n bu_alert('(jsunit_wrap.js) no setTimeout, not checking async completion');\n }\n\n // set tests\n //bu_alert(\"(jsunit_wrap.js) setting tests\");\n jum.setTests(alltests);\n}", "constructor() {\n this._settings = {\n type: 'checkbox',\n title: 'hideSeedbox',\n scope: SettingGroup.Global,\n desc: 'Remove the \"Get A Seedbox\" menu item',\n };\n // An element that must exist in order for the feature to run\n this._tar = '#menu .sbDonCrypto';\n // Add 1+ valid page type. Exclude for global\n Util.startFeature(this._settings, this._tar, []).then((t) => {\n if (t) {\n this._init();\n }\n });\n }", "function options() {\n inquirer.prompt({\n type: 'list',\n name: 'menu',\n message: 'What would you like to do?',\n choices: [\n 'View All Departments',\n 'Add Department',\n 'View All Roles',\n 'Add Role',\n 'View All Employees',\n 'Add Employee',\n 'Update Employee Role',\n 'Delete Department',\n 'Delete Employee',\n 'Delete Role',\n 'Quit'\n ]\n\n })\n .then(function (answers) {\n console.log('view');\n switch (answers.menu) {\n case 'View All Departments':\n viewAllDepartments();\n break;\n case 'Add Department':\n addDepartment();\n break;\n case 'View All Roles':\n viewAllRoles();\n break;\n case 'Add Role':\n addRole();\n break;\n case 'View All Employees':\n viewAllEmployees();\n break;\n case 'Add Employee':\n addEmployee();\n break;\n case 'Update Employee Role':\n updateEmployeeRole();\n break;\n case 'Delete Department':\n deleteDepartment();\n break;\n case 'Delete Employee':\n deleteEmployee();\n break;\n case 'Delete Role':\n deleteRole();\n break;\n case 'Quit':\n quitApp();\n break;\n default:\n console.log(\"You chose wrong.\")\n }\n })\n\n}", "static Setup(options = {}) {\n return Part_1.Part.Setup(options);\n }", "function useHelps(index) {\n //Applying hint method\n $(\"#hint\").click(function(){\n index.useHint();\n $(this).hide(1000);\n });\n //Applying public method\n $(\"#public\").click(function(){\n index.usePubVote();\n $(this).hide(1000);\n });\n //Applying fifty method\n $(\"#fifty\").click(function(){\n index.useFifty();\n $(this).hide(1000);\n });\n }", "defineOptionEvent(e) {\n this.defineOption(e.detail);\n }", "function optionDefinitions(){\n const od = [\n {\n name: 'help',\n type: Boolean,\n alias: 'h'\n },\n {\n name: 'csvfile0',\n type: String\n /* The 0th file that will be converted.\n *\n *\n * The file slcsp.csv given in the slcsp.zip archive.\n * It will be converted to the sqlite3 file given by dbfile0\n */\n },\n {\n name: 'dbfile0',\n type: String\n /* The database file which was converted from csvfile0. */\n /* This is a sqlite3 db file currently. */\n },\n {\n name: 'dbtable0',\n type: String\n /* When a csv file is converted into a database file, the\n * data in the csv file needs to live in a certain table.\n * That table is given by dbtable0, for the database file\n * dbfile0, which was converted from csvfile0.\n */\n },\n {\n name: 'cwd0',\n type: String\n /*\n * The files csvfile0 and dbfile0 need to live in some\n * directory. That location is given by cwd0.\n */\n },\n {\n name: 'csvfile1',\n type: String\n /* The second csvfile (0 based) that will be converted to a db file, given by dbfile1.\n * In general, this is anticipated to be zips.csv\n * The relationship between csvfile1, dbfile1, dbtable1, cwd1\n * is much the same as elaborated upon for csvfile0.\n */\n },\n {\n name: 'dbfile1',\n type: String,\n defaultOption: true\n /* The result of converting csvfile1 to a db file. */\n },\n {\n name: 'dbtable1',\n type: String\n /* The name of the table into which the data from csvfile1 is stored.*/\n /* The table is not implied nor found in the csvfile. */\n /* dbtable1 does double duty as a specifier for the schema when attach database is done. */\n /* The immediate above is a possible @todo - have schema1 as an option.*/\n },\n {\n name:'cwd1',\n type: String\n /* The location of the files csvfile1 and dbfile1. */\n },\n {\n name:'csvfile2',\n type: String\n /* The third csvfile (0 based) that will be converted to a db file, given by dbfile2.\n * In general, this is anticipated to be plans.csv from the archive\n * slcsp.zip.\n */\n },\n {\n name:'dbfile2',\n type: String\n /* The result of converting csvfile2 to a dbfile. */\n },\n {\n name:'dbtable2',\n type: String\n /* The name of the table into which the data from csvfile2 is stored.*/\n /* The table is not implied nor found in the csvfile. */\n /* dbtable2 does double duty as a specifier for the schema when attach database is done. */\n /* The immediate above is a possible @todo - have schema2 as an option.*/\n },\n {\n name: 'cwd2',\n type: String\n /* The location of the files csvfile2 and dbfile2. */\n },\n {\n name: 'output',\n type: String\n /*\n * The name of the output database file.\n * @todo As it stands on 2020-12-26 11:51EST, the concept\n * of output is underspecified. Specifically the location\n * of that database file is needed. Providing a remedy\n * for this will insure all options are seen somewhat alike.\n */\n },\n {\n name: 'keepdbfiles',\n type: Boolean,\n /*\n * Indicates whether or not the sqlite3 database (db) files are kept\n * after execution. Since the requirements do not specify the production\n * of these artifacts, this is by default set to false.\n */\n // defaultValue: false\n }\n ];\n return od;\n}", "function GetTestability() {}", "function GetTestability() {}", "function GetTestability() {}", "constructor(name, tests, enabled = true) {\n this.name = name;\n this.tests = tests;\n this.enabled = enabled;\n }", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function toolsOptions(options, settings, settingsText, submit) {\n if (options || settings || settingsText) {\n options.addEventListener(\n 'click',\n function() {\n if (checked(options)) {\n enable(submit);\n showBlock(settings);\n } else {\n hide(settings);\n }\n },\n false\n );\n settingsText.addEventListener(\n 'input',\n function() {\n if (ifShowBlock(settings)) {\n enable(submit);\n }\n },\n false\n );\n }\n }", "function GetTestability() { }", "function GetTestability() { }", "function generateDisplayOptions(options) {\n\t\t//DEBUG\n\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").debug == true) {\n\t\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t\t<h2 class=\"headerList\">Debug</h2>\n\t\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\">\n\t\t\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t\t\t${iconHardware.monitorStroke}\n\t\t\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t\t\t<span>OS Theme</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"os\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\" style=\"text-transform: none\"></span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"default\" onclick=\"overrideOS('default')\">Default</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"ios\" onclick=\"overrideOS('ios')\">iOS</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"macos\" onclick=\"overrideOS('macos')\">macOS</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"android\" onclick=\"overrideOS('android')\">Android</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"windows\" onclick=\"overrideOS('windows')\">Windows</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (getPreferenceGroup(\"rebar.appSettings\").os) {\n\t\t\t\tcase 'default':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Default`);\n\t\t\t\t\t$(`[data-name=\"default\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ios':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`iOS`);\n\t\t\t\t\t$(`[data-name=\"ios\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'macos':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`macOS`);\n\t\t\t\t\t$(`[data-name=\"macos\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'android':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Android`);\n\t\t\t\t\t$(`[data-name=\"android\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'windows':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Windows`);\n\t\t\t\t\t$(`[data-name=\"windows\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\tif (options.themeOptions == true || options.accentOptions == true || options.contrastOptions == true || options.motionOptions == true) {\n\t\t\t//SET UP THE CONTAINER\n\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t<h2 class=\"headerList\">Visuals</h2>\n\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\" id=\"containerVisuals\"></section>\n\t\t\t\t</div>\n\t\t\t`);\n\t\t\t\n\t\t\t//THEMES\n\t\t\tif (options.themeOptions == true) {\n\t\t\t\t//SET UP THE CONTAINER\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.paintbrushStroke}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Theme</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"appearance\" data-position=\"right\" data-type=\"pickericons\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE THE TOKENS\n\t\t\t\t$.each( appThemes, function( key, val ) {\n\t\t\t\t\t$(`[data-setting=\"appearance\"] .contextContainerMenu`).append(`\n\t\t\t\t\t\t<button data-value=\"${key}\" data-label=\"${val.name}\" data-icongroup='${val.iconGroup}' data-iconname='${val.iconName}'>\n\t\t\t\t\t\t\t${val.name}\n\t\t\t\t\t\t\t${window[val.iconGroup][val.iconName]}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t`);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET THEME DROPDOWN\n\t\t\t\t$(`[data-setting=\"appearance\"] button[data-value='${getPreferenceGroup(\"rebar.appSettings\").appearance}']`).addClass(\"picked\");\n\t\t\t\t$(`[data-setting=\"appearance\"] .contextLabel`).append(window[appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].iconGroup][appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].iconName]);\n\t\t\t\t$(`[data-setting=\"appearance\"] .contextLabel`).append(appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].name);\n\t\t\t}\n\t\t\t\n\t\t\t//ACCENTS\n\t\t\tif (options.accentOptions == true) {\n\t\t\t\t//SET UP THE CONTAINER\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.swatchBookRight}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Accent</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"accent\" data-position=\"right\" data-type=\"popover\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\" style=\"text-transform: none\"><span class=\"colorChip\" data-accent=\"${getPreferenceGroup(\"rebar.appSettings\").accent}\"></span> ${appAccents[getPreferenceGroup(\"rebar.appSettings\").accent]}</span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t<div class=\"containerAccents itemList fixedIconSize\" id=\"pickerAccent\" data-max=\"1\" data-setting=\"accent\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE THE TOKENS\n\t\t\t\t$.each( appAccents, function( key, val ) {\n\t\t\t\t\t$(`#pickerAccent`).append(`\n\t\t\t\t\t\t<div class=\"accentChip selectionRing\" data-value=\"${key}\" data-accent=\"${key}\" title=\"${val}\"></div>\n\t\t\t\t\t`);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET THE PICKED TOKEN\n\t\t\t\t$(`#pickerAccent [data-value=\"${getPreferenceGroup(\"rebar.appSettings\").accent}\"]`).addClass(\"picked\");\n\t\t\t\t$(`#selectedAccent`).empty().append(appAccents[getPreferenceGroup(\"rebar.appSettings\").accent]);\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE INCREASED CONTRAST OPTIONS\n\t\t\tif (options.contrastOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconShapes.circleHalfVerticalRightFill}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Increase Contrast</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"increaseContrast\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//SET SWITCH STATE\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").increaseContrast == \"less\") {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (queryIncreasedContrast == true) {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').addClass(\"disabled\").removeClass(\"off\");\n\t\t\t\t\t$(\"#increaseContrastLabel\").append(`<span class=\"subtext\">Using device settings</span>`)\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE REDUCED MOTION OPTIONS\n\t\t\tif (options.motionOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.dialOffStroke}\n\t\t\t\t\t\t<div class=\"label\" id=\"reducedMotionLabel\">\n\t\t\t\t\t\t\t<span>Reduce Motion</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"reduceMotion\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//SET SWITCH STATE\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").reduceMotion == \"off\") {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (queryReducedMotion == true) {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').addClass(\"disabled\").removeClass(\"off\");\n\t\t\t\t\t$(\"#reducedMotionLabel\").append(`<span class=\"subtext\">Using device settings</span>`)\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (options.textSizeOptions == true || options.textWeightOptions == true || options.textFontOptions == true) {\n\t\t\t//SET UP THE CONTAINER\n\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t<h2 class=\"headerList\">Text</h2>\n\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\" id=\"containerText\"></section>\n\t\t\t\t</div>\n\t\t\t`);\n\t\t\t\n\t\t\t//GENERATE FONT OPTIONS\n\t\t\tif (options.textFontOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textDyslexia}\n\t\t\t\t\t\t<div class=\"label\">Font</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"font\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t<button data-value=\"system\" data-label=\"System\">\n\t\t\t\t\t\t\t\t\t<span>System<br /><span class=\"subtext\">The default font for your device</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button data-value=\"opendyslexic\" data-label=\"OpenDyslexic\">\n\t\t\t\t\t\t\t\t\t<span>OpenDyslexic<br /><span class=\"subtext\">For people with Dyslexia</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button data-value=\"atkinson\" data-label=\"Atkinson Hyperlegible\">\n\t\t\t\t\t\t\t\t\t<span>Atkinson Hyperlegible<br /><span class=\"subtext\">For people with low vision</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\tswitch (getPreferenceGroup(\"rebar.appSettings\").textFont) {\n\t\t\t\t\tcase 'system':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`System`);\n\t\t\t\t\t\t$(`[data-value=\"system\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'opendyslexic':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`OpenDyslexic`);\n\t\t\t\t\t\t$(`[data-value=\"opendyslexic\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'atkinson':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`Atkinson Hyperlegible`);\n\t\t\t\t\t\t$(`[data-value=\"atkinson\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE TEXT SIZE OPTIONS\n\t\t\tif (options.textSizeOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textSize}\n\t\t\t\t\t\t<div class=\"label\">\n\t\t\t\t\t\t\t<span>Text Size</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"dynamicTypeSize\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE MENU ITEMS\n\t\t\t\t$.each( appTextSizes, function( key, val ) {\n\t\t\t\t\t$(`[data-setting=\"dynamicTypeSize\"] .contextContainerMenu`).append(`\n\t\t\t\t\t\t<button data-value=\"${key}\" data-label=\"${val}\">${val}</button>\n\t\t\t\t\t`)\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET TEXT SIZE DROPDOWN\n\t\t\t\t$(`[data-setting='dynamicTypeSize'] button[data-value='${getPreferenceGroup(\"rebar.appSettings\").dynamicTypeSize.value}']`).addClass(\"picked\");\n\t\t\t\t$(\"[data-setting='dynamicTypeSize'] .contextLabel\").append(getPreferenceGroup(\"rebar.appSettings\").dynamicTypeSize.label);\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE BOLD TEXT OPTIONS\n\t\t\tif (options.textWeightOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textWeight}\n\t\t\t\t\t\t<div class=\"label\">\n\t\t\t\t\t\t\t<span>Bold Text</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"boldText\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").textWeight == \"regular\") {\n\t\t\t\t\t$('[data-setting=\"boldText\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"boldText\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"boldText\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function optionsAlert () {\n alert(\"You can't use this command here.\")\n}", "function Requirements(options){\n this.specify(options);\n this.flags = {};\n this.status = true;\n }" ]
[ "0.6037481", "0.60318357", "0.60318357", "0.59998536", "0.5954973", "0.5954973", "0.5954973", "0.59449977", "0.59152806", "0.5906259", "0.5872966", "0.5872966", "0.58575654", "0.5854597", "0.5854597", "0.5834004", "0.5834004", "0.5827216", "0.5819405", "0.5818854", "0.58022004", "0.57842517", "0.5732377", "0.5729937", "0.57210064", "0.5720681", "0.57098687", "0.57098687", "0.57036006", "0.57018113", "0.568993", "0.5670879", "0.5660727", "0.56523234", "0.56394726", "0.5573344", "0.5573344", "0.5555019", "0.5540074", "0.5503234", "0.54986674", "0.54951155", "0.5482653", "0.5476659", "0.54731524", "0.54462755", "0.5445593", "0.5426359", "0.5412764", "0.53816885", "0.5340993", "0.5328724", "0.5328724", "0.5309628", "0.5280419", "0.5227006", "0.52246714", "0.52217567", "0.52204204", "0.52191746", "0.5214505", "0.52140987", "0.52124816", "0.52053267", "0.5203562", "0.519252", "0.5188671", "0.51810527", "0.51803744", "0.5175469", "0.51704395", "0.5167679", "0.5154691", "0.51510936", "0.51493466", "0.5142842", "0.51374173", "0.51354945", "0.51344156", "0.5130862", "0.5124781", "0.51229656", "0.51216465", "0.51155496", "0.5112915", "0.51110977", "0.51030695", "0.51021224", "0.5099473", "0.5099473", "0.5099473", "0.50970054", "0.50966513", "0.50966513", "0.50966513", "0.5092982", "0.50907564", "0.50907564", "0.50890374", "0.5086758", "0.508423" ]
0.0
-1
If pure is true, the selector returned by selectorFactory will memoize its results, allowing connectAdvanced's shouldComponentUpdate to return false if final props have not changed. If false, the selector will always return a new object and shouldComponentUpdate will always return true.
function finalPropsSelectorFactory(dispatch, _ref2) { var initMapStateToProps = _ref2.initMapStateToProps, initMapDispatchToProps = _ref2.initMapDispatchToProps, initMergeProps = _ref2.initMergeProps, options = (0, _objectWithoutPropertiesLoose3.default)(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); var mapStateToProps = initMapStateToProps(dispatch, options); var mapDispatchToProps = initMapDispatchToProps(dispatch, options); var mergeProps = initMergeProps(dispatch, options); if (true) { (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName); } var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (false) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (false) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = selectorFactory__objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties$4(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */](mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties$1(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = (0, _objectWithoutPropertiesLoose2.default)(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}" ]
[ "0.5797441", "0.5797441", "0.57838345", "0.57838345", "0.57838345", "0.57836396", "0.57836396", "0.57836396", "0.57836396", "0.576929", "0.576929", "0.5766167", "0.5763229", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.5762632", "0.57515514", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5746241", "0.5741503", "0.57243603", "0.57243603", "0.57243603", "0.57243603", "0.57243603", "0.57243603", "0.57243603", "0.57243603", "0.57208425", "0.57208425", "0.57108766", "0.5704111", "0.5704111", "0.5704111", "0.5704111", "0.5704111", "0.5693095", "0.5669697", "0.5669697", "0.5669697", "0.5669697", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.566675", "0.5653853", "0.5653853", "0.5653853" ]
0.0
-1
to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine whether mapToProps needs to be invoked when props have changed. A length of one signals that mapToProps does not depend on props from the parent component. A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and therefore not reporting its length accurately..
function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapToProps() {\n return {};\n}", "function mapToProps() {\n return {};\n}", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch);};// allow detectFactoryAndVerify to get ownProps\nproxy.dependsOnOwnProps=true;proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps;proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);var props=proxy(stateOrDispatch,ownProps);if(typeof props==='function'){proxy.mapToProps=props;proxy.dependsOnOwnProps=getDependsOnOwnProps(props);props=proxy(stateOrDispatch,ownProps);}if(true)Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props,displayName,methodName);return props;};return proxy;};}", "function mapDispatchToProps(dispatch, ownProps) {\n //\n return {};\n}", "function getDependsOnOwnProps(mapToProps){return mapToProps.dependsOnOwnProps!==null&&mapToProps.dependsOnOwnProps!==undefined?Boolean(mapToProps.dependsOnOwnProps):mapToProps.length!==1;}// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t }; // allow detectFactoryAndVerify to get ownProps\n\t\n\t\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function mapStateToProps(state, ownProps) {\n\treturn {};\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"development\" !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function mapStateToProps(state) {\n console.log(\"mapStateToProps\")\n console.log(state.events ? state.events.length : \"null\")\n return {events: state.events}\n }", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"production\" !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if ('development' !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}" ]
[ "0.6489741", "0.6489741", "0.6218233", "0.606265", "0.590817", "0.5817902", "0.5804757", "0.5800119", "0.5768706", "0.5768706", "0.5768706", "0.5768706", "0.5768706", "0.5763125", "0.5763125", "0.5763125", "0.5763125", "0.5747114", "0.5740582", "0.5734682", "0.5734682", "0.5734682", "0.5731247", "0.5731214", "0.5731214", "0.5731214", "0.5731214", "0.5731214", "0.5731214", "0.5731214", "0.5719111", "0.5698162", "0.5694122", "0.5690535", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56884277", "0.56853914", "0.56853914", "0.5679745", "0.5679745", "0.5667328", "0.5667328", "0.56652725", "0.5662759", "0.5662759", "0.5662759", "0.5662759", "0.5652907", "0.5652907", "0.5652907", "0.5652907", "0.5652907", "0.5652907", "0.5651777", "0.5651777", "0.5647726", "0.564496", "0.564496", "0.5634141", "0.5614997", "0.5614997", "0.5614997", "0.5614997", "0.5614997", "0.5613642", "0.5612889", "0.5612889", "0.5598737", "0.5598737" ]
0.0
-1
this function wraps mapToProps in a proxy function which does several things: Detects whether the mapToProps function being called depends on props, which is used by selectorFactory to decide if it should reinvoke on props changes. On first call, handles mapToProps if returns another function, and treats that new function as the true mapToProps for subsequent calls. On first call, verifies the first result is a plain object, in order to warn the developer that their mapToProps function is not returning a valid result.
function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, _ref) { var displayName = _ref.displayName; var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); }; // allow detectFactoryAndVerify to get ownProps proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); var props = proxy(stateOrDispatch, ownProps); if (typeof props === 'function') { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName); return props; }; return proxy; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t }; // allow detectFactoryAndVerify to get ownProps\n\t\n\t\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch);};// allow detectFactoryAndVerify to get ownProps\nproxy.dependsOnOwnProps=true;proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps;proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);var props=proxy(stateOrDispatch,ownProps);if(typeof props==='function'){proxy.mapToProps=props;proxy.dependsOnOwnProps=getDependsOnOwnProps(props);props=proxy(stateOrDispatch,ownProps);}if(true)Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props,displayName,methodName);return props;};return proxy;};}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"development\" !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"production\" !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if ('development' !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}" ]
[ "0.78341955", "0.78341955", "0.78341955", "0.78341955", "0.78341955", "0.7808309", "0.77904975", "0.77780414", "0.7770664", "0.7768067", "0.77630585", "0.77630585", "0.77630585", "0.77630585", "0.77630585", "0.77630585", "0.77630585", "0.7734753", "0.77338624", "0.77272743", "0.77272743", "0.7723002", "0.7721668", "0.7720361", "0.7720361", "0.7705736", "0.7705736", "0.7694188", "0.7694188", "0.7694188", "0.7694188", "0.7694188", "0.7694188", "0.76755494", "0.76755494", "0.7669297", "0.7669297", "0.7669297", "0.7669297", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7668466", "0.7662726", "0.7662726", "0.76614434", "0.76614434", "0.76614434", "0.76571184", "0.76484597", "0.76484597", "0.76484597", "0.76484597", "0.7643853", "0.76387215", "0.76347804", "0.76347804", "0.7604347", "0.7604347", "0.7604347", "0.7604347", "0.7604347", "0.7593902", "0.7593902", "0.7593902", "0.7593902", "0.7593902", "0.7593902", "0.7593902", "0.7593902" ]
0.772841
19
Base class helpers for the updating state of a component.
function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }", "function _update() {\r\n this.component[this.prop] = this.control[this.prop];\r\n }", "_handleComponentChange() {\n this.setState(this._getStateFromStore());\n }", "update(data={}) {\n this.state = Object.assign(this.state, data);\n\n // notify all the Listeners of updated state\n this.notifyObervers(this.state);\n }", "constructor() {\n super(); // Gives context for \"this\" within component.\n this.state = { txt: \"Hi There\"};\n this.update = this.update.bind(this);\n }", "update(data = {}) {\n this.state = Object.assign(this.state, data);\n this.notify(this.state);\n }", "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "constructor() {\n super(); // Gives context for \"this\" within component.\n this.state = { \n red: 0,\n green: 0,\n blue: 0,\n myTxt: \"--\"\n };\n this.update = this.update.bind(this);\n }", "updateState(stateChange){\n this.setState(stateChange);\n }", "updateState(state) {\n this.updateStateInner(state, this._props);\n }", "setStateInternal(id, value) {\n var obj = id;\n if (! obj.startsWith(this.namespace + '.'))\n obj = this.namespace + '.' + id;\n this.log.info('update state ' + obj + ' with value:' + value);\n currentStateValues[obj] = value;\n }", "handler(update) {\n this.setState(update)\n }", "update(data = {}) {\r\n console.log(data);\r\n this.state = Object.assign(this.state, data);\r\n this.notify(this.state);\r\n }", "setState(updateObject) {\n this.setChangeFlags({stateChanged: true});\n Object.assign(this.state, updateObject);\n this.setNeedsRedraw();\n }", "_updateStateValue(prop, v) {\n return new Promise((resolve, reject) => {\n var c = this._component\n if(c.state && c.state[prop] !== undefined){\n var state = {}\n state[prop] = v\n c.setState(state, resolve)\n }else{\n c[prop] = v\n c.forceUpdate()\n resolve()\n }\n })\n }", "stateChanged(state) { }", "setState(newState) {\n this.state = {\n ...this.state,\n ...newState\n }\n this.#updater()\n }", "update() {\n // Subclasses should override\n }", "function updateValue( value ) \n{\n \n updateComponentValue( value );\n \n}", "updateItem() {\n this.setState(this.state);\n }", "stateChanged(_state) { }", "update() {\r\n throw new Error('must be set in subclass');\r\n }", "update() {\n const state = this.store.getState();\n\n if (this.isPresenting !== state.webvr.isPresenting) {\n this.vrEffect.setFullScreen(state.webvr.isPresenting);\n this.isPresenting = state.webvr.isPresenting;\n }\n\n if (this.isPresenting) {\n this.vrControls.update();\n } else {\n const dt = (state.app.timestamp - this.timestamp) || 0;\n this.timestamp = state.app.timestamp;\n\n this.flyControls.update(dt);\n }\n\n // update all components with their state\n const componentState = this.select(state);\n Object.keys(this.components)\n .forEach(id => this.components[id].update(componentState[id]));\n }", "updateState(newState) {\n this.setState(newState);\n }", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "update(...props) {\n if (this.onUpdate && this._) {\n return this.onUpdate(...props);\n }\n }", "updateComponentState(componentUpdate, sectionIndex, gridSectionIndex, componentStateIndex) {\n if (!this.state.globalContextObj.editing) return\n\n this.setState((state, props) => {\n let component = state.pages[state.globalContextObj.editing].sections[sectionIndex].gridSections[gridSectionIndex].componentStates[componentStateIndex]\n state.pages[state.globalContextObj.editing].sections[sectionIndex].gridSections[gridSectionIndex].componentStates[componentStateIndex] = deepStyleMerge(component, componentUpdate)\n return {\n pages: state.pages\n }\n })\n }", "setState(newState, cb) {\n // Merge both new and old state to replace whats new an keep whats old.\n this.state = {...this.state, ...newState};\n\n // re-render the element with a given renderer callback\n if (cb) cb(this.state, this.element);\n }", "_triggerComponentUpdate(value) {\n if (has(this.props, 'valueLink')) {\n this.props.valueLink.requestChange(value);\n this.setState({\n focusedValue: undefined,\n isActive: false,\n });\n } else if (has(this.props, 'value')) {\n this.setState({\n focusedValue: undefined,\n isActive: false,\n });\n } else {\n this.setState({\n focusedValue: undefined,\n isActive: false,\n value,\n });\n }\n\n if (this.props.onUpdate) {\n this.props.onUpdate({ value });\n }\n }", "_onChangeState() {\n\n\n }", "update (descriptor) {\n // update helper's own UI if needed\n // etc\n }", "componentWillUpdate() {}", "constructor(props) {\n super(props);\n this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);\n }", "function setComponentState(componentId, key, value) {\n var componentState = getViewState(componentId);\n if (!componentState) {\n componentState = new Object();\n setViewState(componentId, componentState);\n }\n componentState[key] = value;\n}", "_stateChanged(_state) {\n throw new Error('_stateChanged() not implemented');\n }", "onUpdate(data) {\n this.setState(data);\n }", "handleUpdatedState(state) {\n this.lastTechnology = state.selectedTechnology;\n this.totalClicks = state.clickCounter;\n }", "stateUpdate() {\n this.handlestateVariable();\n this.handlestateVariable2();\n this.handleCChange();\n this.handleAChange();\n this.handleidCapture();\n this.handleimgCapture();\n this.handleConfigChange();\n this.idcaptureVal();\n this.imgcaptureVal();\n }", "componentDidUpdate() {\n this.props.actions.updateQuestionSuccess({id: this.state.id, value: this.state.question});\n }", "update(key, value) {\n let property = {};\n property[key] = value;\n // Change state\n this.setState(property, () => this.getData());\n }", "componentWillUpdate () {}", "_UpdateComponents() {\n this.loadedComponents.forEach((component) => {\n if(component.binding) {\n // Update the component from its bound value if the value has changed\n if(component.binding.object[component.binding.property] != component.oldValue) {\n component.SetValue(component.binding.object[component.binding.property]);\n component.oldValue = component.binding.object[component.binding.property];\n }\n }\n });\n\n setTimeout(() => {\n window.requestAnimationFrame(() => {\n this._UpdateComponents();\n });\n }, this.opts.pollRateMS);\n\n }", "_updateState() {\n const currentProps = this.props;\n const currentViewport = this.context.viewport;\n const propsInTransition = this._updateUniformTransition();\n this.internalState.propsInTransition = propsInTransition;\n // Overwrite this.context.viewport during update to use the last activated viewport on this layer\n // In multi-view applications, a layer may only be drawn in one of the views\n // Which would make the \"active\" viewport different from the shared context\n this.context.viewport = this.internalState.viewport || currentViewport;\n // Overwrite this.props during update to use in-transition prop values\n this.props = propsInTransition;\n\n try {\n const updateParams = this._getUpdateParams();\n const oldModels = this.getModels();\n\n // Safely call subclass lifecycle methods\n if (this.context.gl) {\n this.updateState(updateParams);\n } else {\n try {\n this.updateState(updateParams);\n } catch (error) {\n // ignore error if gl context is missing\n }\n }\n // Execute extension updates\n for (const extension of this.props.extensions) {\n extension.updateState.call(this, updateParams, extension);\n }\n\n const modelChanged = this.getModels()[0] !== oldModels[0];\n this._updateModules(updateParams, modelChanged);\n // End subclass lifecycle methods\n\n if (this.isComposite) {\n // Render or update previously rendered sublayers\n this._renderLayers(updateParams);\n } else {\n this.setNeedsRedraw();\n // Add any subclass attributes\n this._updateAttributes(this.props);\n\n // Note: Automatic instance count update only works for single layers\n if (this.state.model) {\n this.state.model.setInstanceCount(this.getNumInstances());\n }\n }\n } finally {\n // Restore shared context\n this.context.viewport = currentViewport;\n this.props = currentProps;\n this.clearChangeFlags();\n this.internalState.needsUpdate = false;\n this.internalState.resetOldProps();\n }\n }", "componentDidUpdate() {\n this.props.actions.updateAnswerSuccess({\n questionId: this.state.questionId,\n id: this.state.id,\n label: this.state.answer,\n isTrue: this.props.isTrue\n });\n }", "stateChanged(state) {\n }", "handleUpdate(data) {\n this.setState({ data });\n}", "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n this.state={\n userName:''\n }\n }", "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n this.state={\n userName:''\n }\n }", "componentWillUpdate(np,ns){ }", "componentDidUpdate(preProps,preState,a){\n console.log(\"componentDidUpdate\",a)\n }", "setState(newProps) {\n let stateChanged = false;\n\n Object.entries(newProps).forEach(([key, val]) => {\n if (val !== this.state[key]) {\n stateChanged = true;\n }\n\n this.state[key] = val;\n });\n\n if (stateChanged) {\n this.render();\n }\n }", "function update() {\n // ... no implementation required\n }", "function updater(prevState){var state=this.constructor.getDerivedStateFromProps(nextProps,prevState);return state!==null&&state!==undefined?state:null;}// Binding \"this\" is important for shallow renderer support.", "componentDidUpdate(){\r\n console.log(\"Update\", this.state);\r\n }", "updateData(config) {\r\n this.setState(config);\r\n }", "componentWillUpdate(e, state) {\n if (state.x) {\n this.xElement.innerHTML = ' x: ' + state.x\n } \n if (state.y) {\n this.yElement.innerHTML = ' y: ' + state.y\n } \n }", "updateState (val, key) {\n this.state[key] = val\n this.updateUI()\n }", "refresh_() {\n // Can be overridden in sub-component.\n }", "stateChanged(state) {\n \n throw new Error('stateChanged() not implemented', this);\n }", "setState(state, callback) {\n if (!this.prevState) this.prevState = this.state;\n this.state = this._extend(\n this._extend({}, this.state),\n typeof state === 'function' ? state(this.state, this.props) : state\n );\n let dom = this.getDomElement();\n let container = dom.parentNode;\n let newVDom = this.render(); // This will invoke the derived class render menthod\n newVDom.component = this;\n diff (newVDom, container, dom);\n }", "handleUpdateBox(id, title) {\n this.setState({updatedId: id, updatedTitle: title});\n }", "setState (state) {\r\n this.state = state;\r\n }", "componentDidUpdate(props_) {}", "constructor(props) {\n \t//calling parent method with super\n \tsuper(props);\n//functional components don't have state, only class-based components do\n//term is property on which we want to record change\n \tthis.state = { term: ''};\n //the above live can only be in the constructor, so every instance will take a copy of the current state\n }", "updateComponents () {\n\t\tfor (let component in this.components) {\n\t\t\tthis.components[component].update();\n\t\t}\n\t}", "componentDidUpdate(prevProps, prevState, snapshot){\n console.info(this.constructor.name+' Did my component updated?');\n\n }", "update( e ){\n // Assign to let changedID ID of slider which has been changed\n let changedID = e.target.id;\n let value = e.target.value;\n if (changedID === 'sliderAmount') {\n this.setState({valueAmount: e.target.value});\n }\n if (changedID === 'sliderDuration'){\n this.setState({valueDuration: e.target.value});\n }\n\n\n this.calculate(changedID, value);\n }", "setState(_state, _args) {\n\t // This has to be handled at a higher level since we can't\n\t // replace the whole tree here however we still need a method here\n\t // so it appears on the proxy Actions class.\n\t throw new Error('Called setState on StateActions.');\n\t }", "componentWillUpdate(nextProps) {\n if (this.props.value !== nextProps.value) {\n this.setState({ value: this.props.value });\n }\n }", "componentWillUpdate() {\n console.log('Before updating a component');\n }", "updateFormFieldInState(formField, value) {\n\n }", "onChangeStatus(newStatus) {\n return () => {\n this.props.changeStatus(newStatus)\n };\n }", "componentDidUpdate(prevProps) {\n if (\n prevProps.currentIndex != this.props.currentIndex ||\n prevProps.list.length != this.props.list.length\n )\n this.setState({\n ...this.EditStateFunction()\n });\n }", "updateState(e, val) {\n val === undefined ? val = e.target.value : val; // catch location input field value since it behaves differently\n let key = e.target.name;\n // you must use a function to set state if the key is a variable\n let stateObj = function() {\n var obj = {};\n obj[key] = val;\n return obj;\n }.bind(e)();\n this.setState( stateObj );\n\n }", "componentDidUpdate() {\n\t\t/* preserve context */\n\t\tconst _this = this;\n\t}", "componentDidUpdate() {\n\t\t/* preserve context */\n\t\tconst _this = this;\n\t}", "state (...args) {\n return MVC.ComponentJS(this).state(...args)\n }", "_updateInput (input) {\n this.setState({ input })\n }", "_update() {\n }", "shouldComponentUpdate(newProps, newState) {\n // console.log(\"=========================> shouldComponentUpdate\", newProps, newState);\n return true;\n }", "_requestUpdate(name,oldValue){let shouldRequestUpdate=!0;// If we have a property key, perform property update steps.\nif(name!==void 0){const ctor=this.constructor,options=ctor._classProperties.get(name)||defaultPropertyDeclaration;if(ctor._valueHasChanged(this[name],oldValue,options.hasChanged)){if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}// Add to reflecting properties set.\n// Note, it's important that every change has a chance to add the\n// property to `_reflectingProperties`. This ensures setting\n// attribute + property reflects correctly.\nif(!0===options.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY)){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}}else{// Abort the request if the property should not be considered changed.\nshouldRequestUpdate=!1}}if(!this._hasRequestedUpdate&&shouldRequestUpdate){this._enqueueUpdate()}}", "componentDidUpdate(prepProps, prevState) {\n if (!this.props.onChange) return;\n if (_.isEqual(prevState, this.state)) return;\n\n const stateNow = {...this.state};\n this.debouncedOnChange(stateNow);\n }", "function newState(state) {\n alert(\"This functionality is yet to be implemented!\");\n }", "update()\n\t{ \n\t\tthrow new Error(\"update() method not implemented\");\n\t}", "setState (newState) {\n this._state = assign({}, this._state, newState);\n this.trigger(assign({}, this._state));\n }", "update() {\n this.setState({\n numberOfGuests: this.props.model.getNumberOfGuests(),\n menu: this.props.model.getMenu(),\n menuPrice: this.props.model.calcCost(),\n });\n }", "update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents)\n ensureListeners(this);\n let prevProps = this._props;\n this._props = props;\n if (props.plugins) {\n props.plugins.forEach(checkStateComponent);\n this.directPlugins = props.plugins;\n }\n this.updateStateInner(props.state, prevProps);\n }", "setState (newState) {\n this.state = {...newState};\n if (this.updaterWin) {\n this.updaterWin.send('update-state-change', this.state);\n }\n }", "componentUpdated(el, binding, vnode) {\n const self = vnode.context\n const instanceName = getInstanceName(el, binding, vnode)\n const options = binding.value || {}\n const quill = self[instanceName]\n if (quill) {\n const model = vnode.data.model\n const _value = vnode.data.attrs ? vnode.data.attrs.value : null\n const _content = vnode.data.attrs ? vnode.data.attrs.content : null\n const disabled = vnode.data.attrs ? vnode.data.attrs.disabled : null\n const content = model ? model.value : (_value || _content)\n const newData = content\n const oldData = el.children[0].innerHTML\n quill.enable(!disabled)\n if (newData) {\n if (newData != oldData) {\n const range = quill.getSelection()\n quill.root.innerHTML = newData\n setTimeout(() => {\n quill.setSelection(range)\n })\n }\n } else {\n quill.setText('')\n }\n }\n }", "componentUpdated(el, binding, vnode) {\n const self = vnode.context\n const instanceName = getInstanceName(el, binding, vnode)\n const options = binding.value || {}\n const quill = self[instanceName]\n if (quill) {\n const model = vnode.data.model\n const _value = vnode.data.attrs ? vnode.data.attrs.value : null\n const _content = vnode.data.attrs ? vnode.data.attrs.content : null\n const disabled = vnode.data.attrs ? vnode.data.attrs.disabled : null\n const content = model ? model.value : (_value || _content)\n const newData = content\n const oldData = el.children[0].innerHTML\n quill.enable(!disabled)\n if (newData) {\n if (newData != oldData) {\n const range = quill.getSelection()\n quill.root.innerHTML = newData\n setTimeout(() => {\n quill.setSelection(range)\n })\n }\n } else {\n quill.setText('')\n }\n }\n }", "privateSendUpdate () {\n this.emit('update', this.getState())\n }", "componentDidUpdate(prevProps) {\n // Is called when the corresponding state is changed in parent class (indirect trigger)\n // Is also called a 2nd time when setState{open:true} is called inside this function\n if (prevProps != this.props) {\n this.state.type = this.props.popUp.type;\n this.state.message = this.props.popUp.message;\n this.state.open = this.props.popUp.openPopUp;\n this.checkAction();\n }\n }", "_onChange() {\n if (this.isMounted()) {\n this.setState({ value: ButtonStore.getValue() });\n this.setState({ session: AuthStore.getSession() });\n }\n }", "componentDidUpdate(prevProps, prevState) { // eslint-disable-line\n if (this.state.value !== prevState.value) {\n this.props.setValue(this.state.value);\n if (this.state.manualChangeKey !== prevState.manualChangeKey || this.props.shouldUpdateAlways) {\n this.props.onChangeInput(this.props.name, this.state.value);\n }\n }\n }", "componentDidUpdate(preProps, preState, a) {\n console.log('componentDidUpdate', a);\n\n }", "_requestUpdate(e,t){let n=!0;// If we have a property key, perform property update steps.\nif(e!==void 0){const r=this.constructor,a=r._classProperties.get(e)||defaultPropertyDeclaration;r._valueHasChanged(this[e],t,a.hasChanged)?(!this._changedProperties.has(e)&&this._changedProperties.set(e,t),!0===a.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,a))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()}", "_onChange() {\n this.setState(getUserState());\n }", "componentWillUpdate(){\n }", "update() {\n throw new Error(\"Not Implemented\");\n }" ]
[ "0.7217204", "0.67610246", "0.66769236", "0.66106635", "0.6540022", "0.65259355", "0.6489663", "0.64705694", "0.645821", "0.63847154", "0.6354757", "0.63347685", "0.63053316", "0.6304944", "0.62717897", "0.6266675", "0.621649", "0.6214279", "0.6194085", "0.6189877", "0.61581206", "0.61456084", "0.61447406", "0.6142352", "0.61391985", "0.6136819", "0.6136819", "0.6126794", "0.6124326", "0.6123324", "0.6123313", "0.61184245", "0.61128074", "0.6111048", "0.6095896", "0.60895276", "0.60835844", "0.605533", "0.6054009", "0.60441685", "0.603602", "0.60313237", "0.6023746", "0.6022422", "0.6013368", "0.6011896", "0.5998191", "0.5996584", "0.5989578", "0.5989578", "0.59868217", "0.5978034", "0.59710664", "0.59678763", "0.5959723", "0.59404993", "0.5940022", "0.5929913", "0.5929369", "0.5926322", "0.5901044", "0.5899439", "0.58905244", "0.588635", "0.58777153", "0.58744425", "0.58717144", "0.58670866", "0.58630913", "0.58609957", "0.5854311", "0.5852806", "0.58316416", "0.5830537", "0.58260363", "0.58244467", "0.58180845", "0.58180845", "0.58161324", "0.5805007", "0.58019525", "0.58012426", "0.58001685", "0.5799195", "0.57960683", "0.57954085", "0.5794681", "0.57944787", "0.5790454", "0.578807", "0.57828015", "0.57828015", "0.5779781", "0.57756954", "0.57737005", "0.5773495", "0.576855", "0.57582575", "0.5755969", "0.57503283", "0.574594" ]
0.0
-1
Convenience component with default shallow equality check for sCU.
function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useStrictEquality(b, a) {\n return a === b;\n }", "get shallowCopy() {\n return this.shallowCopy$();\n }", "function defaultEqualityCheck(a, b) {\n return !a && !b || a === b;\n }", "equals() {\n return false;\n }", "equals() {\n return false;\n }", "function looseEqual(a, b) {\n return true;\n }", "Equals() {\n\n }", "Equals() {\n\n }", "function areEqualShallow(a, b) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$ignore = _ref.ignore,\n ignore = _ref$ignore === undefined ? {} : _ref$ignore;\n\n if (a === b) {\n return true;\n }\n\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object' || a === null || (typeof b === 'undefined' ? 'undefined' : _typeof(b)) !== 'object' || b === null) {\n return false;\n }\n\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n\n for (var key in a) {\n if (!(key in ignore) && (!(key in b) || a[key] !== b[key])) {\n return false;\n }\n }\n for (var _key in b) {\n if (!(_key in ignore) && !(_key in a)) {\n return false;\n }\n }\n return true;\n}", "function useStrictEquality( b, a ) {\n\t\t\t\tif ( b instanceof a.constructor || a instanceof b.constructor ) {\n\t\t\t\t\t// to catch short annotaion VS 'new' annotation of a\n\t\t\t\t\t// declaration\n\t\t\t\t\t// e.g. var i = 1;\n\t\t\t\t\t// var j = new Number(1);\n\t\t\t\t\treturn a == b;\n\t\t\t\t} else {\n\t\t\t\t\treturn a === b;\n\t\t\t\t}\n\t\t\t}", "function useStrictEquality(b, a) {\n\t\t\tif (b instanceof a.constructor || a instanceof b.constructor) {\n\t\t\t\t// to catch short annotaion VS 'new' annotation of a declaration\n\t\t\t\t// e.g. var i = 1;\n\t\t\t\t// var j = new Number(1);\n\t\t\t\treturn a == b;\n\t\t\t} else {\n\t\t\t\treturn a === b;\n\t\t\t}\n\t\t}", "function callObjectEqual(a, b) {\n if (!isDefaultMode() && !canTestPrimitiveScope) {\n // If the environment doesn't allow null scope, then there's no way\n // to predict how the scope will be mangled by running \"a\" through it,\n // so run isEqual as a static method instead. This is simulating a real\n // world situation as well as there is no way to map isEqual to Object\n // prototype and have it work for string primitives when strict mode is\n // not available, so the user will in that case have to go through the\n // static method as well. Similarly, chainables would have to go through\n // a significant tapdance to get working right with null scope issues,\n // and the performance penalties and indescrepancy with extended mode\n // is not worth the benefits.\n return run(Object, 'isEqual', [a, b]);\n }\n return run(a, 'isEqual', [b]);\n }", "function useStrictEquality(b, a) {\n if (b instanceof a.constructor || a instanceof b.constructor) {\n // to catch short annotaion VS 'new' annotation of a declaration\n // e.g. var i = 1;\n // var j = new Number(1);\n return a == b;\n } else {\n return a === b;\n }\n }", "function useStrictEquality(b, a) {\n if (b instanceof a.constructor || a instanceof b.constructor) {\n // to catch short annotaion VS 'new' annotation of a declaration\n // e.g. var i = 1;\n // var j = new Number(1);\n return a == b;\n } else {\n return a === b;\n }\n }", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n /* eslint-disable eqeqeq */\n return a == b || (\n isObject(a) && isObject(b)\n ? JSON.stringify(a) === JSON.stringify(b)\n : false\n )\n /* eslint-enable eqeqeq */\n}", "function looseEqual (a, b) {\n /* eslint-disable eqeqeq */\n return a == b || (\n isObject(a) && isObject(b)\n ? JSON.stringify(a) === JSON.stringify(b)\n : false\n )\n /* eslint-enable eqeqeq */\n}", "function shallowCompare(instance,nextProps,nextState){return!shallowEqual(instance.props,nextProps)||!shallowEqual(instance.state,nextState);}", "equals(S) {\n return XSet.equality(this.S);\n }", "_equal(a, b) {\n return a === b;\n }", "isEqual(currentValue, newValue) {\n throw new Error(\"Abstract method\");\n }", "function looseEqual(a,b){var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){return JSON.stringify(a)===JSON.stringify(b);}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function shallowCompare(instance, nextProps, nextState) {\n\t\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "function checkEquality(a, b) {\n return a === b;\n }", "isEqual(x, y) {\n return this.x === x && this.y === y;\n }", "eq(other) { return this == other; }", "function eq(a, b) {\n return a === b;\n }", "function sameObject(a, b) {\n return a === b\n}", "eq_(one, another) {\n return one === another;\n }", "function shallowCompare(instance, nextProps, nextState) {\n\t\t\treturn !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "function isCoerced(a,b) {\n if (a===b) {\n return false\n } else if(a==b){\n return true\n } else if (a !=b) {\n return false\n }\n}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function _equals(a, b) {\n if (a === b || (a !== a && b !== b)) { // true for NaNs\n return true;\n }\n\n if (!a || !b) {\n return false;\n }\n\n // There is probably a cleaner way to do this check\n // Blame TDD :)\n if (a && typeof a.constructor === 'function' &&\n a.constructor.unionFactory === Union) {\n if (!(b && typeof b.constructor === 'function' &&\n b.constructor.unionFactory === Union)) {\n return false;\n }\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (a.name !== b.name) {\n return false;\n }\n return _equals(a.payload, b.payload);\n }\n\n // I hate this block. Blame immutablejs :)\n if (typeof a.valueOf === 'function' &&\n typeof b.valueOf === 'function') {\n a = a.valueOf();\n b = b.valueOf();\n if (a === b || (a !== a && b !== b)) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n }\n if (typeof a.equals === 'function' &&\n typeof b.equals === 'function') {\n return a.equals(b);\n }\n return false;\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function StrictEqualityComparer(x, y) {\n return x === y;\n}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "isEqual(other) {\n if (!other) {\n return false;\n } else {\n return equals(this.underlying, other.underlying);\n }\n }", "function printSomthingWorthless(){\r\n console.log('my object is does(not) equal to cole');\r\n console.log(this === cole);\r\n}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b;\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "function looseEqual(a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b);\n } catch (e) {\n // possible circular reference\n return a === b;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n}", "get d812() { return this.c1.same(this.c8) && this.c2.same(this.c8) }", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function strictEquals(a) {\n return b => a === b;\n}", "function sc_isEqual(o1, o2) {\n return ((o1 === o2) ||\n\t (sc_isPair(o1) && sc_isPair(o2)\n\t && sc_isPairEqual(o1, o2, sc_isEqual)) ||\n\t (sc_isVector(o1) && sc_isVector(o2)\n\t && sc_isVectorEqual(o1, o2, sc_isEqual)));\n}", "function eq(x, y) {\n return util.inspect(x, true, null) === util.inspect(y, true, null);\n }", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "eq(other) { return false; }", "isEqual(other, ignoreAttrs = ['_id', '_rev'], strict = false) {\n return isEqualWith(\n omit(this, ignoreAttrs),\n omit(other, ignoreAttrs),\n !strict && looseDates\n )\n }", "function defaultEquals(a, b) {\n return a === b;\n }", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function isEqual(a, b) {\n if (typeof a === 'function' && typeof b === 'function') {\n return true;\n }\n\n if ((0, _react.isValidElement)(a) && (0, _react.isValidElement)(b)) {\n return true;\n }\n\n if (a instanceof Array && b instanceof Array) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0; i !== a.length; i++) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n if (isObject(a) && isObject(b)) {\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n\n for (var _i3 = 0, _Object$keys = Object.keys(a); _i3 < _Object$keys.length; _i3++) {\n var key = _Object$keys[_i3];\n\n if (!isEqual(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n }\n\n return a === b;\n}", "function equal$1(a,b){// START: fast-deep-equal es6/index.js 3.1.1\nif(a===b)return true;if(a&&b&&typeof a=='object'&&typeof b=='object'){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal$1(a[i],b[i]))return false;return true;}// START: Modifications:\n// 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n// to co-exist with es5.\n// 2. Replace `for of` with es5 compliant iteration using `for`.\n// Basically, take:\n//\n// ```js\n// for (i of a.entries())\n// if (!b.has(i[0])) return false;\n// ```\n//\n// ... and convert to:\n//\n// ```js\n// it = a.entries();\n// while (!(i = it.next()).done)\n// if (!b.has(i.value[0])) return false;\n// ```\n//\n// **Note**: `i` access switches to `i.value`.\nvar it;if(hasMap&&a instanceof Map&&b instanceof Map){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;it=a.entries();while(!(i=it.next()).done)if(!equal$1(i.value[1],b.get(i.value[0])))return false;return true;}if(hasSet&&a instanceof Set&&b instanceof Set){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;return true;}// END: Modifications\nif(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(a[i]!==b[i])return false;return true;}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;// END: fast-deep-equal\n// START: react-fast-compare\n// custom handling for DOM elements\nif(hasElementType&&a instanceof Element)return false;// custom handling for React/Preact\nfor(i=length;i--!==0;){if((keys[i]==='_owner'||keys[i]==='__v'||keys[i]==='__o')&&a.$$typeof){// React-specific: avoid traversing React elements' _owner\n// Preact-specific: avoid traversing Preact elements' __v and __o\n// __v = $_original / $_vnode\n// __o = $_owner\n// These properties contain circular references and are not needed when\n// comparing the actual elements (and not their owners)\n// .$$typeof and ._store on just reasonable markers of elements\ncontinue;}// all other properties should be traversed as usual\nif(!equal$1(a[keys[i]],b[keys[i]]))return false;}// END: react-fast-compare\n// START: fast-deep-equal\nreturn true;}return a!==a&&b!==b;}// end fast-deep-equal", "function sameValue(a, b) {\n return a == b\n}", "static EqualContents() {}", "function $i__NM$$fbjs$lib$shallowEqual__is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function ComparedObject(value) {\n this.value = value;\n }", "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "function sameValue(a, b) {\n return a === b\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function defaultCheckValueEquality (a, b) {\n return a === b;\n}", "function defaultCheckValueEquality (a, b) {\n return a === b;\n}", "isEqual(comp) {\n return this.die1 === comp.die1 && this.die2 === comp.die2;\n }" ]
[ "0.60843265", "0.57952434", "0.5671108", "0.56589365", "0.56589365", "0.5633363", "0.5590532", "0.5590532", "0.5586668", "0.5547976", "0.54892313", "0.5485994", "0.5483492", "0.5483492", "0.5474289", "0.5474289", "0.5474289", "0.54541457", "0.54541457", "0.544192", "0.5399826", "0.5392535", "0.5374277", "0.536327", "0.5345198", "0.5332734", "0.53070414", "0.5299852", "0.5293151", "0.5287309", "0.52864856", "0.52779275", "0.52711666", "0.526371", "0.526371", "0.526371", "0.52621", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5250291", "0.5243069", "0.52354884", "0.52354884", "0.52352196", "0.52292824", "0.5229225", "0.52232736", "0.52153456", "0.5206806", "0.5206266", "0.5206266", "0.5206266", "0.5206266", "0.5206266", "0.51992023", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.5194966", "0.51934963", "0.51918423", "0.5186883", "0.5181237", "0.5181237", "0.51667005", "0.51592684", "0.5149666", "0.51433986", "0.51433986", "0.5131532", "0.51276875", "0.5126123", "0.5121606", "0.51212025", "0.5119383", "0.51161283", "0.51138806", "0.5113428", "0.51028395", "0.51028395", "0.51028395", "0.51028395", "0.5095424", "0.5089589", "0.5089589", "0.5089369" ]
0.0
-1
an immutable object with a single mutable value
function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "static set one(value) {}", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\t\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function manipulationBareObj( value ) {\n\treturn value;\n}", "function toImmutable(arg) {\n\t\t return (isImmutable(arg))\n\t\t ? arg\n\t\t : Immutable.fromJS(arg)\n\t\t}", "function makeImmutableObject(obj) {\n if (!globalConfig.use_static) {\n addPropertyTo(obj, \"merge\", merge);\n addPropertyTo(obj, \"replace\", objectReplace);\n addPropertyTo(obj, \"without\", without);\n addPropertyTo(obj, \"asMutable\", asMutableObject);\n addPropertyTo(obj, \"set\", objectSet);\n addPropertyTo(obj, \"setIn\", objectSetIn);\n addPropertyTo(obj, \"update\", update);\n addPropertyTo(obj, \"updateIn\", updateIn);\n addPropertyTo(obj, \"getIn\", getIn);\n }\n\n return makeImmutable(obj, mutatingObjectMethods);\n }", "function toImmutable(arg) {\n\t return (isImmutable(arg))\n\t ? arg\n\t : Immutable.fromJS(arg)\n\t}", "function castImmutable(value) {\n return value;\n}", "function set(obj, key, val, immutable) {\n if (immutable)\n return _set(assign({}, obj), key, val);\n return _set(obj, key, val);\n}", "function constObjects() {\n const name = {\n person: \"reefath\"\n }\n \n name.person = \"tesla\"\n \n return name.person;\n}", "function makeImmutableProperty (self, schema, values, propName) {\n var Model, dateCopy;\n\n if (schema[propName].__immutableCtor && is.function(schema[propName])) {\n // this is a nested immutable\n Model = schema[propName];\n self[propName] = new Model(values[propName]);\n } else if (isDate(values[propName])) {\n dateCopy = new Date(values[propName]);\n\n Object.defineProperty(self, propName, {\n get: function () {\n return new Date(dateCopy);\n },\n enumerable: true,\n configurable: false\n });\n\n Object.freeze(self[propName]);\n } else {\n objectHelper.setReadOnlyProperty(\n self,\n propName,\n // TODO: is it really necessary to clone the value if it isn't an object?\n objectHelper.copyValue(values[propName]),\n // typeof values[propName] === 'object' ? objectHelper.copyValue(values[propName]) : values[propName],\n makeSetHandler(propName)\n );\n\n if (Array.isArray(values[propName])) {\n Object.freeze(self[propName]);\n }\n }\n }", "set(name, value) {\n return this.clone({\n name,\n value,\n op: 's'\n });\n }", "set Baked(value) {}", "set x(value = 42) {}", "set x(value) {}", "copyable(newValue = true) {\n this.value.copyable = newValue;\n return this;\n }", "function put(obj, key, val, immutable) {\n if (immutable)\n return _put(assign({}, obj), key, val);\n return _put(obj, key, val);\n}", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(index, object) {\n return object;\n }", "set value(value) {}", "build() {\n const state = Immutable.from(this.state);\n this.setState(state);\n return state.asMutable();\n }", "set(obj, value) {\n return this.update(obj, () => value);\n }", "static foo (a) { return { ...a, b: 2 } }", "function constantobjects() {\n const user = {\n name: \"John\"\n };\n\n console.log(user.name);\n\n // does it work? // yes\n user.name = \"Pete\";\n console.log(user.name);\n}", "set(value) {\n if (value === this._value) {\n return this;\n }\n\n return new ImmutableAccessor(value, this.path);\n }", "function example6() {\n var o = { a: 1 };\n o.a = 2; //allowed: change ref object\n o.b = 1; //allowed: change ref object\n\n // o = {a: 1} //not allowed: change referece itself\n}", "static set zero(value) {}", "copy() {\n return Object.assign(Object.create(this), JSON.parse(JSON.stringify(this)))\n }", "set(v) { /* empty */ }", "set(value) {\n this.value = value\n if (this.autoUpdate) {\n this.update()\n }\n return this // chain me up baby\n }", "copy({ type = this.type, value = this.value } = {}) {\n const { id, lbp, rules, unknown, ignored } = this;\n return new this.constructor(id, {\n lbp,\n rules,\n unknown,\n ignored,\n type,\n value,\n original: this,\n });\n }", "function identity(val){\n\t return val;\n\t }", "one() {\r\n this.data.fill(0);\r\n this.data[0] = 1;\r\n }", "function cumpleanosClonandoObjeto(persona){\n return {\n ...persona,\n edad: persona.edad += 1\n }\n}", "function objSeal(){\n var digits = {\n 1:'one',\n 2:'two',\n 3:'three',\n }\n // Object.defineProperty(digits,2,{\n // writable:false\n // })\n console.log(digits);\n Object.seal(digits);\n digits[2] = 'TWO';\n console.log(digits);\n}", "set x(x) {\n this[0] = x;\n }", "set(param, value) {\n return this.clone({\n param,\n value,\n op: 's'\n });\n }", "function changing(obj){\n obj.greeting = 'hola'; //mutate\n}", "set() {}", "function ComparedObject(value) {\n this.value = value;\n }", "function changeGreeting(obj) {\n obj.greeting = 'Hola'; // mutate \n}", "function M(){this.a={}}", "function snapshot(value, merged = 1) {\n return { value, merged };\n}", "function identity(val){\n return val;\n }", "function identity(val){\n return val;\n }", "function identity(val){\n return val;\n }", "constructor () {\n this.storage = immutable.Map()\n }", "static initialize(obj, id, value) { \n obj['id'] = id;\n obj['value'] = value;\n }", "copy() {\n return new this.constructor(\n this.power,\n this.value,\n (this.next != null) ? this.next.copy() : null,\n );\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function M() {\n this.a = {};\n }", "function changeGreeting (obj) {\n obj.greeting = 'Hola' // mutate\n}", "function changeGreeting(obj) {\n\tobj.greeting = 'Hola'; //mutate\n}", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "function changeGreeting(obj) {\n obj.greeting = \"hola\" //mutate\n}", "function memo (newParameterValue) {\n return initialize.observable({\n observableState,\n newParameterValue\n })\n }", "function destructivelyUpdateObjectWithKeyAndValue(object,key,value){\n object[key]=value;\n return object;\n}", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "constant(name, value) {\n return this.singleton(name, () => value);\n }", "function setA(o, val) {\n o.a = val;\n}", "constructor() {\n this.value = {};\n this.num = 0;\n }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }" ]
[ "0.6674448", "0.66609514", "0.6358345", "0.6347869", "0.6347869", "0.6263268", "0.6230736", "0.6136926", "0.61048114", "0.5915378", "0.5889688", "0.580687", "0.5776291", "0.5763881", "0.57248324", "0.56947106", "0.566211", "0.5636481", "0.56181127", "0.5606209", "0.5606209", "0.5606209", "0.5606209", "0.5606209", "0.5586234", "0.557178", "0.55356383", "0.55104053", "0.55075973", "0.550587", "0.54879093", "0.54802936", "0.5433998", "0.5431201", "0.54187083", "0.5394902", "0.53887403", "0.53795755", "0.5371964", "0.5357756", "0.53558546", "0.5347443", "0.5346903", "0.53416175", "0.53413206", "0.533415", "0.53338236", "0.53209484", "0.5320444", "0.5318093", "0.5318093", "0.5318093", "0.5310658", "0.53033954", "0.5293375", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52801293", "0.52801293", "0.52801293", "0.5260411", "0.5250951", "0.52408385", "0.5236158", "0.5236158", "0.523219", "0.5231279", "0.5225852", "0.5224158", "0.5224158", "0.5219042", "0.5219042", "0.5219042", "0.5219042", "0.5219042", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.52074826", "0.52008766", "0.51992226", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395" ]
0.0
-1
Create and return a new ReactElement of the given type. See
function createElement(type, config, children) { var propName = void 0; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; } if (hasValidKey(config)) { key = '' + config.key; } self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } // Resolve default props if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createElement(type,config,children){var propName;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "function createElement(type,config,children){var propName=void 0;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "function createElement(type) {\n return document.createElement(type);\n }", "function makeElement(type) {\n\t\treturn document.createElement(type);\n\t}", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createElement (type, props, ...children) {\n if (props.class) {\n processClasses(props.class)\n }\n return createDOMElement(type, props, ...children)\n}", "function make(type) {\n\treturn document.createElement(type);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createReactElement(component) {\n\treturn {\n\t\ttype: component.constructor,\n\t\tkey: component.key,\n\t\tref: null, // Unsupported\n\t\tprops: component.props\n\t};\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n var props = {\n };\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config);\n }\n if (hasValidKey(config)) key = '' + config.key;\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n for(propName in config)if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) props.children = children;\n else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for(var i = 0; i < childrenLength; i++)childArray[i] = arguments[i + 2];\n if (Object.freeze) Object.freeze(childArray);\n props.children = childArray;\n } // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for(propName in defaultProps)if (props[propName] === undefined) props[propName] = defaultProps[propName];\n }\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) defineKeyPropWarningGetter(props, displayName);\n if (ref) defineRefPropWarningGetter(props, displayName);\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function element(type, props, ...children) {\n let e = document.createElement(type);\n if (typeof props != \"undefined\" && props != null) {\n Object.keys(props).forEach(key => e.setAttribute(key, props[key]));\n }\n if (typeof children != \"undefined\" && children != null) {\n children.forEach(child => e.appendChild(child));\n }\n return e;\n}", "getElementConstructor(type) {\n return JSXElement;\n }", "function createElement(type, config, children) {\n\t var propName;\n\t\n\t // Reserved names are extracted\n\t var props = {};\n\t\n\t var key = null;\n\t var ref = null;\n\t var self = null;\n\t var source = null;\n\t\n\t if (config != null) {\n\t if (hasValidRef(config)) {\n\t ref = config.ref;\n\t }\n\t if (hasValidKey(config)) {\n\t key = '' + config.key;\n\t }\n\t\n\t self = config.__self === undefined ? null : config.__self;\n\t source = config.__source === undefined ? null : config.__source;\n\t // Remaining properties are added to a new props object\n\t for (propName in config) {\n\t if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n\t props[propName] = config[propName];\n\t }\n\t }\n\t }\n\t\n\t // Children can be more than one argument, and those are transferred onto\n\t // the newly allocated props object.\n\t var childrenLength = arguments.length - 2;\n\t if (childrenLength === 1) {\n\t props.children = children;\n\t } else if (childrenLength > 1) {\n\t var childArray = Array(childrenLength);\n\t for (var i = 0; i < childrenLength; i++) {\n\t childArray[i] = arguments[i + 2];\n\t }\n\t {\n\t if (Object.freeze) {\n\t Object.freeze(childArray);\n\t }\n\t }\n\t props.children = childArray;\n\t }\n\t\n\t // Resolve default props\n\t if (type && type.defaultProps) {\n\t var defaultProps = type.defaultProps;\n\t for (propName in defaultProps) {\n\t if (props[propName] === undefined) {\n\t props[propName] = defaultProps[propName];\n\t }\n\t }\n\t }\n\t {\n\t if (key || ref) {\n\t if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n\t var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\t if (key) {\n\t defineKeyPropWarningGetter(props, displayName);\n\t }\n\t if (ref) {\n\t defineRefPropWarningGetter(props, displayName);\n\t }\n\t }\n\t }\n\t }\n\t return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n\t}", "function el(type, ...value) {\n const newElement = document.createElement(type);\n if (typeof value[0] === 'string') {\n newElement.textContent = value[0];\n } else {\n value.forEach(e => newElement.appendChild(e));\n }\n return newElement;\n }", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}" ]
[ "0.68920434", "0.6835192", "0.6767826", "0.6757532", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.65640503", "0.65581757", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.63805515", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.6369105", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6335276", "0.6318601", "0.62708944", "0.6232016", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123" ]
0.0
-1
Return a function that produces ReactElements of a given type. See
function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getElementConstructor(type) {\n return JSXElement;\n }", "wrap(type = this.type, props) {\n if (props) {\n if (typeof props === \"string\") props = { className: props };\n else props = this.normalizeProps(props);\n }\n this.elements = [ React.createElement(type, props, ...this.elements) ];\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function whatTypeElement(P){\n const attrs = mkAttributs(P)\n if (_.indexOf($text_type, P.type)>-1){\n if (P.type === 'select') return mk_select(P)\n if (P.type == 'date') return mk_datepicker(P)\n if (P.type == 'span') return mk_span(P)\n if (P.type == 'textarea') return mk_textarea(P)\n if (_.indexOf($phold_type, P.type)>-1){\n return (\n <input\n ref={'#'+(P.id||P.name)}\n className='form_control'\n {...attrs}\n />\n )\n }\n\n return (\n <input\n ref={'#'+(P.id||P.name)}\n className='form_control'\n {...attrs}\n />\n )\n }\n\n if (_.indexOf($button_type, P.type)>-1){\n return (\n <input\n ref={'#'+(P.id||P.name)}\n className='btn'\n {...attrs}\n />\n )\n }\n}", "function elem(type){\n return document.createElement(type || 'div');\n }", "function makeElement(type) {\n\t\treturn document.createElement(type);\n\t}", "function element(type, props, ...children) {\n let e = document.createElement(type);\n if (typeof props != \"undefined\" && props != null) {\n Object.keys(props).forEach(key => e.setAttribute(key, props[key]));\n }\n if (typeof children != \"undefined\" && children != null) {\n children.forEach(child => e.appendChild(child));\n }\n return e;\n}", "function el(type, ...value) {\n const newElement = document.createElement(type);\n if (typeof value[0] === 'string') {\n newElement.textContent = value[0];\n } else {\n value.forEach(e => newElement.appendChild(e));\n }\n return newElement;\n }", "function buildElements(type,obj) {\n const element = document.createElement(type);\n for (let prop in obj) {\n element[prop] = obj[prop];\n }\n return element;\n}", "function CreateEl(type, props){\n elem = $(document.createElement(type));\n\n // Set properties to the element if any were passed\n if (Array.isArray(props))\n {\n props.forEach(propPair => { \n // set the properties if given a valid pair\n if (Array.isArray(propPair) && propPair.length >= 2)\n elem.prop(propPair[0], propPair[1]); \n });\n }\n\n return elem;\n}", "function componentWrapper(type) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n args.unshift(type);\n this.component.apply(this, args);\n };\n }", "function make(type) {\n\treturn document.createElement(type);\n}", "function renderElement() {\r\n const { type, uid, defaultValue, labelName, ...propsToSend } = element;\r\n const value = formState[uid] ? formState[uid] : defaultValue;\r\n const onBlur = (e) => onBlurHandler(uid, e.target.value);\r\n\r\n switch (type) {\r\n case TEXT:\r\n case EMAIL:\r\n case NUMBER:\r\n case PASSWORD:\r\n return (\r\n <>\r\n {labelName && renderLabel(element)}\r\n <Input\r\n type={type}\r\n id={uid}\r\n value={value}\r\n onBlur={onBlur}\r\n {...propsToSend}\r\n />\r\n </>\r\n );\r\n case CHECKBOX:\r\n return (\r\n <div className=\"flex\">\r\n {element.labelName && renderLabel(element)}\r\n <Checkbox id={uid} value={value} onBlur={onBlur} {...propsToSend} />\r\n </div>\r\n );\r\n case RADIO:\r\n return (\r\n <>\r\n {element.labelName && renderLabel(element)}\r\n <Radio id={uid} value={value} onBlur={onBlur} {...propsToSend} />\r\n </>\r\n );\r\n case SELECT:\r\n return (\r\n <Select id={uid} value={value} onBlur={onBlur} {...propsToSend} />\r\n );\r\n case TEXTAREA:\r\n return (\r\n <>\r\n {element.labelName && renderLabel(element)}\r\n <Textarea\r\n id={uid}\r\n value={value}\r\n onBlur={onBlur}\r\n {...propsToSend}\r\n rows=\"4\"\r\n cols=\"50\"\r\n />\r\n </>\r\n );\r\n default:\r\n return <></>;\r\n }\r\n }", "function generate_ele(type, arg){\n // Create element\n switch(type){\n case \"button\": case \"checkbox\": case \"radio\": case \"file\": case \"hidden\": case \"image\": case \"password\": case \"reset\": case \"submit\": case \"text\": case \"color\": case \"date\": case \"datetime\": case \"datetime-local\": case \"email\": case \"month\": case \"number\": case \"range\": case \"search\": case \"tel\": case \"time\": case \"url\": case \"week\":\n var ele = document.createElement('input');\n ele.type = type;\n break;\n default:\n var ele = document.createElement(type);\n }\n\n // Set attributes\n if(typeof arg !== 'undefined'){\n if(type == \"select\"){\n for (var i = 0; i < arg.value.length; i++) {\n option = document.createElement(\"OPTION\")\n option.setAttribute(\"value\", arg.value[i])\n if(arg.selected == arg.value[i]){\n option.setAttribute(\"selected\", \"selected\")\n }\n option.appendChild(document.createTextNode(arg.value[i]))\n ele.appendChild(option)\n }\n }\n else{\n ele.value = arg.value || \"\";\n }\n ele.id = arg.id || \"\";\n ele.className = arg.class || \"\";\n ele.htmlFor = arg.htmlfor || \"\"\n ele.name = arg.name || \"\"\n if(ele.tagName == \"LABEL\"){\n ele.appendChild(document.createTextNode(arg.lblText || \"label\"));\n }\n else if(ele.tagName == \"DIV\"){\n ele.appendChild(document.createTextNode(arg.innerText || \"\"));\n }\n }\n return ele\n}", "function elementFactory(data) {\n if (!data.hasOwnProperty(\"type\"))\n return null;\n let el = document.createElement(data.type);\n if (data.hasOwnProperty(\"class\"))\n $(el).addClass(data.class);\n if (data.hasOwnProperty(\"html\"))\n $(el).html(data.html);\n if (data.hasOwnProperty(\"css\"))\n $(el).css(data.css);\n if (data.hasOwnProperty(\"attr\")) {\n for (let key in data.attr) {\n if (!data.attr.hasOwnProperty(key))\n continue;\n $(el).attr(key, data.attr[key]);\n }\n }\n if (data.hasOwnProperty(\"on\")) {\n for (let key in data.on) {\n if (!data.on.hasOwnProperty(key))\n continue;\n $(el).on(key, { target: el }, data.on[key]);\n }\n }\n return el;\n}", "function createElement(type,config,children){var propName=void 0;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "createWrapped(type, props, content) {\n if (typeof props === \"string\") props = { className: props };\n let wrapper;\n if (Array.isArray(content)) return React.createElement(type, props, ...content);\n return React.createElement(type, props, content);\n }", "function UnderreactType() {}", "function elt(type, ...children) {\n let node = document.createElement(type);\n for (let child of children) {\n if (typeof child != \"string\") node.appendChild(child);\n else node.appendChild(document.createTextNode(child));\n }\n return node;\n}", "function el(type, content, attributes) {\n const result = document.createElement(type);\n\n if (attributes !== undefined) {\n Object.assign(result, attributes);\n }\n\n if (Array.isArray(content)) {\n content.forEach(append);\n } else {\n append(content);\n }\n\n function append(node) {\n if (typeof node === 'string') {\n node = document.createTextNode(node);\n }\n result.appendChild(node);\n }\n return result;\n }", "elementsOfType(types) {\n return _.chain(this.getTableEntries())\n .filter(e => {\n var elemType = getElemFieldVal(e, FIELD_TYPE);\n return _.includes(types, elemType);\n })\n .map(e => {\n return getElemFieldVal(e, FIELD_NAME);\n })\n .value();\n }", "function feFactory(createElement, FelaComponent) {\n return function fe(type) {\n for (var _len = arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n children[_key - 2] = arguments[_key];\n }\n\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (props) {\n var css = props.css,\n key = props.key,\n ref = props.ref,\n className = props.className,\n otherProps = _objectWithoutProperties(props, ['css', 'key', 'ref', 'className']);\n\n if (css) {\n return createElement(FelaComponent, {\n style: css,\n key: key,\n ref: ref\n }, function (renderProps) {\n return createElement.apply(undefined, [type, _extends({}, otherProps, {\n className: className ? className + ' ' + renderProps.className : renderProps.className\n })].concat(_toConsumableArray(children)));\n });\n }\n }\n\n return createElement.apply(undefined, [type, props].concat(_toConsumableArray(children)));\n };\n}", "function createNode(type, ...args) {\n const kind = typeof type;\n if (kind === 'string') {\n return Element(type, ...args);\n } else if (kind === 'function') {\n return type(...args);\n } else {\n throw InvalidArgValue(\n { type },\n 'should be an element name or component constructor'\n );\n }\n}", "function createElement(type,config,children){var propName;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "function createElement(type) {\n return document.createElement(type);\n }", "produce() {\n var listElem = [],\n uniqueKey = [];\n this.list.forEach(item => {\n var elem = <RenderElement elemkey={item.key} text={item.text} type={item.type} inlineStyleRanges={item.inlineStyleRanges}/>\n uniqueKey.push(item.key)\n listElem.push(elem)\n })\n return (this.list[0].type == \"unordered-list-item\" ? <ul key={uniqueKey.join(\"|\")}>{listElem}</ul> : <ol key={uniqueKey.join(\"|\")}>{listElem}</ol>)\n }", "function ElementList(props) {\n if (props.elements && props.elements.length >= 1) {\n const viewsiteId = props.viewsiteId;\n const viewpageId = props.viewpageId;\n const userTables = props.userTables;\n\n return props.elements.map((element, index) => {\n const _id = element._id;\n\n if (element.kind === \"text\") {\n // For Text Elements\n return (\n <li key={_id} id={_id + \",\" + viewpageId + \",\" + viewsiteId}>\n <TextElement\n viewsiteId={viewsiteId}\n viewpageId={viewpageId}\n element={element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}/>\n </li>\n );\n }\n else if (element.kind === \"header\") {\n // For Text Elements\n return (\n <li key={_id} id={_id + \",\" + viewpageId + \",\" + viewsiteId}>\n <HeaderElement\n key={_id}\n viewsiteId={viewsiteId}\n viewpageId={viewpageId}\n element={element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}/>\n </li>\n );\n }\n else if (element.kind === \"form\") {\n // For Form Elements\n return (\n <li key={_id} id={_id + \",\" + viewpageId + \",\" + viewsiteId}>\n <FormElement\n viewsiteId={viewsiteId}\n viewpageId={viewpageId}\n element={element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}\n onSetGlobalState={props.onSetGlobalState}/>\n </li>\n );\n }\n else if (element.kind === \"dataView\") {\n // For Data View Elements\n return (\n <li key={_id} id={_id + \",\" + viewpageId + \",\" + viewsiteId}>\n <DataViewElement\n viewsiteId={viewsiteId}\n viewpageId={viewpageId}\n element={element}\n userTables={userTables}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}/>\n </li>\n );\n } else if (element.kind === \"image\") {\n // For Image Elements\n return (\n <li key={_id} id={_id + \",\" + viewpageId + \",\" + viewsiteId}>\n <ImageElement\n viewsiteId={viewsiteId}\n viewpageId={viewpageId}\n element={element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}/>\n </li>\n );\n }\n });\n } else {\n return (\n <p>No Webpage Elements have been created yet!</p>\n );\n }\n}", "function elementCreator( type, id, className, value ){\n\t\t//Create element with it's class attribute, id and type\n\t\tvar button = addElement(type, className, id);\n\t\tif(value){\n\t\t\tbutton.innerHTML = value;\n\t\t}\n\t\treturn button;\n\t}", "function inputElGenerator(type , value){\n var inputElement = document.createElement('input')\n inputElement.setAttribute('type' , type)\n inputElement.setAttribute('value' , value)\n return inputElement\n}", "function $createElement(objType) {\r\n\t\treturn $(document.createElement(objType));\r\n\t}", "function getElement(type, className)\n{\n var div = document.createElement(type);\n if (className) div.setAttribute(\"class\", className);\n return div\n}", "function createElement(elementType, classNames = '', attributes = {}, innerHTML = '') {\n const elementObject = document.createElement(elementType);\n if (classNames) elementObject.classList.add(...(classNames.split(' ')));\n Object.keys(attributes).forEach((attribute) => {\n elementObject.setAttribute(attribute, attributes[attribute]);\n });\n elementObject.innerHTML = innerHTML;\n return elementObject;\n}", "function buildElement(elementType, options) {\n if (!Element.prototype.toggleClass) {\n addClassToggleToElements();\n }\n\n var newElement = document.createElement(elementType); // if (typeof options !== \"object\" || options instanceof Array)\n // return undefined;\n\n var classes = getNestedProperty(options, \"classes\", false);\n var attributes = getNestedProperty(options, \"attributes\", false);\n var id = getNestedProperty(options, \"id\", false);\n\n if (classes.length) {\n classes.forEach(function(c) {\n return newElement.toggleClass(c);\n });\n }\n\n if (attributes.length) {\n attributes.forEach(function(a) {\n return newElement.toggleClass(a);\n });\n }\n\n if (id) {\n newElement.id = id;\n }\n\n return newElement;\n }", "function createElement (type, props, ...children) {\n if (props.class) {\n processClasses(props.class)\n }\n return createDOMElement(type, props, ...children)\n}", "getElementsByType(type) {\n if (!this[$elementsByType].has(type)) {\n return [];\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Array.from(this[$elementsByType].get(type));\n }", "function getResolvedJsxType(node, elemType, elemClassType) {\n if (!elemType) {\n elemType = checkExpression(node.tagName);\n }\n if (elemType.flags & 524288 /* Union */) {\n var types = elemType.types;\n return getUnionType(types.map(function (type) {\n return getResolvedJsxType(node, type, elemClassType);\n }), /*subtypeReduction*/ true);\n }\n // If the elemType is a string type, we have to return anyType to prevent an error downstream as we will try to find construct or call signature of the type\n if (elemType.flags & 2 /* String */) {\n return anyType;\n }\n else if (elemType.flags & 32 /* StringLiteral */) {\n // If the elemType is a stringLiteral type, we can then provide a check to make sure that the string literal type is one of the Jsx intrinsic element type\n var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);\n if (intrinsicElementsType !== unknownType) {\n var stringLiteralTypeName = elemType.text;\n var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);\n if (intrinsicProp) {\n return getTypeOfSymbol(intrinsicProp);\n }\n var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0 /* String */);\n if (indexSignatureType) {\n return indexSignatureType;\n }\n error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, \"JSX.\" + JsxNames.IntrinsicElements);\n }\n // If we need to report an error, we already done so here. So just return any to prevent any more error downstream\n return anyType;\n }\n // Get the element instance type (the result of newing or invoking this tag)\n var elemInstanceType = getJsxElementInstanceType(node, elemType);\n if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {\n // Is this is a stateless function component? See if its single signature's return type is\n // assignable to the JSX Element Type\n if (jsxElementType) {\n var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */);\n var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];\n var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);\n var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));\n if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {\n // Intersect in JSX.IntrinsicAttributes if it exists\n var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);\n if (intrinsicAttributes !== unknownType) {\n paramType = intersectTypes(intrinsicAttributes, paramType);\n }\n return paramType;\n }\n }\n }\n // Issue an error if this return type isn't assignable to JSX.ElementClass\n if (elemClassType) {\n checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);\n }\n if (isTypeAny(elemInstanceType)) {\n return elemInstanceType;\n }\n var propsName = getJsxElementPropertiesName();\n if (propsName === undefined) {\n // There is no type ElementAttributesProperty, return 'any'\n return anyType;\n }\n else if (propsName === \"\") {\n // If there is no e.g. 'props' member in ElementAttributesProperty, use the element class type instead\n return elemInstanceType;\n }\n else {\n var attributesType = getTypeOfPropertyOfType(elemInstanceType, propsName);\n if (!attributesType) {\n // There is no property named 'props' on this instance type\n return emptyObjectType;\n }\n else if (isTypeAny(attributesType) || (attributesType === unknownType)) {\n // Props is of type 'any' or unknown\n return attributesType;\n }\n else if (attributesType.flags & 524288 /* Union */) {\n // Props cannot be a union type\n error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));\n return anyType;\n }\n else {\n // Normal case -- add in IntrinsicClassElements<T> and IntrinsicElements\n var apparentAttributesType = attributesType;\n var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes);\n if (intrinsicClassAttribs !== unknownType) {\n var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);\n if (typeParams) {\n if (typeParams.length === 1) {\n apparentAttributesType = intersectTypes(createTypeReference(intrinsicClassAttribs, [elemInstanceType]), apparentAttributesType);\n }\n }\n else {\n apparentAttributesType = intersectTypes(attributesType, intrinsicClassAttribs);\n }\n }\n var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes);\n if (intrinsicAttribs !== unknownType) {\n apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType);\n }\n return apparentAttributesType;\n }\n }\n }", "tagFor(type) {\n return elementTagsByType.get(type);\n }", "function ComponentType(){}", "function Hello({ color, name }) {\r\n return <div style={{ color: color }}>Hello {name}</div>;\r\n // needs to return only 1 component, usually covered in div tag\r\n\r\n // <div>{a}</div>\r\n // this returns a, a javascript element defined.\r\n}", "static toEl(x) {\n if (x instanceof Function) {\n x = x();\n }\n if (!(x instanceof Element)) {\n x = Element.Scalar(x);\n }\n return x;\n }", "betterCreateElement(type, moreFlags) {\n\n let el = document.createElement(type);\n\n if (type.substring(0, \"functionResult\".length) == \"functionResult\") {\n el.appendChild(window[type.split(\"-\")[1]]());\n }\n\n if (!isNullOrUndefined(moreFlags)) {\n\n for (let i = 0; i < moreFlags.length; i++) {\n\n let keyname = moreFlags[i][0];\n let content = moreFlags[i][1];\n\n // special flag used to register an element to dynamic resizyng\n if (keyname == \"$responsive\") {\n this.elementsRegisteredForDynamicResize.push(el);\n el.setAttribute('responsive', content);\n }\n // standard flags\n else {\n // you can init a flag with a '$_' to call a function named as\n // the rest of the string e.g: $foo will call foo() and init content with the\n // returned value\n if (content.substring(0, \"$\".length) == \"$\") {\n try {\n content = window[content.substring(\"$\".length)]();\n } catch (e) {\n content = \"\";\n }\n }\n\n if (keyname.substring(0, 2) != \"on\") {\n el[keyname] = content;\n } else {\n el.setAttribute(keyname, content);\n }\n }\n }\n }\n\n return el;\n }", "function wrapElement(element) {\n return props => React.createElement(element, filterProps(props));\n}", "getHTMLElement() {\n if (this.type === TEXT) {\n return this.createHTMLText();\n }\n else if (this.type === IMAGE) {\n return this.createHTMLImage();\n }\n else if (this.type === VIDEO) {\n return this.createHTMLVideo();\n }\n else {\n console.error(\"This is not a correct element\");\n }\n }", "function _createElement(type, className) {\n const el = document.createElement(type);\n\n if (className) {\n el.className = className;\n }\n return el;\n}", "function createElements() {\n var nodeNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nodeNames[_i] = arguments[_i];\n }\n return nodeNames.map(function (name) { return document.createElement(name); });\n }", "function ComponentType() {}", "function elementType() {\n var node = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var name = node.name;\n\n\n if (!name) {\n throw new Error('The argument provided is not a JSXElement node.');\n }\n\n if (name.type === 'JSXMemberExpression') {\n var object = name.object;\n var property = name.property;\n\n return object.name + '.' + property.name;\n } else if (name.type === 'JSXNamespacedName') {\n return name.namespace.name + ':' + name.name.name;\n }\n\n return node.name.name;\n}", "createDOMElement(type, content = '', className = '') {\n let element = document.createElement(type);\n if (className) {\n element.setAttribute('class', className);\n }\n element.innerHTML = content;\n return element;\n }", "function create_ui_element(type, id, classes) {\n\tvar new_elt = $(document.createElement(type));\n\tnew_elt.attr(\"id\", id);\n\tnew_elt.addClass(classes);\n\treturn new_elt;\n}", "getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}></${tagName}>`;\n }", "getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}></${tagName}>`;\n }", "getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}></${tagName}>`;\n }", "getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}></${tagName}>`;\n }", "function findRenderedComponent(componentTypes) {\n const component = TestUtils.findRenderedComponentWithType(\n componentTypes[0],\n componentTypes[1]\n );\n\n return componentTypes.length === 2\n ? component\n : findRenderedComponent([].concat(component, componentTypes.slice(2)));\n}", "function createReactElement(component) {\n\treturn {\n\t\ttype: component.constructor,\n\t\tkey: component.key,\n\t\tref: null, // Unsupported\n\t\tprops: component.props\n\t};\n}", "function buildElement(elementType, classes, id, htmlContent) {\n let element = document.createElement(elementType);\n element.className = classes;\n element.id = id;\n element.innerHTML = htmlContent;\n return element;\n}", "function CreateHTMLElement(type, id, value, appendTo, cssStyle, attributeList) {\n var _type = document.createElement(type);\n _type.id = id;\n _type.style = cssStyle;\n if (value) _type.innerText = value;\n \n for (var key in attributeList) {\n _type.setAttribute(key, attributeList[key]);\n }\n appendTo.appendChild(_type);\n return _type;\n}", "function getElement(e, type){\n\t\tif(e.tagName && e.tagName == type){\n\t\t\tvar el = $(e);\n\t\t}else{\n\t\t\te.stop();\n\t\t\tvar el = e.findElement(type);\n\t\t}\n\t\treturn el;\n\t}", "function render(element) {\n return {\n test: function(testFunc){\n return function(){\n testFunc(jsxTemplating.render(element));\n };\n\t}\n };\n }", "getElements(Element){\n let curTableEntries = store.getState().tableEntries\n let elements = []\n let renderCategories;\n\n const arr24 = [...Array(24)] //a temporary 24-slot array for the 24 slots per category\n // create a 2D array of the edits that contains JSX elements\n renderCategories = categories.map(category => (\n arr24.map((date, i) => {\n const flattenedKey = [this.props.yr, i, category].join(\", \")\n const value = curTableEntries[flattenedKey] || ''\n return (<Element key={[this.props.yr, i, category].join(\"_\")}\n position={{i, category, year: this.props.yr}}\n clicked={this.clicked}\n content={value}/>)\n })\n ))\n // convert the renderCategories 2D array into a renderable 1D mapping array (with div wrappers)\n for(let i = 0; i < categories.length; i++){\n elements.push((\n <div className={categories[i]}>\n <TrackVisibility>\n <TableLabel label={categories[i]}/>\n </TrackVisibility>\n <div className=\"info\">\n {renderCategories[i]}\n </div>\n </div>\n ))\n }\n return elements\n }", "function renderDropDownType(types) {\n let formElement = document.getElementsByClassName(\"filters\")[0];\n\n let selectElement = document.createElement(\"select\");\n selectElement.setAttribute(\"name\", \"select-type\");\n selectElement.classList.add(\"filterElement\");\n let defaultElement = document.createElement(\"option\");\n defaultElement.setAttribute(\"value\", \"\");\n defaultElement.innerHTML = \"All Event Types\";\n selectElement.appendChild(defaultElement);\n Object.keys(types).sort().forEach(slug => {\n let optionElement = document.createElement(\"option\");\n optionElement.setAttribute(\"value\", slug);\n optionElement.innerHTML = types[slug];\n selectElement.appendChild(optionElement);\n });\n formElement.appendChild(selectElement);\n}", "create(...t) {\n let s = new r;\n for (const r of t) if (\"string\" == typeof r) s.push(document.createElement(r)); else if (r instanceof Object) {\n const t = document.createElement(r.tagName || \"div\");\n r.content && (Array.isArray(r.content) ? e$1(t, ...r.content) : e$1(t, r.content)), \n s.push(t);\n }\n return s;\n }", "function generateTypeSelector(allType, types) {\n var resultDiv = doc.createElement(\"div\");\n\n resultDiv.appendChild(doc.createTextNode(\"Select type: \"));\n\n var dropdown = doc.createElement(\"select\");\n\n dropdown.appendChild(optionElement(\"All types\", \"null\"));\n\n for (var uri in types) {\n dropdown.appendChild(optionElement(types[uri].getLabel(), uri));\n }\n\n dropdown.addEventListener(\"click\", function() {\n var type;\n\n if (dropdown.value == \"null\") {\n type = allType;\n } else {\n type = types[dropdown.value];\n }\n\n typeSelectorChanged(type);\n }, false);\n\n resultDiv.appendChild(dropdown);\n\n return resultDiv;\n }", "createElement(type, props = {}, children) {\r\n return {\r\n type,\r\n props: children ? { ...props, children } : props\r\n };\r\n }", "function createInputPseudo(type) {\n return function(elem) {\n var name = elem.nodeName.toLowerCase();\n return name === \"input\" && elem.type === type;\n };\n }", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function Button(){\n return <button>test</button>\n}", "function eateryElements(cuisine, onChange, eateryUrl, searchUrl) {\n return [\n <form key=\"select\">\n <label htmlFor=\"cuisine\">Choose cuisine</label>\n <select id=\"cuisine\" onChange={onChange} value={cuisine}>\n <option value=''>Select</option>\n <option>American</option>\n <option>Chinese</option>\n <option>Indian</option>\n <option>Mexican</option>\n </select>\n </form>,\n\n <div key=\"results\" id=\"results\">\n <eatery-results url={searchUrl} >\n </eatery-results>\n <eatery-details eatery-url={eateryUrl}>\n </eatery-details>\n </div>\n ];\n}", "function isElementOfType(element, Component) {\n var _element$props;\n\n if (element == null || ! /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(element) || typeof element.type === 'string') {\n return false;\n }\n\n const {\n type: defaultType\n } = element; // Type override allows components to bypass default wrapping behavior. Ex: Stack, ResourceList...\n // See https://github.com/Shopify/app-extension-libs/issues/996#issuecomment-710437088\n\n const overrideType = (_element$props = element.props) == null ? void 0 : _element$props.__type__;\n const type = overrideType || defaultType;\n const Components = Array.isArray(Component) ? Component : [Component];\n return Components.some(AComponent => typeof type !== 'string' && isComponent(AComponent, type));\n} // Returns all children that are valid elements as an array. Can optionally be", "tagMaker() {\n const isHtmlNode = () => {\n return true;\n };\n const isAttribMap = () => {\n return true;\n };\n var notEmpty = (x) => {\n if ((typeof x === 'undefined') ||\n (x === null) ||\n x.length === 0) {\n return false;\n }\n return true;\n };\n var maker = (name, defaultAttribs = {}) => {\n var tagFun= (attribs, children) => {\n let node = '<';\n\n // case 1. one argument, first may be attribs or content, but attribs if object.\n if (typeof children === 'undefined') {\n if (typeof attribs === 'object' &&\n ! (attribs instanceof Array) &&\n isAttribMap(attribs)) {\n if (Object.keys(attribs).length === 0) {\n node += name;\n } else {\n const tagAttribs = this.attribsToString(this.mergeAttribs(attribs, defaultAttribs));\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n }\n node += '>';\n // case 2. arity 1, is undefined\n } else if (typeof attribs === 'undefined') {\n const tagAttribs = this.attribsToString(defaultAttribs);\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n node += '>';\n // case 3: arity 1, is content\n } else if (isHtmlNode(attribs)) {\n const tagAttribs = this.attribsToString(defaultAttribs);\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n node += '>' + this.renderChildren(attribs);\n }\n // case 4. arity 2 - atribs + content\n } else if (isAttribMap(attribs) && isHtmlNode(children)) {\n if (Object.keys(attribs).length === 0) {\n node += name;\n } else {\n const tagAttribs = this.attribsToString(this.mergeAttribs(attribs, defaultAttribs));\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n }\n node += '>' + this.renderChildren(children);\n }\n node += '</' + name + '>';\n return node;\n };\n return tagFun;\n };\n return maker;\n }", "function makeNode (type = 'div') {\n return document.createElement(type)\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}" ]
[ "0.68819296", "0.6601521", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.65016764", "0.6265616", "0.6179337", "0.594783", "0.59200126", "0.58835655", "0.5865281", "0.57792324", "0.5642274", "0.5633928", "0.5621612", "0.56061965", "0.5597373", "0.5595673", "0.5595348", "0.5572211", "0.55705494", "0.55391765", "0.55349886", "0.54823875", "0.5470348", "0.5456291", "0.5452981", "0.54485315", "0.5435072", "0.54220355", "0.5383561", "0.5370912", "0.5333879", "0.5332346", "0.5317785", "0.530413", "0.5264036", "0.52604496", "0.52595186", "0.5257152", "0.5250527", "0.5236091", "0.52355546", "0.5230196", "0.52243495", "0.5205658", "0.52046186", "0.5191248", "0.51733065", "0.51424927", "0.5113323", "0.5110865", "0.5110865", "0.5110865", "0.5110865", "0.50971943", "0.50904274", "0.5085448", "0.50566435", "0.50524247", "0.50394326", "0.50217843", "0.50169945", "0.5015957", "0.5014808", "0.50132596", "0.5011006", "0.5002912", "0.5002912", "0.5002912", "0.5002912", "0.5002912", "0.5000624", "0.49894607", "0.49755767", "0.49554273", "0.4951283", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847", "0.49509847" ]
0.0
-1
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element, config, children) { !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; var propName = void 0; // Original props are copied var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a // transpiler, and the original source is probably a better indicator of the // true owner. var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; if (config != null) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { key = '' + config.key; } // Remaining properties override existing props var defaultProps = void 0; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self, source, owner, props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+element+\".\");}}var propName;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else {props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps=void 0;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else{props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\n 'React.cloneElement(...): The argument must be a React element, but you passed ' +\n element +\n '.',\n );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (\n hasOwnProperty.call(config, propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)\n ) {\n if (\n config[propName] === undefined &&\n defaultProps !== undefined\n ) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(\n element.type,\n key,\n ref,\n self,\n source,\n owner,\n props,\n );\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n var propName;\n // Original props are copied\n var props = _assign({}, element.props);\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : undefined;\n\n var propName = undefined;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = undefined;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, props) {\n if (props.style && element.props.style) {\n props.style = _objectSpread({}, element.props.style, {}, props.style);\n }\n\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n\n return _react.default.cloneElement(element, props);\n}" ]
[ "0.69129634", "0.68905437", "0.6693122", "0.6693122", "0.66918975", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.664537", "0.6632562", "0.6612735", "0.6612735", "0.6612735", "0.6612735", "0.6612735", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6610448", "0.6607492", "0.6594742", "0.6594742", "0.6594742", "0.6584553", "0.6580949", "0.65430236", "0.65396273", "0.65396273", "0.65396273", "0.65396273", "0.65306455", "0.6524592", "0.6524592", "0.6524592", "0.6524592", "0.65208274" ]
0.6517866
100
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, function (child) { return child; }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;});return result;}", "function toArray(children){return mapChildren(children,function(child){return child;})||[];}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function(\n child,\n ) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n return mapChildren(children, function(child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}" ]
[ "0.77542424", "0.75192744", "0.743348", "0.74058104", "0.74058104", "0.74058104", "0.74058104", "0.74058104", "0.74058104", "0.7396765", "0.7396765", "0.7396765", "0.7395814", "0.7395814", "0.7395814", "0.7395814", "0.7395814", "0.7395814", "0.7395814", "0.7395814", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.73823273", "0.7342845", "0.73061836", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403", "0.7304403" ]
0.73997086
23
This is a dummy function to check if the function name has been altered by minification. If the function has been minified and NODE_ENV !== 'production', warn the user.
function isCrushed() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uglify(name) {\n console.log(\"Hello \" + name);\n}", "function keepNonMinified(file) {\n\tvar keep = true;\n\tif(file.path.match('.js$')) {\n\t\tvar minPath = file.path.replace('.js', '.min.js');\n\t\tkeep = !exists(minPath);\n\t}\n\treturn keep;\n}", "function markFuncFreeze(fun, opt_name) {\n // inline: enforceType(fun, 'function', opt_name);\n if (typeOf(fun) !== 'function') {\n fail('expected function instead of ', typeOf(fun),\n ': ', (opt_name || fun));\n }\n\n // inline: if (isCtor(fun)) {\n if (fun.CONSTRUCTOR___) {\n fail(\"Constructors can't be simple functions: \", fun);\n }\n // inline: if (isXo4aFunc(fun)) {\n if (fun.XO4A___) {\n fail(\"Exophoric functions can't be simple functions: \", fun);\n }\n fun.FUNC___ = opt_name ? String(opt_name) : true;\n return primFreeze(fun);\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"d\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"e\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warn(message) {\n if (_warningCallback && \"dev\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function cleanFunctionName(functionName) {\n var ignoredPrefix = 'non-virtual thunk to ';\n if (functionName.startsWith(ignoredPrefix)) {\n return functionName.substr(ignoredPrefix.length);\n }\n return functionName;\n}", "minify() {\n\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "isFileCompressed(file) {\n var dir = path.dirname(file);\n var basename = path.basename(file);\n\n if(this.isScript(basename) || this.isCss(basename) || this.isLess(basename)) {\n if(basename == 'script.js') {\n var compressedName = dir + '/script.min.js';\n } else if(basename == 'styles.css') {\n var compressedName = dir + '/styles.min.css';\n } else if(basename == 'style.css') {\n var compressedName = dir + '/style.min.css';\n } else if(this.isLess(basename)) {\n var compressedName = '../www/local/templates/bootstrap3/styles.css';\n }\n // var compressedName = (basename == 'script.js') ? dir + '/script.min.js' : dir + '/style.min.css';\n\n return this.isDateActual(file, compressedName);\n } else {\n return false;\n }\n }", "function isFallbackFunction(f) {\n return !f.name\n}", "function functionWithoutJSDocWarningsBecauseTheSectionWasCompletelyExcluded() {\n console.log('ASHLDKFJHASKFJSDHFKJSDHFKLSDJHFLJKSDHFLKSDJFHKSDLJFHLSDKJF')\n return true\n}", "isPackedFunc(func) {\n // eslint-disable-next-line no-prototype-builtins\n return typeof func == \"function\" && func.hasOwnProperty(\"_tvmPackedCell\");\n }", "function warn(message) {\n if (_warningCallback && \"development\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function checkFunction(fn) {\n return typeof fn === 'function';\n }", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isProduction() {\n return argv.production\n}", "function isDev() {\n return (process.env.NODE_ENV !== 'production')\n}", "function isDev(fn) {\n if (devMode) {\n return fn;\n } else {\n return passthrough();\n }\n}", "function onValidateGLFunc( functionName, functionArgs ) {\n let functionString;\n if ( log.priority >= 4 ) {\n functionString = getFunctionString( functionName, functionArgs );\n log.info( 4, functionString );\n }\n\n if ( log.break ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n const isBreakpoint = log.break &&\n log.break.every( breakOn => functionString.indexOf( breakOn ) !== -1 );\n if ( isBreakpoint ) {\n debugger; // eslint-disable-line\n }\n }\n\n for ( const arg of functionArgs ) {\n if ( arg === undefined ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n if ( log.throw ) {\n throw new Error( `Undefined argument: ${functionString}` );\n } else {\n log.error( `Undefined argument: ${functionString}` );\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function can_mangle(name) {\n if (unmangleable.indexOf(name) >= 0) return false;\n if (reserved.indexOf(name) >= 0) return false;\n if (options.only_cache) {\n return cache.props.has(name);\n }\n if (/^-?[0-9]+(\\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false;\n return true;\n }", "function onValidateGLFunc(functionName, functionArgs) {\n let functionString;\n if (log.priority >= 4) {\n functionString = getFunctionString(functionName, functionArgs);\n log.log(4, functionString)();\n }\n\n if (log.break) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n const isBreakpoint =\n log.break && log.break.every(breakOn => functionString.indexOf(breakOn) !== -1);\n if (isBreakpoint) {\n debugger; // eslint-disable-line\n }\n }\n\n for (const arg of functionArgs) {\n if (arg === undefined) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n if (log.throw) {\n throw new Error(`Undefined argument: ${functionString}`);\n } else {\n log.error(`Undefined argument: ${functionString}`)();\n log.error(`Undefined argument: ${functionString}`)();\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function untestableFilter(mockName) {\n var cond =\n !(\n mockName === 'font-wishlist' ||\n mockName.indexOf('mapbox_') !== -1\n );\n\n if(!cond) console.log(' -', mockName);\n\n return cond;\n}", "function isProductionBuild() {\n return process.env.NODE_ENV === 'production';\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (isProduction()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!isTest()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function function_exists(function_name)\n{\n if (typeof function_name == 'string')\n return (typeof window[function_name] == 'function');\n return (function_name instanceof Function);\n}", "function warn(message) {\n if (_warningCallback && process.env.NODE_ENV !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isProdMode() {\n return process.env.NODE_ENV == 'production';\n}", "function funcName(func) {\n return func.name || \"{anonymous}\"\n }", "function checkIfFunction(func) {\n return typeof func === \"function\";\n}", "function getFunctionName( func ){\n\n\ttry {\n\t\tfunc = func.substr('function '.length);\n\t \tfunc = func.substr(0, func.indexOf('('));\n\n\t\tif( func == \"\" ) func = \"ANONYMOUS_FUNC\";\n\t\tif( func.indexOf( \"=>\" ) >= 0 ) func = \"ANONYMOUS_FUNC\";\n\n\t\treturn func;\n\t} catch( err ){\n\t\tconsole.log( \"\\x1b[31m%s\\x1b[0m\", \"[summer-mvc core]\", \"[logger.js]\", err );\n\t\tthrow err;\n\t}\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function checkFunctions(func1, func2) {\n if (func1.toString() !== func2.toString()) return false;\n return true;\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"production\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function unusedFragMessage(fragName) {\n return 'Fragment \"' + fragName + '\" is never used.';\n}", "function showSpecialWarning() {\r\n return true;\r\n}", "function has_bugs(buggy_code) {\n if (buggy_code) {\n return 'sad days'\n } else {\n return 'it\\'s a good day'\n }\n }", "function function_exists(function_name)\n{\n\tif (typeof function_name == 'string')\n\t\treturn (typeof window[function_name] == 'function');\n\treturn (function_name instanceof Function);\n}", "function StupidBug() {}", "function functionTest(){\n 'use strict';\n console.log(this===window);\n}", "function unusedFragMessage(fragName) {\n return \"Fragment \\\"\".concat(fragName, \"\\\" is never used.\");\n}", "function isDeployment() {\n return !isDev()\n}", "warn() {}", "function getMinimizerConfig() {\n return global.FOO_PROD\n ? [\n new UglifyJsPlugin({\n uglifyOptions: {\n parse: {\n html5_comments: false\n },\n comments: false,\n compress: {\n warnings: false,\n drop_console: true,\n drop_debugger: true\n }\n },\n extractComments: true\n })\n ]\n : [];\n}", "function DEBUG2() {\n if (d) {\n console.warn.apply(console, arguments)\n }\n}", "function checkInstrumented() {\n if (proto['__gl_wrapped__']) {\n return false;\n }\n Object.defineProperty(proto, '__gl_wrapped__', {\n 'configurable': true,\n 'enumerable': false,\n 'value': true\n });\n contextRestoreFns.push(function() {\n delete proto['__gl_wrapped__'];\n });\n return true;\n }", "function existFunction(strNameFunction)\n{\n return (!empty(window[strNameFunction])) ? isFunction(window[strNameFunction]) : false;\n}", "function someFunc() {}", "minifyOneFile () {\n throw new Error('CachingMinifier subclass should implement minifyOneFile!');\n }", "function myReusableFunction(){\n console.log(\"Heyya World\");\n}", "function isHotswappableLambdaFunctionChange(logicalId, change, assetParamsWithEnv) {\n var _a, _b;\n const lambdaCodeChange = isLambdaFunctionCodeOnlyChange(change, assetParamsWithEnv);\n if (typeof lambdaCodeChange === 'string') {\n return lambdaCodeChange;\n }\n else {\n // verify that the Asset changed - otherwise,\n // it's a Code property-only change,\n // but not to an asset change\n // (for example, going from Code.fromAsset() to Code.fromInline())\n if (!common_1.assetMetadataChanged(change)) {\n return common_1.ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT;\n }\n let functionPhysicalName;\n try {\n functionPhysicalName = common_1.stringifyPotentialCfnExpression((_b = (_a = change.newValue) === null || _a === void 0 ? void 0 : _a.Properties) === null || _b === void 0 ? void 0 : _b.FunctionName, assetParamsWithEnv);\n }\n catch (e) {\n // It's possible we can't evaluate the function's name -\n // for example, it can use a Ref to a different resource,\n // which we wouldn't have in `assetParamsWithEnv`.\n // That's fine though - ignore any errors,\n // and treat this case the same way as if the name wasn't provided at all,\n // which means it will be looked up using the listStackResources() call\n // by the later phase (which actually does the Lambda function update)\n functionPhysicalName = undefined;\n }\n return new LambdaFunctionHotswapOperation({\n logicalId,\n physicalName: functionPhysicalName,\n code: lambdaCodeChange,\n });\n }\n}", "function staticallyAnalyze(fn) {\n const report = {\n isAsync: false,\n hasInjectionParam: false,\n injections: [/* alias1, alias2, ... */],\n wantsContainer: false,\n wantedBindingMethods: [],\n // fn, // The function itself\n };\n\n // NOTE Here we say this is a proper function to Esprima\n // since it throws error if the function string like;\n // `boot() { ... }`\n let bootFnStr = fn.toString();\n if (/^(\\w+)\\(([\\w,\\s{}:\\'\\\"]*)\\)\\s{0,1}\\{(?!\\w+)/.test(bootFnStr)) {\n bootFnStr = `function ${bootFnStr}`;\n }\n let pb0 = (esprima.parseScript(bootFnStr)).body[0];\n if (pb0.type !== 'FunctionDeclaration' && pb0.expression) {\n pb0 = pb0.expression;\n }\n\n report.isAsync = pb0.async;\n\n // TODO Loop here at most 2 times (hence the note above)\n // Therefore we can enter the if statement's body below (~:335)\n const maxArgumentCountToProcess = (pb0.params.length < 2 ? pb0.params.length : 2);\n let i = 0;\n while (i < maxArgumentCountToProcess) {\n if (pb0.params[i].type === 'ObjectPattern') {\n // First argument is defined as `{ ... }`\n\n // Extract property names\n //\n const propertyNames = pb0.params[i].properties.map((property) => {\n // TODO Figure out the checks below is really necessary - if not simplify this arrow function\n if (property.computed) {\n throw new Error(`Computed property names (${property.key.name}) are not supported.`);\n }\n if (property.method) {\n throw new Error(`Methods (${property.key.name}) are not supported.`);\n }\n\n return (property.key.name || property.key.value);\n });\n\n // FIXME [MANUALNAME_INJECTABLE]: Manual update required here to sustain consistency\n // See https://stackoverflow.com/a/1885569/250453\n const containerLikeIntersection = [\n 'bind',\n 'singleton',\n 'instance',\n 'make',\n 'callInKernelContext',\n 'paths',\n 'on',\n 'once',\n 'off',\n 'emit',\n // Add Mirket methods that can be injected to the `boot()` of a provider\n ].filter(value => propertyNames.indexOf(value) !== -1);\n\n // NOTE Maybe here we can validate each type of argument's number in the list,\n // e.g. if argument list is like this; `({ binding1 }, container, { instance })\n // do NOT send the container as the 2nd or 3rd argument.\n if (containerLikeIntersection.length > 0) {\n // NOTE Just one container-related method name (e.g. 'bind', 'singleton', 'instance')\n // is enough to say that it want the container.\n report.wantsContainer = true;\n report.wantedBindingMethods.push(...containerLikeIntersection);\n\n // TODO Figure out what to do with others?\n } else {\n report.hasInjectionParam = true;\n report.injections.push(...propertyNames);\n }\n }\n\n i += 1;\n }\n\n return report;\n}", "function isValidExtensionFunction(fn) {\n const reflectionResult = functionReflector.forFunction(fn);\n\n return reflectionResult.params.length === 0\n || (reflectionResult.params[0].type === `DESTRUCTURING`\n && reflectionResult.params[0].value.type === `object`);\n}", "function functionExists(function_name)\n\t{\n\t\t// https://kvz.io/\n\t\t// + original by: Kevin van Zonneveld (https://kvz.io/)\n\t\t// + improved by: Steve Clay\n\t\t// + improved by: Legaev Andrey\n\t\t// * example 1: function_exists('isFinite');\n\t\t// * returns 1: true\n\t\tif (typeof function_name == 'string')\n\t\t{\n\t\t\treturn (typeof window[function_name] == 'function');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (function_name instanceof Function);\n\t\t}\n\t}", "function funcname(f) {\n const s = f.toString().match(/function (\\w*)/)[1];\n if ((s === null) || (s.length === 0)){ return \"~anonymous~\";}\n return s;\n}", "function strictly() {\n 'use strict';\n\n}", "function test(fn) {\n return Object.defineProperty(fn, \"name\", {\n enumerable: false,\n configurable: true,\n value: \"@\" + fn.name,\n writable: false\n });\n}", "diagnosticDetectFunctionCollisions(file) {\n for (let func of file.callables) {\n const funcName = func.getName(Parser_1.ParseMode.BrighterScript);\n const lowerFuncName = funcName === null || funcName === void 0 ? void 0 : funcName.toLowerCase();\n if (lowerFuncName) {\n //find function declarations with the same name as a stdlib function\n if (globalCallables_1.globalCallableMap.has(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.scopeFunctionShadowedByBuiltInFunction()), { range: func.nameRange, file: file }));\n }\n //find any functions that have the same name as a class\n if (this.hasClass(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.functionCannotHaveSameNameAsClass(funcName)), { range: func.nameRange, file: file }));\n }\n }\n }\n }", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function _checkForUnused() {\n // function params are handled specially\n // assume that parameters are the only thing declared in the param scope\n if (_current[\"(type)\"] === \"functionparams\") {\n _checkParams();\n return;\n }\n var curentLabels = _current[\"(labels)\"];\n for (var labelName in curentLabels) {\n if (curentLabels[labelName][\"(type)\"] !== \"exception\" &&\n curentLabels[labelName][\"(unused)\"]) {\n _warnUnused(labelName, curentLabels[labelName][\"(token)\"], \"var\");\n }\n }\n }", "function formatProdErrorMessage(code){var url='https://reactjs.org/docs/error-decoder.html?invariant='+code;for(var i=1;i<arguments.length;i++){url+='&args[]='+encodeURIComponent(arguments[i]);}return \"Minified React error #\"+code+\"; visit \"+url+\" for the full message or \"+'use the non-minified dev environment for full errors and additional '+'helpful warnings.';}// TODO: this is special because it gets imported during build.", "function f() {\n \"Make sure `this` is unusable in this standalone function.\";\n}", "function check_for_anonymous_functions(){\n\t\n\t// For completing the starting block\n\tfunc_name = '';\n\tfunc_stack = [];\n\n\tfor (var i = 0; i < program_stack.length; i++) {\n\t\tif(program_stack[i] == 'invoke-fun-pre_'){\n\t\t\t\n\t\t\t//If the program starts with a self-invokating function then add \"anonymous\" keyword which will help in further processing\n\t\t\tif(i == 0){\n\t\t\t\tfunc_stack.push(\"anonymous\");\n\t\t\t\tprogram_stack[i] = program_stack[i] + \"anonymous\";\n\t\t\t\tfunction_list.push(\"anonymous\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// For anonymous functions without names assign them the names to which these functions are assigned.\n\t\t\tfunc_name = program_stack[i-1].split('_').splice(-1)[0];\n\t\t\tprogram_stack[i] = program_stack[i] + func_name;\n\t\t\tfunction_list.push(func_name);\n\t\t\tfunc_stack.push(func_name);\t\t\n\t\t}\n\n\t\t//Completing the program stack block ending with appropriate keywords for anonymous functions.\n\t\tif(program_stack[i] == 'invoke-fun_'){\n\t\t\tprogram_stack[i] = program_stack[i] + func_stack.pop();\n\t\t}\n\t};\t\t\n\n}", "function ourReusableFunction() {\r\n console.log(\"Hi World\");\r\n}", "function linting() {\r\n return lintExtension;\r\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}" ]
[ "0.60268617", "0.57781506", "0.5717464", "0.5680803", "0.5680803", "0.5637184", "0.5637184", "0.5621175", "0.5575853", "0.5548215", "0.5529817", "0.5520376", "0.5520376", "0.5520376", "0.5520376", "0.5520376", "0.55096394", "0.5493174", "0.5485926", "0.54793435", "0.54786927", "0.54401183", "0.54227", "0.54227", "0.54227", "0.5414127", "0.5414127", "0.5414127", "0.53968436", "0.5376752", "0.5376632", "0.53273934", "0.5326889", "0.5326889", "0.5326889", "0.5326889", "0.5326889", "0.5326889", "0.53243434", "0.5322638", "0.531715", "0.5302702", "0.52991223", "0.52988863", "0.5290804", "0.5279601", "0.5279601", "0.5241657", "0.5241657", "0.521551", "0.5193671", "0.51907665", "0.5185999", "0.5183109", "0.5183109", "0.5183109", "0.5183109", "0.5183109", "0.5183109", "0.5183109", "0.5183109", "0.51826715", "0.5176911", "0.5171037", "0.5166267", "0.5164265", "0.51503253", "0.51451653", "0.5139893", "0.5139231", "0.5124995", "0.5124036", "0.51104504", "0.50928473", "0.50918055", "0.5091217", "0.5087397", "0.50846875", "0.50793535", "0.5075602", "0.5071486", "0.50705713", "0.50696325", "0.50650805", "0.50633305", "0.5060916", "0.5049969", "0.5042255", "0.5042255", "0.5037137", "0.50354725", "0.5014749", "0.5013603", "0.5011182", "0.50060725", "0.49873212", "0.49873212", "0.49873212", "0.49873212", "0.49873212", "0.49873212" ]
0.0
-1